package com.suno.android.common_data.mappers.hooks import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.toImmutableList import kotlin.time.Duration data class Lyrics( val lines: ImmutableList, ) { fun withOffset( time: Duration, ) = copy( lines = lines.map { line -> line.withOffset(time) }.toImmutableList(), ) data class Line( val startTime: Duration, val endTime: Duration, val section: String?, val text: String, val words: ImmutableList, ) { fun withOffset( time: Duration, ) = copy( startTime = startTime + time, endTime = endTime + time, words = words.map { word -> word.withOffset(time) }.toImmutableList(), ) } data class Word( val startTime: Duration, val endTime: Duration, val text: String, ) { fun withOffset( time: Duration, ) = copy( startTime = startTime + time, endTime = endTime + time, ) } }