declare module "@3d-dice/dice-box" {
  interface DiceBoxConfig {
    container?: string;
    assetPath?: string;
    theme?: string;
    themeColor?: string;
    scale?: number;
    enableShadows?: boolean;
    shadowTransparency?: number;
    lightIntensity?: number;
    onRollComplete?: (results: unknown[]) => void;
    onDieComplete?: (result: unknown) => void;
  }

  class DiceBox {
    constructor(config: DiceBoxConfig);
    init(): Promise<void>;
    roll(notation: string): Promise<unknown[]>;
    add(notation: string): Promise<unknown[]>;
    clear(): void;
    show(): void;
    hide(): void;
    updateConfig(config: Partial<DiceBoxConfig>): void;
  }

  export default DiceBox;
}

declare module "@3d-dice/dice-box-threejs" {
  interface DiceBoxThreeConfig {
    assetPath?: string;
    shadows?: boolean;
    theme_colorset?: string;
    theme_texture?: string;
    theme_material?: string;
    theme_surface?: string;
    theme_customColorset?: Record<string, string> | null;
    gravity_multiplier?: number;
    light_intensity?: number;
    baseScale?: number;
    strength?: number;
    onRollComplete?: (results: unknown[]) => void;
  }

  class DiceBox {
    constructor(container: string, config?: DiceBoxThreeConfig);
    initialize(): Promise<void>;
    roll(notation: string): Promise<unknown[]>;
    clearDice(): void;
    loadTheme(config: Record<string, string>): Promise<void>;
    theme_customColorset: Record<string, string> | null;
    DiceColors: {
      makeColorSet(c: Record<string, string>): Promise<unknown>;
    };
    DiceFactory: {
      applyColorSet(c: unknown): void;
    };
  }

  export default DiceBox;
}
