type NavItem = {
  id: string;
  text: string;
  href: string;
};

export function getContractSubnav(
  productName: string | undefined | null,
  customerId: string | undefined,
  contractId: string,
): NavItem[] {
  const Overview = {
    id: 'overview',
    text: 'common:hero.overview',
    href: `/beta/${customerId}/askriftir/${contractId}`,
  };
  const Settings = {
    id: 'settings',
    text: 'common:hero.settings',
    href: `/beta/${customerId}/askriftir/${contractId}/stillingar`,
  };

  const PaymentHistory = {
    id: 'paymentHistory',
    text: 'common:hero.payedHistory',
    href: `/beta/${customerId}/askriftir/${contractId}/greidslusaga`,
  };

  const History = {
    id: 'history',
    text: 'common:hero.history',
    href: `/beta/${customerId}/askriftir/${contractId}/sagan`,
  };

  switch (productName) {
    case 'AlltSaman':
      return [Overview, PaymentHistory, Settings];
      break;
    case 'Ljósleiðari':
      return [Overview, History];
      break;
    default:
      return [Overview];
      break;
  }
}
