import { type AvatarProps } from '@design-system/Avatar';
import { type CardContainerProps } from '@design-system/CardContainer';
import { type PillsProps } from '@design-system/Pills';
import { type SwitcherProps } from '@design-system/Switcher';
import { type TitleProps } from '@design-system/Title';
import { type IconButtonProps } from '@mui/material/IconButton';
import { type TablerIcon } from '@tabler/icons-react';

/** Props for the AvatarSwitcherCard component. */
export type AvatarSwitcherCardProps = {
  /** Current on/off state of the switcher. @default false */
  checked?: boolean;
  /** When `true`, disables the switcher, action buttons, and avatar. @default false */
  disabled?: boolean;
  /** MUI `sx` style overrides applied to the root container. */
  sx?: CardContainerProps['sx'];
  /** Primary heading shown next to the avatar. */
  title: string;
  /** Secondary text displayed below the title. */
  description: string;
  /** Tabler icon displayed inside the avatar. */
  icon: TablerIcon;
  /** Callback fired when the switcher state changes. */
  onChange: (checked: boolean) => void;
  /** Optional status pills rendered before the actions. */
  pills?: PillsProps[];
  /** Optional icon-button actions rendered before the switcher. */
  actions?: IconButtonProps[];
  /** Props forwarded to each inner slot of the card. */
  slotProps?: AvatarSwitcherCardSlotProps;
};

/** Slot-level prop overrides for inner elements of AvatarSwitcherCard. */
export type AvatarSwitcherCardSlotProps = {
  /** Props forwarded to the root `CardContainer`. */
  root?: Partial<CardContainerProps>;
  /** Props forwarded to the `Title` component. */
  title?: Partial<TitleProps>;
  /** Props forwarded to the `Avatar` component. */
  avatar?: Partial<AvatarProps>;
  /** Props forwarded to the `Switcher` component. */
  switcher?: Partial<SwitcherProps>;
};
