import * as React from 'react';
import { AdminContextProps, AdminUIProps } from 'ra-ui-materialui';
/**
* Main admin component, entry point to the application.
*
* Initializes the various contexts (auth, data, i18n, router)
* and defines the main routes.
*
* Expects a list of resources as children, or a function returning a list of
* resources based on the permissions.
*
* @example
*
* // static list of resources
*
* import {
* Admin,
* Resource,
* ListGuesser,
* useDataProvider,
* } from 'react-admin';
*
* const App = () => (
*
*
*
* );
*
* // dynamic list of resources based on permissions
*
* import {
* Admin,
* Resource,
* ListGuesser,
* useDataProvider,
* } from 'react-admin';
*
* const App = () => (
*
* {permissions => [
* ,
* ]}
*
* );
*
* // If you have to build a dynamic list of resources using a side effect,
* // you can't use . But as it delegates to sub components,
* // it's relatively straightforward to replace it:
*
* import * as React from 'react';
import { useEffect, useState } from 'react';
* import {
* AdminContext,
* AdminUI,
* defaultI18nProvider,
* localStorageStore,
* Resource,
* ListGuesser,
* useDataProvider,
* } from 'react-admin';
*
* const store = localStorageStore();
*
* const App = () => (
*
*
*
* );
*
* const Resources = () => {
* const [resources, setResources] = useState([]);
* const dataProvider = useDataProvider();
* useEffect(() => {
* dataProvider.introspect().then(r => setResources(r));
* }, []);
*
* return (
*
* {resources.map(resource => (
*
* ))}
*
* );
* };
*/
export declare const Admin: (props: AdminProps) => React.JSX.Element;
export default Admin;
export interface AdminProps extends AdminContextProps, AdminUIProps {
}
//# sourceMappingURL=Admin.d.ts.map