import { CascadingOptions, OptionLike, DependsOnInput } from '@object-ui/core'; /** * Shared per-option cascading / role-gating resolution for the option widgets * (`SelectField` single, `MultiSelectField`, `RadioField`) — the client half of * ADR-0058 (#2284). Each option may carry a `visibleWhen` CEL predicate; the * offered set narrows against the live form record (`record.country == 'cn'`) + * the global predicate scope (`'admin' in current_user.positions`). A field * declares which sibling fields drive its list via `dependsOn`; while any is * empty the list is *gated* — callers surface a "select the parent first" hint * rather than an unfiltered set, mirroring the dependent-lookup UX. * * This is the React wrapper that sources `record` (the live form values) and the * predicate scope from context; the actual resolution is the pure * {@link resolveCascadingOptions} in `@object-ui/core`, shared with the form * renderer so gating/filtering can never drift between them (#2715). */ export type CascadingOptionsResult = CascadingOptions; export declare function useCascadingOptions(rawOptions: readonly T[], dependsOn: DependsOnInput, dependentValues: Record | undefined): CascadingOptionsResult;