import type { ResolvedOption } from './use-options-resolver'; export interface OptionFilterRule { /** Option property to test: a `meta` key (e.g. `status`) or `id`/`value`/`label`/`name`/`description`/`color`/`icon`. */ field: string; /** Keep only options whose value equals this. */ equals?: string | number | boolean; /** snake_case alias of `notEquals`. */ not_equals?: string | number | boolean; /** Hide options whose value equals this. */ notEquals?: string | number | boolean; /** Keep only options whose value is one of these. */ in?: Array; /** Hide options whose value is one of these. */ not_in?: Array; /** camelCase alias of `not_in`. */ notIn?: Array; } /** One rule, or a list of rules that must ALL pass (AND). */ export type OptionFilter = OptionFilterRule | OptionFilterRule[]; /** Reads the filter from a field (camelCase or the snake_case the kernel serves). */ export declare function getOptionFilter(field: unknown): OptionFilterRule[]; /** True when the option satisfies the rule. Comparison is trimmed + case-insensitive. */ export declare function optionPassesRule(opt: ResolvedOption, rule: OptionFilterRule): boolean; /** * Applies the field's filter to resolved options. Returns the SAME array when * there is nothing to filter. `keepValue` (the current selection) is never * hidden, so an existing record keeps showing its label after the option * became ineligible. */ export declare function applyOptionFilter(options: ResolvedOption[], rules: OptionFilterRule[], keepValue?: unknown): ResolvedOption[]; //# sourceMappingURL=option-filter.d.ts.map