import { ReactNode } from 'react';
import { UseGrantOptions } from '../hooks/useGrant';
/**
* Props for the GrantGate component
*/
export interface GrantGateProps extends UseGrantOptions {
/** The resource slug to check permission for */
resource: string;
/** The action to check */
action: string;
/** Content to render if permission is granted */
children: ReactNode;
/** Content to render if permission is denied (optional) */
fallback?: ReactNode;
/** Content to render while loading (optional) */
loading?: ReactNode;
}
/**
* Component that conditionally renders children based on permissions
*
* @example
* ```tsx
* // Basic usage - hide element if no permission
*