import { FooterDropdownMenu } from "./navigationtabs";
import { ChevronUp, User2 } from "lucide-react";

const recordOfficerFooters: FooterDropdownMenu | null = {
  label: "Settings",
  triggerIcon: ChevronUp,
  items: [
    {
      label: "Settings",
      href: "#/officersettings",
    },
    {
      label: "Letter Templates",
      href: "#/letterTemplates",
    },
  ],
};
const userFooters = (permissions: string[]): FooterDropdownMenu => {
  const dropDown: FooterDropdownMenu = {
    icon: User2,
    label: "Settings",
    triggerIcon: ChevronUp,
    items: [
      {
        label: "Sign out",
        action: () => {},
      },
      { label: "Delegation", href: "#/delegation" },
    ],
  };
  if (permissions.includes("")) {
    dropDown.items.push({
      label: "Upload Teeter and Signature",
      href: "#/uploadTeeterandSignature",
    });
  }

  return dropDown;
};
export const footerItems = (
  permissions: string[]
): FooterDropdownMenu | null => {
  if (permissions.includes("can:dispatchRecords")) {
    return recordOfficerFooters;
  } else {
    return userFooters(permissions);
  }
};
