import React from 'react'
import { useTranslation } from '../../../i18n'
import { PermissionLevel } from '../../../store/permissionsStore'
import { CATEGORIES, LEVEL_LABELS, usePermissionsAdmin } from '../../../components/Admin/usePermissionsAdmin'
import { Save, RotateCcw } from 'lucide-react'
import { MAdminButton, MAdminCard } from './MAdminUi'
import MSkeleton from '../../components/MSkeleton'
export default function MAdminPermissionsPanel(): React.ReactElement {
const { t } = useTranslation()
const { entryMap, values, loading, saving, dirty, handleChange, handleSave, handleReset } = usePermissionsAdmin()
if (loading) {
return (
)
}
return (
{/* The title gets the full width and the actions a row of their own: beside a
long title they ran into its second line. */}