import AdminPermission from '@/components/(protected)/admin/auth/permission'
import {EntityCrudForm} from '@/components/(protected)/admin/entity/crud-form'
import {dump} from '@/lib/utils'

export default async function Page({
	params
}: {
	params: Promise<{slug?: string[]}>
}) {
	const {slug} = await params

	switch ((slug || [])[0]) {
		case 'create':
			return (
				<>
					<AdminPermission />
					<EntityCrudForm />
				</>
			)
	}

	return <div>{dump(slug)}</div>
}
