//
//  AnalyticsOptions.swift
//  
//
//  Created by Loris Perret on 08/12/2023.
//

import ArgumentParser
import Foundation
import ToolCore

struct AnalyticsOptions: ParsableArguments {

    @Flag(
        name: [.customShort("f"), .customShort("F")],
        help: "Should force generation"
    )
    var forceGeneration = false

    @Argument(
        help: "Input files where tags ared defined.",
        transform: { $0.replaceTiltWithHomeDirectoryPath() }
    )
    var inputFile: String

    @Option(
        help: "Target(s) analytics to generate. (\"matomo\" | \"firebase\")",
        completion: .list(["matotmo", "firebase"])
    )
    var target: String

    @Option(
        help: "Where to generate the analytics manager (path with filename)",
        transform: { $0.replaceTiltWithHomeDirectoryPath() }
    )
    var outputFile: String

    @Option(help: "Tell if it will generate static properties or not")
    var staticMembers: Bool = false

    @Option(
        name: .customLong("visibility"),
        help: "Visibility of extension and properties. Possibles values: public, private, package, internal. Default is internal",
        completion: .list(["public", "private", "package", "internal"])
    )
    var extensionVisibility: ExtensionVisibility = .internal
}
