import React from 'react';
import type { ApplicationTenantDto, AvailableTenantForAppDto, ApplicationAccessLevel } from '@/services/api/adminApi';
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 type BulkAccessMode = 'full' | 'custom';
export interface UseApplicationPublicationReturn {
    assignedTenants: ApplicationTenantDto[];
    availableTenants: AvailableTenantForAppDto[];
    showAssignModal: boolean;
    selectedTenantIds: string[];
    selectedAccessLevel: ApplicationAccessLevel;
    tenantSearch: string;
    showCustomizeDrawer: boolean;
    customizingTenant: ApplicationTenantDto | null;
    bulkAccessMode: BulkAccessMode;
    bulkModules: BulkModuleNode[];
    bulkExpandedModules: Set<string>;
    loadingBulkModules: boolean;
    isUpdateMode: boolean;
    updateMergeMode: 'merge' | 'replace';
    showConfirmRemovalDialog: boolean;
    pendingRemovals: {
        modules: number;
        sections: number;
    };
    includePersonalTenants: boolean;
    isInDefaultPersonalTemplate: boolean;
    setAssignedTenants: React.Dispatch<React.SetStateAction<ApplicationTenantDto[]>>;
    setAvailableTenants: React.Dispatch<React.SetStateAction<AvailableTenantForAppDto[]>>;
    setShowAssignModal: React.Dispatch<React.SetStateAction<boolean>>;
    setSelectedTenantIds: React.Dispatch<React.SetStateAction<string[]>>;
    setSelectedAccessLevel: React.Dispatch<React.SetStateAction<ApplicationAccessLevel>>;
    setTenantSearch: React.Dispatch<React.SetStateAction<string>>;
    setShowCustomizeDrawer: React.Dispatch<React.SetStateAction<boolean>>;
    setCustomizingTenant: React.Dispatch<React.SetStateAction<ApplicationTenantDto | null>>;
    setBulkAccessMode: React.Dispatch<React.SetStateAction<BulkAccessMode>>;
    setBulkModules: React.Dispatch<React.SetStateAction<BulkModuleNode[]>>;
    setBulkExpandedModules: React.Dispatch<React.SetStateAction<Set<string>>>;
    setIsUpdateMode: React.Dispatch<React.SetStateAction<boolean>>;
    setUpdateMergeMode: React.Dispatch<React.SetStateAction<'merge' | 'replace'>>;
    setShowConfirmRemovalDialog: React.Dispatch<React.SetStateAction<boolean>>;
    setPendingRemovals: React.Dispatch<React.SetStateAction<{
        modules: number;
        sections: number;
    }>>;
    setIncludePersonalTenants: React.Dispatch<React.SetStateAction<boolean>>;
    loadPublicationData: (appId: string) => Promise<void>;
    loadBulkModules: (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;
    toggleTenantSelection: (tenantId: string) => void;
    selectAllFilteredTenants: () => void;
    clearTenantSelection: () => void;
    handleAssignTenants: (appId: string, onSuccess?: () => void) => Promise<void>;
    handleUpdateTenants: (appId: string, onSuccess?: () => void) => Promise<void>;
    executeUpdateTenants: (appId: string, onSuccess?: () => void) => Promise<void>;
    handleRemoveTenant: (appId: string, tenantId: string, onSuccess?: () => void) => Promise<void>;
    handleUpdateAccessLevel: (appId: string, tenantId: string, accessLevel: ApplicationAccessLevel, onSuccess?: () => void) => Promise<void>;
}
export declare function useApplicationPublication(): UseApplicationPublicationReturn;
//# sourceMappingURL=useApplicationPublication.d.ts.map