
import { index_d_exports } from "../../../fixtures/dist/index.js";
import { ConfigurablePropertiesName, SelectedConfigurableProperty } from "../properties.js";

//#region ../automated-config/dist/types/ComponentConfig.d.ts
//#region src/types/ComponentConfig.d.ts
/** All configurable property names, excluding button-specific and elevation properties */
type AllPossibleProperties = Exclude<keyof typeof index_d_exports, 'iconButtonSize' | 'buttonIconSvgSize' | 'buttonPalettes' | 'buttonStates'> | 'shadowVariantConfig';
/** All possible interactive states a component can have. Compound states use & (e.g., invalid&hover) */
type PossibleStates = 'hover' | 'pressed' | 'focused' | 'invalid' | 'focus-within' | 'focused-keyboard' | 'visited' | 'readonly' | 'disabled' | 'invalid&hover' | 'invalid&pressed';
/** PossibleStates plus 'rest' for the default/inactive state */
type PossibleStatesWithRest = 'rest' | PossibleStates;
/** Configuration for a single visual layer with its properties and optional pseudo-selector */
interface LayerConfig {
  label: string;
  properties: Readonly<Record<string, SelectedConfigurableProperty<ConfigurablePropertiesName, string>>>;
  pseudoSelector?: string;
}
/** Configuration for a specific component state with its options and layer properties */
interface ComponentStateConfig {
  label: string;
  options: readonly string[];
  layers: {
    root: LayerConfig;
  } & Record<string, LayerConfig>;
}
/** Configuration for a sub-component with its own variants */
interface SubComponentConfig {
  label: string;
  description: string;
  variants: Record<string, VariantConfigWithProperties | VariantConfigWithComponentStates>;
}
/** Base variant configuration defining available options and the default */
interface VariantConfig<O extends string = string> {
  label: string;
  description: string;
  default: O;
  options: readonly O[];
}
/** Variant with layer-based property definitions for each option */
interface VariantConfigWithProperties<O extends string = string> extends VariantConfig<O> {
  layers: {
    root: LayerConfig;
  } & Record<string, LayerConfig>;
}
/** Variant with component state definitions (hover, focus, etc.) for each option */
interface VariantConfigWithComponentStates<O extends string = string> extends VariantConfig<O> {
  componentStates: Readonly<Record<string, ComponentStateConfig>>;
}
/** Top-level component configuration with variants and optional sub-components */
interface ComponentConfig {
  label: string;
  description: string;
  subComponents?: Record<string, SubComponentConfig>;
  variants?: Record<string, VariantConfigWithComponentStates | VariantConfigWithProperties | VariantConfig>;
} //#endregion
//#endregion
export { type AllPossibleProperties, type ComponentConfig, type ComponentStateConfig, type LayerConfig, type PossibleStates, type PossibleStatesWithRest, type SubComponentConfig, type VariantConfig, type VariantConfigWithComponentStates, type VariantConfigWithProperties };