import React from 'react'; export { APPROVAL_DECIDED_EVENT, APPROVAL_PARKED_EVENT, approvalGateAvailable, approvalRequiredInfo, type ApprovalRequiredInfo, } from './approval-events'; /** Capability that authorizes `policy` (and lets its holder skip the prompt). */ export declare function approvalCapability(policy: string): string; export interface ApprovalGrant { /** Audit row id (ApprovalRequest.kind=pin); null when the caller bypassed. */ id: string | null; policy: string; bypassed: boolean; reason?: string; } export interface RequestApprovalOptions { /** Policy key: oversell | discount | price_below_min | refund | cancel_cfdi | inventory_adjust | . */ policy: string; label: string; description?: React.ReactNode; /** Free-form audit data stored with the grant (product, qty, before → after…). */ context?: Record; model?: string; recordId?: string; addonKey?: string; } export interface ApprovalGateValue { /** Resolves the grant, or null when the operator cancelled. */ requestApproval: (opts: RequestApprovalOptions) => Promise; /** True when the current user may do `policy` without asking anyone. */ canSelfApprove: (policy: string) => boolean; } export declare function ApprovalGateProvider({ children }: { children: React.ReactNode; }): React.JSX.Element; /** * Access the gate. Without a provider the gate fails CLOSED for inline requests * (resolves null) — never silently authorizes — but honours the capability * bypass, and `canSelfApprove` follows `useCan()` (always-true with no * , i.e. legacy hosts keep today's behaviour). */ export declare function useApprovalGate(): ApprovalGateValue; //# sourceMappingURL=approval-gate.d.ts.map