import { Link } from 'react-router-dom'
import { useTranslation } from 'react-i18next'
// Icons - smaller versions for mobile
const TicketIcon = ({ className = "w-8 h-8" }: { className?: string }) => (
)
const CogIcon = ({ className = "w-8 h-8" }: { className?: string }) => (
)
const PhoneIcon = ({ className = "w-8 h-8" }: { className?: string }) => (
)
const WheelIcon = ({ className = "w-8 h-8" }: { className?: string }) => (
)
const TariffIcon = ({ className = "w-8 h-8" }: { className?: string }) => (
)
const ServerIcon = ({ className = "w-8 h-8" }: { className?: string }) => (
)
const AdminIcon = ({ className = "w-8 h-8" }: { className?: string }) => (
)
const ChartIcon = ({ className = "w-8 h-8" }: { className?: string }) => (
)
const BroadcastIcon = ({ className = "w-8 h-8" }: { className?: string }) => (
)
const PromocodeIcon = ({ className = "w-8 h-8" }: { className?: string }) => (
)
const CampaignIcon = ({ className = "w-8 h-8" }: { className?: string }) => (
)
const UsersIcon = ({ className = "w-8 h-8" }: { className?: string }) => (
)
const PaymentsIcon = ({ className = "w-8 h-8" }: { className?: string }) => (
)
const PromoOffersIcon = ({ className = "w-8 h-8" }: { className?: string }) => (
)
const ChevronRightIcon = () => (
)
interface AdminSection {
to: string
icon: React.ReactNode
mobileIcon: React.ReactNode
title: string
description: string
color: string
bgColor: string
textColor: string
}
// Mobile compact card
function MobileAdminCard({ to, mobileIcon, title, bgColor, textColor }: AdminSection) {
return (
{title}
)
}
// Desktop card
function DesktopAdminCard({ to, icon, title, description, bgColor, textColor }: AdminSection) {
return (
)
}
export default function AdminPanel() {
const { t } = useTranslation()
const adminSections: AdminSection[] = [
{
to: '/admin/dashboard',
icon: ,
mobileIcon: ,
title: t('admin.nav.dashboard'),
description: t('admin.panel.dashboardDesc'),
color: 'success',
bgColor: 'bg-emerald-500/20',
textColor: 'text-emerald-400'
},
{
to: '/admin/tickets',
icon: ,
mobileIcon: ,
title: t('admin.nav.tickets'),
description: t('admin.panel.ticketsDesc'),
color: 'warning',
bgColor: 'bg-amber-500/20',
textColor: 'text-amber-400'
},
{
to: '/admin/settings',
icon: ,
mobileIcon: ,
title: t('admin.nav.settings'),
description: t('admin.panel.settingsDesc'),
color: 'accent',
bgColor: 'bg-blue-500/20',
textColor: 'text-blue-400'
},
{
to: '/admin/apps',
icon: ,
mobileIcon: ,
title: t('admin.nav.apps'),
description: t('admin.panel.appsDesc'),
color: 'success',
bgColor: 'bg-teal-500/20',
textColor: 'text-teal-400'
},
{
to: '/admin/wheel',
icon: ,
mobileIcon: ,
title: t('admin.nav.wheel'),
description: t('admin.panel.wheelDesc'),
color: 'error',
bgColor: 'bg-rose-500/20',
textColor: 'text-rose-400'
},
{
to: '/admin/tariffs',
icon: ,
mobileIcon: ,
title: t('admin.nav.tariffs'),
description: t('admin.panel.tariffsDesc'),
color: 'info',
bgColor: 'bg-cyan-500/20',
textColor: 'text-cyan-400'
},
{
to: '/admin/servers',
icon: ,
mobileIcon: ,
title: t('admin.nav.servers'),
description: t('admin.panel.serversDesc'),
color: 'purple',
bgColor: 'bg-purple-500/20',
textColor: 'text-purple-400'
},
{
to: '/admin/broadcasts',
icon: ,
mobileIcon: ,
title: t('admin.nav.broadcasts'),
description: t('admin.panel.broadcastsDesc'),
color: 'orange',
bgColor: 'bg-orange-500/20',
textColor: 'text-orange-400'
},
{
to: '/admin/promocodes',
icon: ,
mobileIcon: ,
title: t('admin.nav.promocodes', 'Промокоды'),
description: t('admin.panel.promocodesDesc', 'Управление промокодами'),
color: 'violet',
bgColor: 'bg-violet-500/20',
textColor: 'text-violet-400'
},
{
to: '/admin/promo-offers',
icon: ,
mobileIcon: ,
title: t('admin.nav.promoOffers', 'Промопредложения'),
description: t('admin.panel.promoOffersDesc', 'Персональные скидки и предложения'),
color: 'orange',
bgColor: 'bg-orange-500/20',
textColor: 'text-orange-400'
},
{
to: '/admin/campaigns',
icon: ,
mobileIcon: ,
title: t('admin.nav.campaigns', 'Кампании'),
description: t('admin.panel.campaignsDesc', 'Рекламные кампании'),
color: 'orange',
bgColor: 'bg-orange-500/20',
textColor: 'text-orange-400'
},
{
to: '/admin/users',
icon: ,
mobileIcon: ,
title: t('admin.nav.users', 'Пользователи'),
description: t('admin.panel.usersDesc', 'Управление пользователями'),
color: 'indigo',
bgColor: 'bg-indigo-500/20',
textColor: 'text-indigo-400'
},
{
to: '/admin/payments',
icon: ,
mobileIcon: ,
title: t('admin.nav.payments', 'Платежи'),
description: t('admin.panel.paymentsDesc', 'Проверка платежей'),
color: 'lime',
bgColor: 'bg-lime-500/20',
textColor: 'text-lime-400'
},
]
return (
{/* Header - compact on mobile */}
{t('admin.panel.title')}
{t('admin.panel.subtitle')}
{/* Mobile: Compact 2-column grid */}
{adminSections.map((section) => (
))}
{/* Tablet/Desktop: List style */}
{adminSections.map((section) => (
))}
)
}