/**
 * Copyright (c) Adaptavist, Inc.
 */
import { GenericProps } from '@/src/utilities';
import { HTMLAttributes } from 'react';
import { MenuOption } from '../menu';
export interface ISelectOnChangeProps {
    /**
     * If provided, it will be returned. Default is `an empty string`.
     */
    name?: string;
    /**
     * The value of the option selected from the dropdown. Default is `an empty object or string`.
     */
    value: string | string[];
}
export declare type IInnerSelect = GenericProps & {
    /**
     * Providing name will only be returned along with the option value selected. Default is `an empty string`.
     */
    placeholder?: string;
    name?: string;
    mode?: 'multiple';
    error?: boolean;
    /**
     * Id can be used to rectify accessibility issues in a scenario where two or more of this component is present in the `DOM`. Default is `an empty string`.
     */
    id?: string;
    disabled?: boolean;
    /**
     * Specifying this will make the `Select` searchable. Default is `false`.
     */
    search?: boolean;
    /**
     * Specify the height of the `Select` dropdown in px e.g 256 = 256px. Default is `0`.
     */
    dropdownHeight?: number;
    style?: React.CSSProperties;
};
export declare type IStyledSelect = React.InputHTMLAttributes<HTMLInputElement> & IInnerSelect & GenericProps & {
    iconPresent?: boolean;
    search?: boolean;
    focus?: boolean;
};
export declare type ISelect = IInnerSelect & Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> & GenericProps & {
    /**
     * Providing this value will utter which option is selected. Default is `an empty string`.
     */
    value?: string;
    /**
     * This will select the option specified and will not utter which option is selected after the `Select` is displayed. Default is `an empty object or string`.
     */
    defaultValue?: string | string[];
    /**
     * This is `true` by default for multiple selection. Default is `true`.
     */
    clearButton?: boolean;
    reset?: boolean;
    onBlur?: (props: React.FocusEvent<HTMLInputElement>) => void;
    onChange?: (props: ISelectOnChangeProps) => void;
};
export declare type IOption = React.OptionHTMLAttributes<HTMLLIElement> & MenuOption & GenericProps & {
    value: string;
};
export interface ISelected {
    value: string;
    label: string;
}
export interface ISelectState {
    value?: string;
    label: React.ReactNode | string;
    searchValue: string;
    selected: ISelected[];
}
export interface ICheckSelected {
    params: IOption;
    state: ISelectState;
    mode?: 'multiple';
}
export interface IShareSelectState {
    selectState: ISelectState;
    setSelectState: React.Dispatch<React.SetStateAction<ISelectState>>;
}
export interface IHandleMultipleSelect {
    selectState: ISelectState;
    setSelectState: React.Dispatch<React.SetStateAction<ISelectState>>;
    event: IOption;
    onChange?: (props: ISelectOnChangeProps | ISelectOnChangeProps) => void;
    name?: string;
}
export declare type IOnSelectChange = IHandleMultipleSelect & {
    setOpenSelect: React.Dispatch<React.SetStateAction<boolean>>;
    mode?: 'multiple';
    setShowSearchIcon: React.Dispatch<React.SetStateAction<boolean>>;
};
export declare type IHandleSearch = Omit<IShareSelectState, 'selectState'> & {
    event: React.ChangeEvent<HTMLInputElement>;
    searchInputRef: React.RefObject<HTMLInputElement>;
    setOpenSelect: React.Dispatch<React.SetStateAction<boolean>>;
    mode?: 'multiple';
};
export interface IResetSelect extends Pick<IShareSelectState, 'setSelectState'> {
    onChange?: (props: ISelectOnChangeProps | ISelectOnChangeProps) => void;
    name?: string;
}
export declare type IRemoveSelectedOption = IShareSelectState & {
    value: string;
    name?: string;
    onChange?: (props: ISelectOnChangeProps | ISelectOnChangeProps) => void;
};
export interface IChangeSelectOptionsPosition {
    selectNode: React.MutableRefObject<HTMLDivElement>;
    dropdownHeight: number;
    options: (React.ReactChild | React.ReactFragment | React.ReactPortal)[];
    setMoveOptionsTops: React.Dispatch<React.SetStateAction<boolean>>;
}
export declare type IOptionsContainer = GenericProps & {
    open: boolean;
    moveUp: boolean;
    dropdownHeight: number;
};
