import { Link } from 'react-router-dom'
import { useTranslation } from 'react-i18next'
// Icons
const TicketIcon = () => (
)
const CogIcon = () => (
)
const PhoneIcon = () => (
)
const WheelIcon = () => (
)
const TariffIcon = () => (
)
const ServerIcon = () => (
)
const AdminIcon = () => (
)
const ChartIcon = () => (
)
interface AdminCardProps {
to: string
icon: React.ReactNode
title: string
description: string
color: string
}
function AdminCard({ to, icon, title, description, color }: AdminCardProps) {
return (
{title}
{description}
)
}
export default function AdminPanel() {
const { t } = useTranslation()
const adminSections = [
{
to: '/admin/dashboard',
icon: ,
title: t('admin.nav.dashboard'),
description: t('admin.panel.dashboardDesc'),
color: 'success'
},
{
to: '/admin/tickets',
icon: ,
title: t('admin.nav.tickets'),
description: t('admin.panel.ticketsDesc'),
color: 'warning'
},
{
to: '/admin/settings',
icon: ,
title: t('admin.nav.settings'),
description: t('admin.panel.settingsDesc'),
color: 'accent'
},
{
to: '/admin/apps',
icon: ,
title: t('admin.nav.apps'),
description: t('admin.panel.appsDesc'),
color: 'success'
},
{
to: '/admin/wheel',
icon: ,
title: t('admin.nav.wheel'),
description: t('admin.panel.wheelDesc'),
color: 'error'
},
{
to: '/admin/tariffs',
icon: ,
title: t('admin.nav.tariffs'),
description: t('admin.panel.tariffsDesc'),
color: 'info'
},
{
to: '/admin/servers',
icon: ,
title: t('admin.nav.servers'),
description: t('admin.panel.serversDesc'),
color: 'purple'
},
]
return (
{/* Header */}
{t('admin.panel.title')}
{t('admin.panel.subtitle')}
{/* Grid of admin sections */}
{adminSections.map((section) => (
))}
)
}