import Foundation

public enum AnnounceAlertStyle: Equatable {
    public enum TapAction {
        case exit
        case exitToCreate
    }

    public struct TextCopy: Equatable, Codable {
        static let empty: TextCopy = .init(titleTagLabel: "", title: "", description: "", barCaption: "", barTagLabel: "", imageNames: [])

        let titleTagLabel: String?
        let title: String
        let description: String
        let barCaption: String
        let barTagLabel: String?
        // Supports only 3 images at the moment
        let imageNames: [String]
    }

    case preset(Preset)
    case custom(TextCopy, TapAction)

    public var textCopy: TextCopy {
        switch self {
        case .preset(let preset):
            return preset.textCopy
        case .custom(let textCopy, _):
            return textCopy
        }
    }

    var tapAction: TapAction {
        switch self {
        case .preset(let preset):
            return preset.tapAction
        case .custom(_, let tapAction):
            return tapAction
        }
    }
}
