/* AUTO-GENERATED by scripts/codegen.py — DO NOT EDIT. */

export interface BadgeSpec {
  type: "badge";
  text: string;
  color?: string;
  size?: "sm" | "md";
  visible?: any;
}

export interface CardSpec {
  type: "card";
  title: string;
  body?: string;
  image?: string | null;
  background?: string;
  visible?: any;
}

export interface ChartSpec {
  type: "chart";
  x: string;
  y: string;
  kind?: "bar" | "line" | "area" | "pie" | "donut";
  aggregate?: string | null;
  visible?: any;
  source?: string;
  data?: Record<string, any>[];
}

export interface CountdownSpec {
  type: "countdown";
  target: string;
  label?: string;
  visible?: any;
}

export interface EmbedSpec {
  type: "embed";
  url: string;
  height?: number;
  visible?: any;
}

export interface GaugeSpec {
  type: "gauge";
  value: number;
  max?: number;
  label?: string;
  visible?: any;
}

export interface GridSpec {
  type: "grid";
  fields?: any[] | null;
  editable?: boolean;
  sort?: string | null;
  visible?: any;
  source?: string;
  data?: Record<string, any>[];
  query?: { sql: string; params: any[] };
}

export interface HintSpec {
  type: "hint";
  text: string;
  mood?: "default" | "success" | "warning" | "danger";
  icon?: string | null;
  visible?: any;
}

export interface ImageSpec {
  type: "image";
  src: string;
  shape?: string;
  size?: string;
  alt?: string;
  visible?: any;
}

export interface ListSpec {
  type: "list";
  title?: string | null;
  subtitle?: string | null;
  badge?: any | null;
  image?: string | null;
  on_click?: string | null;
  searchable?: boolean;
  sort?: string | null;
  empty?: string;
  visible?: any;
  source?: string;
  data?: Record<string, any>[];
  query?: { sql: string; params: any[] };
}

export interface MetricSpec {
  type: "metric";
  label: string;
  value: any;
  delta?: any | null;
  description?: string | null;
  visible?: any;
}

export interface ProgressSpec {
  type: "progress";
  value: number;
  max?: number;
  label?: string | null;
  color?: string | null;
  show_value?: boolean;
  visible?: any;
}

export interface RichtextSpec {
  type: "richtext";
  content: string;
  visible?: any;
}

export interface TextSpec {
  type: "text";
  text: string;
  style?: "body" | "caption" | "headline" | "overline";
  visible?: any;
}

export interface TitleSpec {
  type: "title";
  text: string;
  size?: "sm" | "md" | "lg" | "xl";
  subtitle?: string | null;
  emphasis?: string | null;
  visible?: any;
}

export interface CheckboxSpec {
  type: "checkbox";
  label: string;
  default?: boolean;
}

export interface DateInputSpec {
  type: "date_input";
  label: string;
  required?: boolean;
}

export interface DatetimeInputSpec {
  type: "datetime_input";
  label: string;
  required?: boolean;
}

export interface FileInputSpec {
  type: "file_input";
  label: string;
  accept?: string;
  required?: boolean;
}

export interface ImageInputSpec {
  type: "image_input";
  label: string;
  required?: boolean;
}

export interface MarkdownInputSpec {
  type: "markdown_input";
  label: string;
  placeholder?: string;
  required?: boolean;
}

export interface NumberInputSpec {
  type: "number_input";
  label: string;
  min?: number | null;
  max?: number | null;
  required?: boolean;
}

export interface SelectSpec {
  type: "select";
  label: string;
  options: any[];
  display?: "dropdown" | "chips" | "radio";
  required?: boolean;
}

export interface SliderSpec {
  type: "slider";
  label: string;
  min?: number;
  max?: number;
  step?: number;
  default?: number | null;
}

export interface SwitchSpec {
  type: "switch";
  label: string;
  default?: boolean;
}

export interface TextInputSpec {
  type: "text_input";
  label: string;
  required?: boolean;
  placeholder?: string;
}

export interface TimeInputSpec {
  type: "time_input";
  label: string;
  required?: boolean;
}

export interface ActionRowSpec {
  type: "action_row";
  label: string;
  subtitle?: string;
  icon?: string;
  action?: string | null;
  visible?: any;
}

export interface AlertSpec {
  type: "alert";
  message: string;
  alert_type?: "info" | "success" | "warning" | "error";
  visible?: any;
}

export interface ButtonSpec {
  type: "button";
  label: string;
  variant?: "filled" | "outlined" | "ghost";
  size?: "sm" | "md" | "lg";
  icon?: string | null;
  full_width?: boolean;
  action?: string | null;
  confirm?: boolean;
  visible?: any;
}

export interface FabSpec {
  type: "fab";
  icon?: string;
  label?: string;
  action?: string | null;
  visible?: any;
}

export interface GoToSpec {
  type: "navigate";
  page: string;
  visible?: any;
}

export interface LinkSpec {
  type: "link";
  text: string;
  url: string;
  visible?: any;
}

export interface ColumnsSpec {
  type: "columns";
  count?: number;
  visible?: any;
}

export interface SectionSpec {
  type: "section";
  title: string;
  visible?: any;
}

export interface SeparatorSpec {
  type: "separator";
  visible?: any;
}

export interface TabsSpec {
  type: "tabs";
  items: any[];
  visible?: any;
}

export type AnyComponentSpec = BadgeSpec | CardSpec | ChartSpec | CountdownSpec | EmbedSpec | GaugeSpec | GridSpec | HintSpec | ImageSpec | ListSpec | MetricSpec | ProgressSpec | RichtextSpec | TextSpec | TitleSpec | CheckboxSpec | DateInputSpec | DatetimeInputSpec | FileInputSpec | ImageInputSpec | MarkdownInputSpec | NumberInputSpec | SelectSpec | SliderSpec | SwitchSpec | TextInputSpec | TimeInputSpec | ActionRowSpec | AlertSpec | ButtonSpec | FabSpec | GoToSpec | LinkSpec | ColumnsSpec | SectionSpec | SeparatorSpec | TabsSpec;

