import React from 'react';
import { LinkProps as StaffLinkProps } from '@nova-hf/ui/umd/ts/src/sidemenu/StaffMenuLink';
import Link from 'next/link';
import Profile from 'store/models/Profile';

export const staffMenuLinksFirstLevel = (
  ssn: string,
): Array<Omit<StaffLinkProps, 'isStaffMenuOpen'>> => {
  return [
    {
      text: 'Leiðrétting',
      href: `https://innri.tankar.local/leidretting/velja/${ssn}`,
      openInNewTab: true,
    },
    {
      text: 'Uppfletting',
      isLink: true,
      wrapper: (link) => (
        <Link href={'/staff/uppflettingar'} passHref legacyBehavior>
          {link}
        </Link>
      ),
    },
    {
      text: 'Zendesk',
      href: 'https://novadesk.zendesk.com/agent/dashboard',
      openInNewTab: true,
    },
    {
      text: 'Hjálpin',
      href: 'https://support.nova.is/hc/is',
      openInNewTab: true,
    },
    {
      text: 'VIP',
      href: 'https://innri.nova.is/vipfyrirtaeki',
      openInNewTab: true,
    },
    {
      text: 'Viðskiptakjör',
      href: `https://innri.nova.is/breyta/vidskiptakjor/${ssn}`,
      openInNewTab: true,
    },
    {
      text: 'Skrá aukakort',
      href: 'https://innri.nova.is/farsimi/askrift/allt-pakkid/komdu/1',
      openInNewTab: true,
    },
    {
      text: 'Skrá mál',
      href: `https://portal.nova.is/skra-mal?&kt=${ssn}`,
      openInNewTab: true,
    },
  ];
};

export const staffMenuLinksSecondLevel = ({
  ssn,
  subscriptionId,
  title,
  accountSsn,
}: Profile): Array<Omit<StaffLinkProps, 'isStaffMenuOpen'>> => {
  return [
    {
      text: 'Skráð mál á notanda',
      href: `https://novadesk.zendesk.com/agent/search/1?type=user&q=external_id%3A${ssn}`,
      openInNewTab: true,
    },
    {
      text: 'Skráð mál á greiðanda',
      href: `https://novadesk.zendesk.com/agent/search/1?type=user&q=external_id%3A${accountSsn}`,
      openInNewTab: true,
    },
    {
      text: 'Breyta greiðanda',
      href: `https://innri.nova.is/breyta/greidandi/${subscriptionId}`,
      openInNewTab: true,
    },
    {
      text: 'Ótakm. net með Ljósleiðara',
      href: `https://innri.nova.is/farsimi/askrift/netnet/${accountSsn}/${ssn}/${title}/komdu/1`,
      openInNewTab: true,
    },
    {
      text: 'Saga',
      href: `https://portal.nova.is/${ssn}/sagan`,
      openInNewTab: true,
    },
    {
      text: 'Yfirlitsmynd',
      href: `https://innri.nova.is/stollinnweb/?msisdn=${title}&ossId=${subscriptionId}`,
      openInNewTab: true,
    },
    {
      text: 'Leiðrétting á númeri',
      href: `https://portal.nova.is/${ssn}/thjonusta/${subscriptionId}/leidretting?step=1`,
      openInNewTab: true,
    },
    {
      text: 'Leiðrétting á kennitölu',
      href: `https://innri.tankar.local/leidretting/velja/${ssn}`,
      openInNewTab: true,
    },
    {
      text: 'Skrá tæki í viðgerð',
      href: `https://innri.nova.is/vidgerd?msisdn=${subscriptionId}`,
      openInNewTab: true,
    },
    {
      text: 'Tilboð',
      href: `https://customeractions.nova.is/Offer/?msisdn=${subscriptionId}`,
      openInNewTab: true,
    },

    {
      text: 'Segja upp',
      href: `https://fiberresign.nova.is/?msisdn=${title}`,
      openInNewTab: true,
    },
  ];
};
