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

/** «مالی» group root — the weekly payout dashboard. */
export default function AdminFinancePage() {
  const t = useTranslations('hub');
  const tn = useTranslations('nav');
  const caps = useAdminCapabilities();

  return (
    <AdminGroupHub
      title={tn('group_finance')}
      subtitle={t('admin_finance_subtitle')}
      consoles={[
        {
          title: tn('payouts'),
          subtitle: t('admin_payouts_sub'),
          icon: 'earnings',
          path: ROUTES.ADMIN_PAYOUTS,
          enabled: caps.canPayout,
        },
      ]}
    />
  );
}
