//
//  MPPositive_LibraryItemModel.swift
//  relax.offline.mp3.music
//
//  Created by Mr.Zhou on 2024/7/24.
//

import UIKit
///本地曲库模型
class MPPositive_LibraryItemModel: NSObject {
    ///指向类型
    var libraryType:LibraryType
    ///封面
    var coverUrl:URL?
    ///标题
    var title:String
    ///唯一标识符
    var identifier:String?
    
    init(libraryType: LibraryType, coverUrl: URL?, title: String, identifier: String? = nil) {
        self.libraryType = libraryType
        self.coverUrl = coverUrl
        self.title = title
        self.identifier = identifier
    }
}
///Library指向类型
enum LibraryType:Int {
    case love_songs = 0
    case love_aritists = 1
    case offline_songs = 2
    case custom_playlist = 3
    
    var image:UIImage? {
        switch self {
        case .love_songs:
            return love_songBGImage
        case .love_aritists:
            return love_artistBGImage
        case .offline_songs:
            return offline_songBGImage
        case .custom_playlist:
            return placeholderImage
        }
    }
    var icon:UIImage?{
        switch self {
        case .love_songs:
            return UIImage(named: "Center_Songs'logo")
        case .love_aritists:
            return UIImage(named: "Center_Artists'logo")
        case .offline_songs:
            return UIImage(named: "Center_Offline'logo")
        case .custom_playlist:
            return nil
        }
    }
}
