import type { IFieldPrompt, Styles } from '@cleartrip/ct-design-types'; import { TypographyStyleConfigProps } from '@cleartrip/ct-design-typography'; import type { IChipProps, IChipStyleConfig } from '@cleartrip/ct-design-chip'; import { ChipOrientation } from './constants'; /** * Props for a single chip in the SingleSelectChip component. * Extends IChipProps but removes onClick, onDismiss, and isSelected properties * since those are controlled by the parent SingleSelectChip. */ export type SingleChipProps = Omit & { /** Unique identifier for the chip */ id: string; }; export type ChipOrientationType = `${ChipOrientation}`; /** * Style configuration props for SingleSelectChip component. */ export interface ISingleSelectStyleProps { /** Styles for the root container */ root?: Styles[]; /** Styles for the chip container */ chipContainer?: Styles[]; /** Styles for the prompt box */ promptBox?: Styles[]; /** Styles for the prompt icon container */ promptIconContainer?: Styles[]; /** Styles for the prompt message text */ promptMessageTypography?: TypographyStyleConfigProps; /** Styles for individual chips */ chip?: IChipStyleConfig; } /** * Props for the SingleSelectChip component. */ export interface ISingleSelectProps { /** Array of chip data to be displayed */ data: SingleChipProps[]; /** Orientation of the chips - either row or column */ orientation?: ChipOrientationType; /** Callback function called when selection changes */ onChange: (selected: string) => void; /** Currently selected chip ID */ selected?: string | null; /** Prompt configuration for the input field */ prompt?: IFieldPrompt; /** Custom styling configuration for the component */ styleConfig?: ISingleSelectStyleProps; }