import type { AdminData } from './admin-data';
import AdminShell from './AdminShell';
import { SchedulerAdminApp } from './admin/SchedulerAdminApp';

interface Props {
	data: AdminData;
}

export default function AdminApp( { data }: Props ) {
	return (
		<AdminShell
			data={ data }
			renderScreen={ ( props ) => {
				return (
					<SchedulerAdminApp
						data={ props.data }
						currentScreen={ props.currentScreen }
						detailRoute={ props.detailRoute }
						onOpenChangeDetail={ props.onOpenChangeDetail }
						onOpenRecordingDetail={ props.onOpenRecordingDetail }
						onCloseDetail={ props.onCloseDetail }
					/>
				);
			} }
		/>
	);
}
