import type { JSX } from 'solid-js'; export interface SelectOptionStateOptions { value: T; disabled?: boolean; } export interface SelectOptionStateProperties { isSelected: () => boolean; select: () => void; isActive: () => boolean; focus: () => void; blur: () => void; disabled: () => boolean; } /** * Creates one option's view of the nearest select state, so the option can ask * whether it is selected or active without knowing about the others. * * @see {@link https://github.com/lxsmnsyc/terracotta/blob/main/docs/states.md#select-option-state} */ export declare function createSelectOptionState(options: SelectOptionStateOptions): SelectOptionStateProperties; export interface SelectOptionStateRenderProps { children?: JSX.Element | ((state: SelectOptionStateProperties) => JSX.Element); } export interface SelectOptionStateProviderProps extends SelectOptionStateRenderProps { state: SelectOptionStateProperties; } export declare function SelectOptionStateProvider(props: SelectOptionStateProviderProps): JSX.Element; /** * Reads the nearest select option state from context. Throws when there is * none. * * @see {@link https://github.com/lxsmnsyc/terracotta/blob/main/docs/states.md#select-option-state} */ export declare function useSelectOptionState(): SelectOptionStateProperties; /** * Passes the nearest select option state to a render prop. A function child is * treated as a render prop only when it declares exactly one parameter. * * @see {@link https://github.com/lxsmnsyc/terracotta/blob/main/docs/states.md#select-option-state} */ export declare function SelectOptionStateChild(props: SelectOptionStateRenderProps): JSX.Element; //# sourceMappingURL=create-select-option-state.d.ts.map