use std::path::PathBuf;
use clap::{Args, Subcommand};
#[derive(Debug, Args, PartialEq)]
pub struct ExportArgs {
#[arg(value_name = "FILE")]
pub file: Option<PathBuf>,
#[arg(long, value_name = "PRESET")]
pub preset: Option<String>,
#[arg(short = 'f', long, default_value = "gerbers")]
pub format: String,
#[arg(short = 'o', long)]
pub output: Option<PathBuf>,
#[arg(long)]
pub skip_lint: bool,
}
#[derive(Debug, Args, PartialEq)]
pub struct AssemblyArgs {
#[arg(short = 'f', long)]
pub format: Option<String>,
#[arg(short = 'o', long)]
pub output: Option<PathBuf>,
#[arg(long)]
pub skip_lint: bool,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, clap::ValueEnum)]
pub enum BomFormat {
Table,
Csv,
Json,
}
#[derive(Debug, Args, PartialEq)]
pub struct BomArgs {
#[arg(value_name = "TARGET")]
pub target: Option<PathBuf>,
#[arg(short = 'f', long, value_enum, default_value = "table")]
pub format: BomFormat,
#[arg(short = 'o', long, value_name = "PATH")]
pub output: Option<PathBuf>,
}
#[derive(Debug, Args, PartialEq)]
#[command(args_conflicts_with_subcommands = true)]
pub struct BodyArgs {
#[command(subcommand)]
pub action: Option<BodyAction>,
#[arg(value_name = "TARGET")]
pub target: Option<PathBuf>,
#[arg(short = 'f', long)]
pub format: Option<String>,
#[arg(short = 'o', long)]
pub output: Option<PathBuf>,
#[arg(long)]
pub wall_thickness: Option<f64>,
#[arg(long)]
pub height: Option<f64>,
#[arg(long)]
pub ventilation: Option<String>,
#[arg(long)]
pub no_cutouts: bool,
#[arg(long)]
pub no_mounting: bool,
#[arg(long)]
pub skip_lint: bool,
}
#[derive(Debug, Subcommand, PartialEq)]
pub enum BodyAction {
Eject(EjectArgs),
Kit(KitArgs),
}
#[derive(Debug, Args, PartialEq)]
pub struct EjectArgs {
#[arg(value_name = "BODY")]
pub name: String,
#[arg(short = 'o', long, value_name = "FILE")]
pub output: Option<PathBuf>,
#[arg(long)]
pub skip_lint: bool,
}
#[derive(Debug, Args, PartialEq)]
pub struct KitArgs {
#[arg(value_name = "BOARD")]
pub board: Option<PathBuf>,
#[arg(short = 'o', long, value_name = "DIR")]
pub output: Option<PathBuf>,
#[arg(long)]
pub skip_lint: bool,
}
#[derive(Debug, Args, PartialEq)]
pub struct RouteArgs {
#[arg(value_name = "FILE")]
pub file: Option<PathBuf>,
#[arg(short = 'o', long)]
pub output: Option<PathBuf>,
#[arg(long, default_value = "0.2")]
pub clearance: f64,
#[arg(long, default_value = "0.25")]
pub trace_width: f64,
#[arg(long, default_value = "2")]
pub layers: u8,
#[arg(long)]
pub dry_run: bool,
}
#[derive(Debug, Args, PartialEq)]
pub struct SyncArgs {
#[arg(value_name = "KICAD_PCB", required = true)]
pub kicad_pcb: PathBuf,
#[arg(value_name = "FILE")]
pub file: Option<PathBuf>,
#[arg(long, value_name = "TARGET")]
pub target: Option<PathBuf>,
#[arg(long)]
pub write: bool,
#[arg(long)]
pub dry_run: bool,
}
#[derive(Debug, Args, PartialEq)]
pub struct InitArgs {
#[arg(value_name = "PATH")]
pub path: Option<PathBuf>,
#[arg(long)]
pub name: Option<String>,
#[arg(long)]
pub mcu: Option<String>,
#[arg(long, value_name = "CODE")]
pub currency: Option<String>,
#[arg(long)]
pub no_install: bool,
}