use clap::{Parser, Subcommand};
use std::path::PathBuf;

#[derive(Parser)]
#[command(version, about = "Version")]
pub struct Args {
    #[command(subcommand)]
    pub command: Command,
}

#[derive(Subcommand)]
pub enum Command {
    /// Configure ngemsite gateway
    GwInit {
        /// Gateway id
        id: String,
        /// Hostname for TLS certificate
        hostname: String,
    },
    /// List configured gateways
    GwList,
    /// Run gateway
    GwRun {
        /// Gateway id
        id: String,
        #[arg(short, long)]
        pid_file: Option<PathBuf>,
    },
    /// Create a site
    Create { path: PathBuf },
    /// Deploy a site
    Deploy {
        /// Path to the site
        path: PathBuf,
        /// Nostr secret (nsec) to use for signing
        #[arg(short, long)]
        sec: Option<String>,
        /// Force
        #[arg(short, long)]
        force: bool,
    },
}
