/**
 * Admin Wrapper
 *
 * Imports plugin admin modules from the virtual module and passes them
 * to AdminApp via props. This ensures plugin components are bundled
 * together with the admin app and available via React context.
 */

import { AdminApp } from "@emdash-cms/admin";
import type { Messages } from "@lingui/core";
// @ts-ignore - virtual module generated by integration
import { pluginAdmins } from "virtual:emdash/admin-registry";
// @ts-ignore - virtual module generated by integration
import { authProviders } from "virtual:emdash/auth-providers";

interface AdminWrapperProps {
	locale: string;
	messages: Messages;
}

export default function AdminWrapper({ locale, messages }: AdminWrapperProps) {
	return (
		<AdminApp
			pluginAdmins={pluginAdmins}
			authProviders={authProviders}
			locale={locale}
			messages={messages}
		/>
	);
}
