import { ComponentType } from 'react';
import { Location } from 'react-router-dom';
export interface WithPermissionsChildrenParams {
    permissions: any;
}
export interface WithPermissionsProps {
    authParams?: object;
    component?: ComponentType<any>;
    location?: Location;
    staticContext?: object;
    [key: string]: any;
}
/**
 * After checking that the user is authenticated,
 * retrieves the user's permissions for a specific context.
 *
 * Useful for Route components ; used internally by Resource.
 * Use it to decorate your custom page components to require
 * a custom role. It will pass the permissions as a prop to your
 * component.
 *
 * You can set additional `authParams` at will if your authProvider
 * requires it.
 *
 * @example
 *     import { Admin, CustomRoutes, WithPermissions } from '@alkuip/core';
 *
 *     const Foo = ({ permissions }) => (
 *         {permissions === 'admin' ? <p>Sensitive data</p> : null}
 *         <p>Not sensitive data</p>
 *     );
 *
 *     const customRoutes = [
 *         <Route path="/foo" element={
 *             <WithPermissions
 *                  authParams={{ foo: 'bar' }}
 *                  component={({ permissions, ...props }) => <Foo permissions={permissions} {...props} />}
 *              />
 *         } />
 *     ];
 *     const App = () => (
 *         <Admin>
 *             <CustomRoutes>{customRoutes}</CustomRoutes>
 *         </Admin>
 *     );
 */
export declare const WithPermissions: (props: WithPermissionsProps) => any;
declare const _default: ComponentType<WithPermissionsProps>;
export default _default;
