import React from "react";
type WithFormPermissionsProps = {
    name: string | string[];
    permissions: Record<string, {
        read?: boolean;
        write: boolean;
        delete?: boolean;
    }>;
    children: (props: {
        disabled: boolean;
        canDelete?: boolean;
    }) => React.ReactNode;
    enableRBAC?: boolean;
};
declare const WithFormPermissions: React.FC<WithFormPermissionsProps>;
export default WithFormPermissions;
/**
 * Check if the user has the permissions to access the component
 * @param rbacResource - The resource in the permission rbac slice to check for. Supports:
 *   - Single resource: "mentors#read"
 *   - OR operator (|): "apitokens#create|apitokens#list" - returns true if ANY permission exists
 *   - AND operator (&): "apitokens#create&apitokens#list" - returns true if ALL permissions exist
 * @param rbacPermissions - The RBAC permissions object from the store.
 * @param children - The component to render if the user has the permissions.
 */
type WithPermissionsProps = {
    rbacResource: string;
    rbacPermissions: object;
    children: (props: {
        hasPermission: boolean;
    }) => React.ReactNode;
};
export declare const WithPermissions: ({ rbacResource, rbacPermissions, children, }: WithPermissionsProps) => import("react/jsx-runtime").JSX.Element;
/**
 * Check RBAC permissions for a resource string that may contain operators
 * @param rbacPermissions - The RBAC permissions object
 * @param rbacResource - The resource path to check. Supports:
 *   - Single resource: "mentors#read"
 *   - OR operator (|): "apitokens#create|apitokens#list" - returns true if ANY permission exists
 *   - AND operator (&): "apitokens#create&apitokens#list" - returns true if ALL permissions exist
 * @param enableRBAC - Whether RBAC is enabled (if false, always returns true)
 * @returns boolean indicating if permission exists
 */
export declare const checkRbacPermission: (rbacPermissions: object, rbacResource: string, enableRBAC?: boolean) => boolean;
