import Foundation
import Localization
import APIClient

public extension MultiButtonAlertStyle {
    enum Preset {
        case audioUploadTerms
        case uploadingScenesOnCellular
        case resumePausedUploads
        case pinningWillClearOldestPin
        case areYouSureYouWantToDeleteHook
        case hideCreatorConfirmation
        case publishSongConfirmation(Hook)

        var textCopy: TextCopy {
            switch self {
            case .audioUploadTerms:
                return .init(
                    title: L10n.FeatureCreateClip.disclaimerTitle,
                    description: L10n.FeatureCreateClip.disclaimerMessage,
                    primaryButtonLabel: L10n.FeatureCreateClip.accept,
                    secondaryButtonLabel: L10n.FeatureCreateClip.cancel
                )

            case .uploadingScenesOnCellular:
                return .init(
                    title: L10n.FeatureBrandedAlert.uploadOnCellularTitle,
                    description: L10n.FeatureBrandedAlert.uploadOnCellularMessage,
                    primaryButtonLabel: L10n.FeatureBrandedAlert.uploadOnCellularPrimaryButton,
                    secondaryButtonLabel: L10n.FeatureBrandedAlert.uploadOnCellularSecondaryButton
                )

            case .resumePausedUploads:
                return .init(
                    title: L10n.FeatureBrandedAlert.resumePausedUploadsTitle,
                    description: L10n.FeatureBrandedAlert.resumePausedUploadsMessage,
                    primaryButtonLabel: L10n.FeatureBrandedAlert.resumePausedUploadsPrimaryButton,
                    secondaryButtonLabel: L10n.FeatureBrandedAlert.resumePausedUploadsSecondaryButton
                )

            case .pinningWillClearOldestPin:
                return .init(
                    title: L10n.FeatureClipDetail.pinLimitReached,
                    description: L10n.FeatureClipDetail.pinLimitCopy,
                    primaryButtonLabel: L10n.FeatureClipDetail.confirm,
                    secondaryButtonLabel: L10n.FeatureCreateClip.cancel
                )

            case .areYouSureYouWantToDeleteHook:
                return .init(
                    title: L10n.FeatureHooks.alertTitleAreYouSure,
                    description: L10n.FeatureHooks.alertSubtitleWarning,
                    primaryButtonLabel: L10n.FeatureHooks.buttonAlertYes,
                    secondaryButtonLabel: L10n.FeatureHooks.buttonAlertCancel
                )

            case .hideCreatorConfirmation:
                return .init(
                    title: L10n.FeatureHooks.hideCreatorAlertTitle,
                    description: L10n.FeatureHooks.hideCreatorAlertMessage,
                    primaryButtonLabel: L10n.FeatureHooks.hideCreatorAlertConfirm,
                    secondaryButtonLabel: L10n.FeatureHooks.buttonAlertCancel
                )

            case .publishSongConfirmation(let hook):
                return .init(
                    title: L10n.FeatureHooksGrid.publishYourSong,
                    description: L10n.FeatureHooksGrid.publishYourSongDescription,
                    primaryButtonLabel: L10n.FeatureHooksGrid.publish,
                    secondaryButtonLabel: L10n.FeatureHooksGrid.no
                )
            }
        }
    }
}
