/**
 * Round 32×32 badge that visualises a file type with a tone + icon. Mirrors
 * the Figma `Filetype` component (`AA26 / File Upload / Filetype`,
 * node id `26438:42144`):
 *
 * - `Type=Text` (`pdf` / `doc` / `docx` / `txt` / `rtf`) → `accent-pink`  + `file`
 * - `Type=Markdown` (`html` / `htm` / `md` / `mdx`)     → `accent-soft`  + `code-xml`
 * - `Type=Tabular` (`csv` / `tsv` / `xls` / `xlsx`)     → `accent-yellow` + `table-2`
 * - everything else                                     → `default`     + `file`
 * @see {@link https://www.figma.com/design/SrZQ19QVN1sQkuAMnMC746/AA26--WIP-?node-id=26438-42144}
 * @category Data Display
 * @useCases file-type indicator, attachment badge
 * @keywords file, badge, attachment, filetype, icon
 * @related UiFileItem, UiFileUploadBox
 */
export type UiFileTypeTone =
  | 'default'
  | 'accent-pink'
  | 'accent-soft'
  | 'accent-yellow';

export interface UiFileTypeProps {
  /**
   * File name used to auto-derive the tone + icon from its extension. Pass
   * the original `file.name` (with extension); the badge itself doesn't
   * render any text.
   */
  filename?: string;
  /** Explicit tone override. Wins over the filename-derived tone. */
  tone?: UiFileTypeTone;
  /** Explicit Lucide icon name. Wins over the filename-derived icon. */
  icon?: string;
  /**
   * Forces the neutral badge + `circle-alert` icon, regardless of any
   * other prop. Use to indicate an upload/validation failure.
   */
  error?: boolean;
  /**
   * Use during upload/processing — the colored tone signals "success",
   * so it shouldn't appear until the file is fully accepted.
   */
  loading?: boolean;
}
