// Screen Visibility Component
// Wrapper for screen-level visibility based on RBAC

import { ScreenName } from '@/core/operations/permissions/permission-types';

export interface ScreenVisibilityProps {
  screen: ScreenName;
  employeeId?: string;
  
  // Behavior
  fallback?: unknown; // Component to render if screen not visible
  showError?: boolean;
  errorMessage?: string;
  
  // Children
  children?: unknown;
  
  // Loading state
  loadingComponent?: unknown;
}

/**
 * Screen Visibility Component
 * 
 * Wraps screen content and only renders if employee has access to the screen.
 * Integrates with RBAC engine service.
 * 
 * Usage example (React):
 * ```tsx
 * <ScreenVisibility
 *   screen="settlement"
 *   employeeId={employeeId}
 *   fallback={<AccessDeniedScreen />}
 * >
 *   <SettlementDashboard />
 * </ScreenVisibility>
 * ```
 */
export interface ScreenVisibilityComponent {
  props: ScreenVisibilityProps;
  checkScreenAccess(): Promise<boolean>;
  render(): unknown;
}

