import React from "react"; import { TagProps } from "../../__internal__/utils/helpers/tags"; export type OptionTileVariant = "single" | "multiple" | "custom"; interface BaseOptionTileProps extends TagProps { /** Applies a disabled state to the tile. */ disabled?: boolean; } interface OptionTileSingleProps extends BaseOptionTileProps { /** The single-select visual variant. */ variant: "single"; /** Optional number shown before the title. */ number?: number | string; /** Visible tile text. */ title: string; /** Called when the single tile is clicked. */ onClick?: (ev: React.MouseEvent) => void; } interface OptionTileMultipleProps extends BaseOptionTileProps { /** The multiple-select visual variant. */ variant: "multiple"; /** Visible tile label. */ label: string; /** Checked state for the option. */ checked: boolean; /** Called whenever the checked state changes. */ onChange: (checked: boolean) => void; } interface OptionTileCustomProps extends BaseOptionTileProps { /** The custom-entry visual variant. */ variant: "custom"; /** Visible tile text in inactive state. */ title: string; /** Accessible label for the custom input. Falls back to the group aria-label. */ inputAriaLabel?: string; /** Optional legacy placeholder text. This is intentionally ignored to avoid deprecated placeholder styling. */ inputPlaceholder?: string; /** The value of the custom input. */ customValue: string; /** Called whenever the custom input value changes. */ onCustomValueChange: (value: string) => void; /** Called when the custom tile active state changes. */ onCustomActiveChange?: (isActive: boolean) => void; } export type OptionTileProps = OptionTileSingleProps | OptionTileMultipleProps | OptionTileCustomProps; export interface OptionTileGroupProps extends TagProps { /** Tile elements rendered in a vertical stack. */ children: React.ReactNode; /** Selection behavior context for grouped tiles. */ selectionType: "single" | "multiple"; /** Visible label for the group, rendered as the legend of the labelset. */ legend?: string; /** Additional hint text rendered below the legend. */ legendHint?: React.ReactNode; /** Applies a disabled state to the whole group's labelset. */ disabled?: boolean; /** Flag to configure the group as mandatory. */ required?: boolean; /** Accessible label when no visible legend exists. */ "aria-label": string; } export declare const OptionTile: (props: OptionTileProps) => React.JSX.Element; export declare const OptionTileGroup: ({ children, selectionType, legend, legendHint, disabled, required, "aria-label": ariaLabel, ...rest }: OptionTileGroupProps) => React.JSX.Element; export default OptionTile;