import { ReactNode } from 'react'; import type { Permission } from '../../lib/permissions/types'; interface PermissionGateProps { /** Required permission (if single) */ permission?: Permission; /** Multiple required permissions (AND - all must be true) */ permissions?: Permission[]; /** Multiple permissions where any is sufficient (OR - at least one must be true) */ anyPermission?: Permission[]; /** Content to show if has permission */ children: ReactNode; /** Alternative content if NO permission */ fallback?: ReactNode; /** If true, shows fallback instead of null when no permission */ showFallback?: boolean; } /** * Component for conditional rendering based on permissions * * USAGE PATTERNS: * * @example * // Single permission check * * * * * @example * // Multiple permissions required (AND logic) * * * * * @example * // Any permission sufficient (OR logic) * * * * * @example * // With fallback content * } * showFallback={true} * > * * */ export declare function PermissionGate({ permission, permissions, anyPermission, children, fallback, showFallback, }: PermissionGateProps): import("react/jsx-runtime").JSX.Element; /** * Higher-Order Component to wrap components with permission check * * @param WrappedComponent - Component to wrap * @param permission - Permission required to render the component * @param FallbackComponent - Optional component to show when no permission * @returns Wrapped component with permission check * * @example * ```tsx * const ProtectedCustomerForm = withPermission( * CustomerForm, * 'customers.create', * NoPermissionMessage * ) * * // Usage * * ``` */ export declare function withPermission

(WrappedComponent: React.ComponentType

, permission: Permission, FallbackComponent?: React.ComponentType): (props: P) => import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=PermissionGate.d.ts.map