import { type TenantApplicationDto, type AvailableApplicationDto, type ApplicationAccessLevel, type SaveOverridesRequest } from '@/services/api/adminApi';
export type BulkAccessMode = 'full' | 'custom';
export interface BulkModuleNode {
    id: string;
    label: string;
    code: string;
    icon: string | null;
    isAssigned: boolean;
    sections: BulkSectionNode[];
}
export interface BulkSectionNode {
    id: string;
    label: string;
    code: string;
    icon: string | null;
    isAssigned: boolean;
}
export interface UseTenantApplicationsReturn {
    applications: TenantApplicationDto[] | null;
    setApplications: (apps: TenantApplicationDto[] | null) => void;
    loadingApps: boolean;
    setLoadingApps: (loading: boolean) => void;
    addingApplication: boolean;
    setAddingApplication: (adding: boolean) => void;
    availableApps: AvailableApplicationDto[];
    setAvailableApps: (apps: AvailableApplicationDto[]) => void;
    loadingAvailableApps: boolean;
    setLoadingAvailableApps: (loading: boolean) => void;
    selectedAppIds: string[];
    setSelectedAppIds: (appIds: string[]) => void;
    assigningApps: boolean;
    setAssigningApps: (assigning: boolean) => void;
    appSearchTerm: string;
    setAppSearchTerm: (term: string) => void;
    selectedAccessLevel: ApplicationAccessLevel;
    setSelectedAccessLevel: (level: ApplicationAccessLevel) => void;
    bulkAccessMode: BulkAccessMode;
    setBulkAccessMode: (mode: BulkAccessMode) => void;
    bulkModules: BulkModuleNode[];
    setBulkModules: (modules: BulkModuleNode[]) => void;
    bulkExpandedModules: Set<string>;
    setBulkExpandedModules: (modules: Set<string>) => void;
    loadingBulkModules: boolean;
    setLoadingBulkModules: (loading: boolean) => void;
    showCustomizeDrawer: boolean;
    setShowCustomizeDrawer: (show: boolean) => void;
    customizingApp: TenantApplicationDto | null;
    setCustomizingApp: (app: TenantApplicationDto | null) => void;
    loadApplications: () => Promise<void>;
    availableAppsError: string | null;
    loadAvailableApps: () => Promise<void>;
    handleAssignApplications: () => Promise<void>;
    handleRemoveApplication: (appId: string) => Promise<void>;
    handleUpdateAccessLevel: (appId: string, accessLevel: ApplicationAccessLevel) => Promise<void>;
    openCustomizeDrawer: (app: TenantApplicationDto) => void;
    closeCustomizeDrawer: () => void;
    filteredAvailableApps: AvailableApplicationDto[];
    handleAppToggle: (appId: string) => void;
    selectAllFilteredApps: () => void;
    clearAppSelection: () => void;
    loadBulkModulesForApp: (appId: string) => Promise<void>;
    toggleBulkModuleExpand: (moduleId: string) => void;
    toggleBulkModule: (moduleId: string) => void;
    toggleBulkSection: (moduleId: string, sectionId: string) => void;
    getBulkModuleCheckState: (module: BulkModuleNode) => 'checked' | 'unchecked' | 'indeterminate';
    getBulkStats: () => {
        totalModules: number;
        assignedModules: number;
        totalSections: number;
        assignedSections: number;
    };
    selectAllBulkModules: () => void;
    clearBulkModules: () => void;
    handleSaveOverrides: (appId: string, request: SaveOverridesRequest) => Promise<void>;
    handleResetOverrides: (appId: string) => Promise<void>;
}
export interface UseTenantApplicationsOptions {
    /** Called after any mutation that changes tenant application assignments (assign, remove, update, override). */
    onApplicationsChanged?: () => void;
}
export declare function useTenantApplications(tenantId: string | undefined, options?: UseTenantApplicationsOptions): UseTenantApplicationsReturn;
//# sourceMappingURL=useTenantApplications.d.ts.map