import { ChangeEvent, ReactNode } from 'react'; /** * Interface for the select card state */ interface ISelectCardState { /** * When `true`, adds the item to the selected state holder. */ checked: boolean; /** * Gives an explicit id to each item in the set. */ id?: string | number; } /** * Interface for the select card onChange options */ interface ISelectCardOnChangeOptions { /** * When `true`, doesn't fire the user's `onChange` */ internal?: boolean; } /** * Interface for the select card context */ export interface ISelectCardContext { /** * Callback function that is triggered when the selection state changes. * * @callback OnChangeCallback * @param {ChangeEvent} [e] - The native HTML input change event. * @param {ISelectCardState} [state] - The current state of the select card component after the change. * @returns {void} */ onChange: (e?: ChangeEvent, state?: ISelectCardState, options?: ISelectCardOnChangeOptions) => void; /** * Sets how many cards the user can select, either 'single' (radio buttons) or 'multiple' (checkboxes) */ selectionMode: "single" | "multiple"; /** * Used internally to create a UUID for the HTML `name` property on radios. */ radioName: string; /** * Creates a set of ids that are selected. */ selection: Set; } /** * Props for the SelectCardProvider component * @extends Omit */ interface ISelectCardProviderProps extends Omit { children: ReactNode; } /** * SelectCardProvider component for managing selection state across SelectCard components. * * Features: * - Provides context for SelectCard components to share selection state * - Manages selection mode (single vs multiple) * - Handles selection state updates and callbacks * - Generates unique radio button names for single selection mode * - Maintains a set of selected card IDs * - Integrates with SelectCardGroup for automatic context provision * * @example * console.log('Selection changed:', state)} * > * {}}>Option 1 * {}}>Option 2 * */ export declare const SelectCardProvider: ({ children, onChange, selectionMode, }: ISelectCardProviderProps) => import("react/jsx-runtime").JSX.Element; /** * Custom hook for accessing the SelectCard context. * @returns The SelectCard context or null if not within a SelectCardProvider */ export declare const useSelectCardContext: () => ISelectCardContext | null; export {};