use std::path::PathBuf;

use clap::Parser;
use yazi_shared::{id::Id, url::UrlBuf};

#[derive(Debug, Default, Parser)]
#[command(name = "yazi")]
#[command(after_help = "See https://yazi-rs.github.io/docs/quick-start for a quick starter.")]
pub struct Args {
	/// Set the current working entry
	#[arg(index = 1, num_args = 1..=9)]
	pub entries: Vec<UrlBuf>,

	/// Write the cwd on exit to this file
	#[arg(long)]
	pub cwd_file:     Option<PathBuf>,
	/// Write the selected files to this file on open fired
	#[arg(long)]
	pub chooser_file: Option<PathBuf>,

	/// Clear the cache directory (deprecated, use `ya cache clear`)
	#[arg(long)]
	pub clear_cache: bool, // TODO: remove

	/// Use the specified client ID, must be a globally unique number
	#[arg(long)]
	pub client_id:     Option<Id>,
	/// Report the specified local events to stdout
	#[arg(long)]
	pub local_events:  Option<String>,
	/// Report the specified remote events to stdout
	#[arg(long)]
	pub remote_events: Option<String>,

	/// Print debug information (deprecated, use `ya env`)
	#[arg(long)]
	pub debug: bool, // TODO: remove

	/// Print version
	#[arg(short = 'V', long)]
	pub version: bool,
}
