'use client';
import { useTranslations } from 'next-intl';
import { ROUTES } from '@/constants';
import { useAdminCapabilities } from '@/hooks';
import AdminGroupHub from '../_hub/AdminGroupHub';

/** «پشتیبانی» group root — the global ticket queue and the internal alert worklist. */
export default function AdminSupportPage() {
  const t = useTranslations('hub');
  const tn = useTranslations('nav');
  const caps = useAdminCapabilities();

  return (
    <AdminGroupHub
      title={tn('group_support')}
      subtitle={t('admin_support_subtitle')}
      consoles={[
        {
          title: tn('tickets'),
          subtitle: t('admin_tickets_sub'),
          icon: 'support',
          path: ROUTES.ADMIN_TICKETS,
          enabled: caps.canManageTickets,
        },
        {
          title: tn('alerts'),
          subtitle: t('admin_alerts_sub'),
          icon: 'alerts',
          path: ROUTES.ADMIN_ALERTS,
          enabled: caps.canManageAlerts,
        },
      ]}
    />
  );
}
