import { default as React } from 'react';

type PermissionAction = "canEdit" | "canView" | "canViewById" | "canAdd" | "canDelete";
interface MultiModulePermission {
    modules: string[];
    action: PermissionAction;
    operator?: "AND" | "OR";
}
interface ComplexPermission {
    permissions: Array<{
        module: string;
        action: PermissionAction;
    }>;
    operator?: "AND" | "OR";
}
interface ProtectedRouteProps {
    module?: string;
    action?: PermissionAction;
    multiModule?: MultiModulePermission;
    complexPermissions?: ComplexPermission;
    customPermissionCheck?: (permissions: any) => boolean;
    redirectTo?: string;
    showError?: boolean;
    children: React.ReactNode;
}
declare const ProtectedRoute: React.FC<ProtectedRouteProps>;
export default ProtectedRoute;
export declare const createPermissionConfig: {
    single: (module: string, action: PermissionAction) => {
        module: string;
        action: PermissionAction;
    };
    multiModule: (modules: string[], action: PermissionAction, operator?: "AND" | "OR") => {
        multiModule: {
            modules: string[];
            action: PermissionAction;
            operator: "AND" | "OR";
        };
    };
    complex: (permissions: Array<{
        module: string;
        action: PermissionAction;
    }>, operator?: "AND" | "OR") => {
        complexPermissions: {
            permissions: {
                module: string;
                action: PermissionAction;
            }[];
            operator: "AND" | "OR";
        };
    };
    custom: (checkFn: (permissions: any) => boolean) => {
        customPermissionCheck: (permissions: any) => boolean;
    };
};
export type PermissionConfig = ReturnType<typeof createPermissionConfig.single> | ReturnType<typeof createPermissionConfig.multiModule> | ReturnType<typeof createPermissionConfig.complex> | ReturnType<typeof createPermissionConfig.custom>;
