import { MatchSorterOptions } from 'match-sorter'; import { SelectFieldProps, SelectFieldOption, SelectFieldGroupByValue } from './types'; import { SyncFilterFn } from '../../../internal/functions/syncFilterUtils'; export type SelectFieldSyncProps = Omit & { /** * The options to display in the select field. */ options: SelectFieldOption[]; /** * Controls how options are filtered and sorted when the user types a search value. * Can be a function that returns options in the desired display order, * or a MatchSorterOptions object to customize the default match-sorter behavior. * * Before any search is performed, options appear in the order they are supplied. * By default, options are filtered by `label` and `searchText` using match-sorter, * which also ranks results by match quality (best matches first). * * @example * { * return options.filter((option) => { * return option.label?.toLowerCase().includes(searchValue.toLowerCase()); * }); * }} * /> * * @example * */ filter?: SyncFilterFn | MatchSorterOptions; /** * Function to compare two group values for sorting. * When provided, options are sorted by group using this comparator, * then by match-sort order within each group. * @param a - First group value to compare * @param b - Second group value to compare * @returns Negative if a < b, positive if a > b, zero if equal */ groupSorter?: (a: SelectFieldGroupByValue, b: SelectFieldGroupByValue) => number; }; /** * SelectFieldSync is a simplified version of SelectField that is used to display a list of options in a select field. * * Features: * - Accepts `options` instead of `loadOptions` and `lazy`. * - Performs client-side filtering of the options. * - Optionally accepts a function to filter the options, or a MatchSorterOptions object to customize the default filtering. * - Supports grouping with optional group sorting via `groupSorter`. * - Supports all the other props of SelectField. */ export declare const SelectFieldSync: (props: SelectFieldSyncProps) => import("react/jsx-runtime").JSX.Element;