import type { AuthorizationMatchMode } from "../../types.js"; /** * Props shared by the and UI authorization components. */ export interface CanComponentProps { /** * Single required ability. Takes precedence over `abilities` when both are * provided. */ ability?: string; /** * Multiple required abilities, evaluated with `mode`. An empty array means * "no restriction", matching route metadata and server semantics. */ abilities?: string[]; /** * "all" (default) requires every listed ability; "any" requires at least * one. Exact string equality; identical to Phase 3 enforcement semantics. */ mode?: AuthorizationMatchMode; } /** * Shared evaluation for /: normalizes component props into a * requirement and evaluates it against the existing client authorization * state (`useState("bearer-auth-abilities")`) through the pure Phase 4 * evaluator. No new authorization state is created and nothing is fetched. * * Prop normalization: * - `ability` (string) becomes a single-entry requirement. * - `abilities` arrays pass through to the evaluator (empty => allowed). * - Absent props mean "no restriction" — same as an empty requirement. * - A provided but non-array `abilities` value is malformed and fails closed. * * The result is reactive: login, refresh, logout, and session replacement all * update `auth.abilities`, so components re-render automatically. */ export declare function useAbilityRequirement(props: CanComponentProps): { authorized: import("vue").ComputedRef; }; //# sourceMappingURL=useAbilityRequirement.d.ts.map