import type { Config } from '@bamboocss/types'

export interface InitCommandFlags extends Pick<
  Config,
  'cwd' | 'poll' | 'watch' | 'gitignore' | 'outExtension' | 'outdir'
> {
  /**
   * `--strict-values`, which cac gives as `true` when bare and otherwise as whatever followed
   * it — a string, or a number where that looked numeric. `normalizeStrictTokens` is what turns
   * any of those into a setting, or refuses.
   */
  strictValues?: boolean | string | number
  force?: boolean
  postcss?: boolean
  silent?: boolean
  interactive?: boolean
  config?: string
  logfile?: string
  codegen?: boolean
}

export interface CssGenCommandFlags {
  silent?: boolean
  clean?: boolean
  outfile?: string
  watch?: boolean
  poll?: boolean
  cwd?: string
  config?: string
  minify?: boolean
  polyfill?: boolean
  cpuProf?: boolean
  logfile?: string
  splitting?: boolean
}

export interface AnalyzeCommandFlags {
  silent?: boolean
  outfile?: string
  cwd?: string
  config?: string
  scope?: 'token' | 'recipe'
}

export interface DebugCommandFlags {
  silent?: boolean
  dry?: boolean
  outdir?: string
  cwd?: string
  config?: string
  onlyConfig?: boolean
  cpuProf?: boolean
  logfile?: string
}

export interface ShipCommandFlags {
  silent?: boolean
  minify?: boolean
  outfile?: string
  cwd?: string
  config?: string
  watch?: boolean
  poll?: boolean
}

export interface CodegenCommandFlags extends Pick<Config, 'cwd' | 'poll' | 'watch'> {
  clean?: boolean
  silent?: boolean
  config?: string
  cpuProf?: boolean
  logfile?: string
}

export interface MainCommandFlags extends Pick<Config, 'cwd' | 'poll' | 'watch'> {
  outdir?: string
  minify?: boolean
  config?: string
  cwd: string
  preflight?: boolean
  silent?: boolean
  exclude?: string[]
  hash?: boolean
  emitTokensOnly?: boolean
  polyfill?: boolean
  cpuProf?: boolean
  logfile?: string
}

export interface EmitPackageCommandFlags {
  outdir: string
  silent?: boolean
  cwd: string
  base?: string
}

export interface McpInitCommandFlags {
  cwd?: string
  client?: string[]
}

export interface SpecCommandFlags {
  silent?: boolean
  outdir?: string
  cwd?: string
  config?: string
}
