import Link from 'next/link';

const TABS = [
  { href: '/admin/accounts', label: 'Ledger' },
  { href: '/admin/accounts/stock', label: 'Stock' },
  { href: '/admin/accounts/purchases', label: 'Purchases' },
  { href: '/admin/accounts/expenses', label: 'Expenses' },
  { href: '/admin/accounts/reports', label: 'Reports' },
] as const;

export default function AccountsNav({ active }: { active: (typeof TABS)[number]['href'] }) {
  return (
    <div className="mt-4 inline-flex border border-line">
      {TABS.map((tab) => (
        <Link
          key={tab.href}
          href={tab.href}
          className={`px-4 py-1.5 text-sm ${active === tab.href ? 'bg-ink text-paper' : 'hover:text-clay'}`}
        >
          {tab.label}
        </Link>
      ))}
    </div>
  );
}
