//
// © 2017-2020 Qualcomm Technologies, Inc. and/or its subsidiaries. All rights reserved.
//

import UIKit

class MediaItemMusicListDisplayHelperItem : MusicListDisplayHelperItem {
	public var mediaItem: IoTMediaItem
	
	init(mediaItem: IoTMediaItem,
		 accessory: MusicListDisplayHelperItemAccessory,
		 options: [String]) {
		self.mediaItem = mediaItem
		super.init()
		
		self.state = .available
		self.imageURL = mediaItem.thumbnailURL
		self.title = mediaItem.title.uppercased()
		var st = mediaItem.artist
		if !st.isEmpty && !mediaItem.album.isEmpty {
			st = st + " - "
		}
		st = st + mediaItem.album
		self.subtitle = st
		self.accessory = accessory
		self.options = options
	}
}
