import Foundation
import Localization

public extension AnnounceAlertStyle {
    enum Preset: CaseIterable {
        public static var random: Preset {
            return allCases.randomElement() ?? .empty
        }

        case empty
        case introducingSunoShorts
        case createFirstSong

        var textCopy: AnnounceAlertStyle.TextCopy {
            switch self {
            case .empty:
                return .init(
                    titleTagLabel: "",
                    title: "",
                    description: "",
                    barCaption: "",
                    barTagLabel: "",
                    imageNames: []
                )

            case .introducingSunoShorts:
                return .init(
                    titleTagLabel: L10n.FeatureBrandedAlert.new,
                    title: L10n.FeatureBrandedAlert.meetSunoScenes,
                    description: L10n.FeatureBrandedAlert.makeASongFromYourPhotosAndVideos,
                    barCaption: L10n.FeatureBrandedAlert.createAShort,
                    barTagLabel: L10n.FeatureBrandedAlert.free,
                    imageNames: ["partyPeople1", "partyPeople2", "partyPeople3"]
                )

            case .createFirstSong:
                return .init(
                    titleTagLabel: nil,
                    title: L10n.FeatureBrandedAlert.createFirstSongTitle,
                    description: L10n.FeatureBrandedAlert.createFirstSongMessage,
                    barCaption: L10n.FeatureBrandedAlert.createFirstSongPrimaryButton,
                    barTagLabel: nil,
                    imageNames: ["createFirstSongPhone", "createFirstSongDj", "createFirstSongSing"]
                )
            }
        }

        var tapAction: AnnounceAlertStyle.TapAction {
            switch self {
            case .empty:
                return .exit
            case .introducingSunoShorts, .createFirstSong:
                return .exitToCreate
            }
        }
    }
}
