import {
CoreAdminUI,
type CoreAdminUIProps,
CoreAdminContext,
type CoreAdminContextProps,
type CoreAdminProps,
localStorageStore,
} from "ra-core";
import { i18nProvider as defaultI18nProvider } from "@/lib/i18nProvider";
import { Layout } from "@/components/admin/layout";
import { LoginPage } from "@/components/admin/login-page";
import { Ready } from "@/components/admin/ready";
import { ThemeProvider } from "@/components/admin/theme-provider";
import { AuthCallback } from "@/components/admin/authentication";
const defaultStore = localStorageStore();
/**
* Context provider for the Admin component.
*
* Wraps CoreAdminContext to provide core admin functionality including data provider,
* auth provider, i18n provider, and store access to child components.
*
* @internal
*/
export const AdminContext = (props: CoreAdminContextProps) => (
);
/**
* UI component for the Admin application.
*
* Wraps CoreAdminUI with theme provider and handles telemetry reporting.
* Provides the main layout, login page, ready page, and authentication callback.
*
* @internal
*/
export const AdminUI = (props: CoreAdminUIProps) => (
);
/**
* Root component of a shadcn-admin-kit application.
*
* Creates context providers to allow its children to access the app configuration.
* Renders the main routes and layout, and delegates content area rendering to Resource children.
* Combines AdminContext and AdminUI to provide a complete admin interface.
*
* @see {@link https://marmelab.com/shadcn-admin-kit/docs/admin/ Admin documentation}
*
* @example
* // Basic usage with dataProvider and Resources
* import { Admin } from "@/components/admin";
* import { Resource } from 'ra-core';
* import simpleRestProvider from 'ra-data-simple-rest';
*
* const App = () => (
*
*
*
* );
*
* @example
* // With authentication and i18n
*
*
*
*/
export const Admin = (props: CoreAdminProps) => {
const {
accessDenied,
authCallbackPage = AuthCallback,
authenticationError,
authProvider,
basename,
catchAll,
children,
dashboard,
dataProvider,
disableTelemetry,
error,
i18nProvider = defaultI18nProvider,
layout = Layout,
loading,
loginPage = LoginPage,
queryClient,
ready = Ready,
requireAuth,
store = defaultStore,
title = "Shadcn Admin",
} = props;
return (
{children}
);
};