import { ReactElement, ComponentProps, FC, ReactNode } from 'react'; import { IconProps } from '../Icon/index.js'; import { MultiselectProps } from '../Multiselect/index.js'; import { RadioGroupProps } from '../RadioGroup/index.js'; import { SelectProps } from '../Select/index.js'; import { ToggleProps } from '../Toggle/index.js'; export declare type FormControlProps = { required?: boolean; invalid?: boolean; name: string; label?: string | ReactElement; placeholder?: string; helperText?: string | ReactElement; error?: string; }; export declare type FormControlLabelProps = ComponentProps<'label'> & { hidden?: boolean; helperText?: string; }; export declare type FormControlCheckboxProps = ComponentProps<'input'> & FormControlProps; export declare type FormControlInputProps = ComponentProps<'input'> & FormControlProps & { leadingIcon?: IconProps; trailingIcon?: IconProps; leadingAddon?: string | ReactNode; trailingAddon?: string | ReactNode; }; export declare type FormControlMetaProps = { invalid?: boolean; helperText?: string | ReactNode; error?: string; }; export declare type FormControlRadioGroupProps = FormControlProps & RadioGroupProps; export declare type FormControlSelectProps = FormControlProps & SelectProps; export declare type FormControlSearchableSelectProps = FormControlProps & { value: string; options: { value: string; key: string; text: ReactNode; }[]; onChange: (newValue: string) => void; disabled?: boolean; onInputChange?: (newValue: string) => void; }; export declare type FormControlMultiselectProps = FormControlProps & Omit, 'children'>; export declare type FormControlTextareaProps = ComponentProps<'textarea'> & FormControlProps & { cornerHint?: string; }; export declare type FormControlToggleProps = FormControlProps & ToggleProps; export declare type FormControlHelperTextProps = { invalid?: boolean; className?: string; }; export interface FormControlType extends FC { Label?: FC; HelperText?: FC; Meta?: FC; Checkbox?: FC; Input?: FC; InputCopy?: FC; Textarea?: FC; Toggle?: FC; Select?: FC; Multiselect?: FC; RadioGroup?: FC; SearchableSelect?: FC; }