import Foundation

final class LocalizedAudioPlayerSettings: ObservableObject {

    @Published
    var playlistText: String

    init(playlistText: String) {
        self.playlistText = playlistText
    }
}

// MARK: Storage

extension LocalizedAudioPlayerSettings {

    convenience init(data: Data) {
        self.init(playlistText: data.playlistText)
    }

    var data: Data {
        .init(playlistText: playlistText)
    }

    struct Data: Codable, Equatable {
        let playlistText: String
    }
}
