import Foundation
import Localization
import ShareAssetClient
import SwiftUI

public enum VisualizerOverlayStyle: String, Equatable, Identifiable {
    /* Flattened Version of StickerStyle + Lyrics Style */

    case none
    case coreInfoStandard = "core_info_standard"
    case leadingInfoStandard = "leading_info_standard"
    case coreLyricsStandardNoLyrics = "core_lyrics_standard+none"
    case coreLyricsStandardLyricsBox = "core_lyrics_standard+lyrics_box"
    case coreLyricsStandardLyricsThreeLine = "core_lyrics_standard+lyrics_three_line"
    case coreLyricsStandardLyricsTwoLine = "core_lyrics_standard+lyrics_two_line"
    case framedCoreCenter = "framed_core_center"
    case framedCoreTop = "framed_core_top"

    public var id: String {
        return rawValue
    }

    public var displayName: String {
        switch self {
        case .none:
            return ""
        case .coreInfoStandard:
            return L10n.FeatureShareAssets.cornerInfo
        case .leadingInfoStandard:
            return L10n.FeatureShareAssets.sideAlignedInfo
        case .coreLyricsStandardNoLyrics:
            return L10n.FeatureShareAssets.minimalInfo
        case .coreLyricsStandardLyricsBox:
            return L10n.FeatureShareAssets.boxedLyrics
        case .coreLyricsStandardLyricsThreeLine:
            return L10n.FeatureShareAssets.lyricsTripleLine
        case .coreLyricsStandardLyricsTwoLine:
            return L10n.FeatureShareAssets.lyricsDoubleLine
        case .framedCoreCenter:
            return L10n.FeatureShareAssets.centerFrame
        case .framedCoreTop:
            return L10n.FeatureShareAssets.topFrame
        }
    }

    public var assetIcon: Image {
        switch self {
        case .none:
            return Image.Assets.blank
        case .coreInfoStandard:
            return Image.Icon.shareOverlayStyleIconE
        case .leadingInfoStandard:
            return Image.Icon.shareOverlayStyleIconF
        case .coreLyricsStandardNoLyrics:
            return Image.Icon.shareOverlayStyleIconD
        case .coreLyricsStandardLyricsBox:
            return Image.Icon.shareOverlayStyleIconI
        case .coreLyricsStandardLyricsThreeLine:
            return Image.Icon.shareOverlayStyleIconA
        case .coreLyricsStandardLyricsTwoLine:
            return Image.Icon.shareOverlayStyleIconB
        case .framedCoreCenter:
            return Image.Icon.shareOverlayStyleIconH
        case .framedCoreTop:
            return Image.Icon.shareOverlayStyleIconG
        }
    }
}
