import { Box, Button, Typography } from '@mui/material' import type { SxProps, Theme } from '@mui/material' import { ShieldOff } from 'lucide-react' import { useNavigate } from 'react-router' interface AccessDeniedProps { title?: string message?: string onBack?: () => void sx?: SxProps } export function AccessDenied({ title = 'Kein Zugriff', message = 'Sie haben keine Berechtigung, diesen Bereich zu öffnen.', onBack, sx, }: AccessDeniedProps) { const navigate = useNavigate() function handleBack() { if (onBack) { onBack() } else { navigate(-1) } } return ( {title} {message} ) }