import { ReactNode } from 'react';
import { GroupBase, Props as ReactSelectProps } from 'react-select';
import { FieldVariant } from '../../styles/borderedField';
import { SelectIcon, SelectMenu, SelectOption, SelectControl, SelectWrapper, SelectMenuList, SelectContainer, SelectValueContainer } from './Select.styles';
export type SelectValue = string | number;
export interface SelectOptionItem {
key?: string;
value: SelectValue;
label: ReactNode;
/** URL string (rendered as
) or a React node (e.g. an SVG flag) shown left of the label. */
icon?: ReactNode;
}
/** What `onChange` / `onBlur` / `onFocus` receive. `value` is the option value, or an array of values in `multiple` mode. */
export interface SelectChange {
name: string;
value: any;
}
type PassthroughProps = ReactSelectProps>;
type OwnPropKeys = 'id' | 'name' | 'value' | 'options' | 'placeholder' | 'onChange' | 'onBlur' | 'onFocus' | 'formatCreateLabel' | 'dataCy' | 'variant';
export interface SelectProps extends Omit {
id: string;
name: string;
label?: string;
/** string|number for single mode, array for multi mode. */
value?: SelectValue | readonly SelectValue[];
options: readonly SelectOptionItem[];
placeholder?: string;
/** Shown as an error state once `touched` is true. */
error?: boolean;
touched?: boolean;
disabled?: boolean;
/** Lets the user type to filter the options. */
search?: boolean;
/** Lets the user add a value that is not in `options`. */
creatable?: boolean;
/** Multi-select: checkbox options + chips list rendered below the field. */
multiple?: boolean;
/** Multi mode: values that cannot be removed (chip ✕ disabled, can't be deselected). */
lockedValues?: readonly SelectValue[];
/** Max menu height in px. */
menuHeight?: number;
/** Heading shown above the chips list in multi mode (default: "Selected"). */
selectedLabel?: string;
/** Input-like floating label behavior: label starts in-field, moves up on focus/value. Ignored when `bordered`. */
floatingLabel?: boolean;
formatCreateLabel?: (input: string) => ReactNode;
onChange?(field: SelectChange): void;
onBlur?(field: SelectChange): void;
onFocus?(field: SelectChange): void;
/** Playwright / autocapture: `data-cy` selector on the react-select control. */
dataCy?: string;
/** `bordered`: boxed control with a static label above (sign-up redesign). Default keeps the underline look. */
variant?: FieldVariant;
}
/** Dropdown with a floating label on react-select: single, searchable, multiple (checkboxes + chips) or creatable. */
declare const Select: (props: SelectProps) => import("react/jsx-runtime").JSX.Element;
export { Select, SelectControl, SelectMenu, SelectMenuList, SelectOption, SelectContainer, SelectValueContainer, SelectIcon, SelectWrapper, };