import { SecurityLevel, CIAComponent } from '../types/cia'; /** * State object containing security levels for all CIA components * * @property availability - Availability security level * @property integrity - Integrity security level * @property confidentiality - Confidentiality security level */ export interface SecurityLevelState { /** Availability security level */ availability: SecurityLevel; /** Integrity security level */ integrity: SecurityLevel; /** Confidentiality security level */ confidentiality: SecurityLevel; } /** * Return type for useSecurityLevelState hook */ export interface UseSecurityLevelStateReturn { /** Current security levels for all components */ levels: SecurityLevelState; /** Updates security level for a specific component */ setLevel: (component: CIAComponent, level: SecurityLevel) => void; /** Resets all security levels to default */ resetLevels: (defaultLevel?: SecurityLevel) => void; /** Gets security level for a specific component */ getLevel: (component: CIAComponent) => SecurityLevel; } /** * Custom hook for managing CIA triad security levels * * ## Business Perspective * * Provides unified state management for security officers to configure * organizational security posture across all three CIA components. This * centralization ensures consistent security level handling and simplifies * state management across the application. 🔒 * * ## Technical Perspective * * Extracts common security level state management pattern found in 8+ widgets, * reducing code duplication by ~20% and ensuring consistent behavior. Uses * React hooks best practices with proper memoization for optimal performance. * * @param initialLevels - Initial security levels (defaults to 'Moderate' for all components) * @returns Security level state and update functions * * @example * ```tsx * // Basic usage with defaults * const { levels, setLevel, getLevel } = useSecurityLevelState(); * * // Update a level * setLevel('availability', 'High'); * * // Get a level * const currentLevel = getLevel('integrity'); * * // Initialize with custom levels * const { levels } = useSecurityLevelState({ * availability: 'High', * integrity: 'Moderate', * confidentiality: 'Very High' * }); * * // Reset all levels * resetLevels('Low'); * ``` */ export declare function useSecurityLevelState(initialLevels?: Partial): UseSecurityLevelStateReturn; //# sourceMappingURL=useSecurityLevelState.d.ts.map