pub mod admin;
pub mod auth;
pub mod notebooks;
pub mod notes;
pub mod sync;
pub mod workspaces;

use clap::{Parser, Subcommand};

#[derive(Parser)]
#[command(name = "doqium-cli")]
#[command(about = "Doqium CLI - Command-line interface for Doqium", long_about = None)]
pub struct Cli {
    /// Hide the banner
    #[arg(long, global = true)]
    pub no_banner: bool,

    /// Use a specific profile for this execution (overrides active profile)
    #[arg(long, global = true)]
    pub profile: Option<String>,

    #[command(subcommand)]
    pub command: Option<Commands>,
}

#[derive(Subcommand)]
pub enum Commands {
    /// Authentication commands
    Auth {
        #[command(subcommand)]
        auth_command: auth::AuthCommands,
    },
    /// Workspace operations
    #[clap(visible_alias("ws"))]
    Workspaces {
        #[command(subcommand)]
        workspace_command: workspaces::WorkspaceCommands,
    },
    /// Notebook operations
    #[clap(visible_alias("nb"))]
    Notebooks {
        #[command(subcommand)]
        notebook_command: notebooks::NotebookCommands,
    },
    /// Note operations
    #[clap(visible_alias("n"))]
    Notes {
        #[command(subcommand)]
        notes_command: notes::NotesCommands,
    },
    /// Synchronize workspaces and notebooks with local directories
    Sync {
        #[command(subcommand)]
        sync_command: sync::SyncCommands,
    },
    /// Admin commands (hidden - only for administrators)
    #[command(hide = true)]
    Admin {
        #[command(subcommand)]
        admin_command: admin::AdminCommands,
    },
    /// Show version information
    Version,
}
