export type MegamenuVariant = "main" | "blog";

export type MegamenuIds = {
  searchDropdownId: string;
  searchInputDesktopId: string;
  searchInputMobileId: string;
  mobileMainPanelId: string;
  mobileMainTitleId: string;
  myOrangePanelId: string;
  myOrangeTitleId: string;
};

export const getMegamenuIds = (variant: MegamenuVariant): MegamenuIds => {
  if (variant === "blog") {
    return {
      searchDropdownId: "megamenu-blog-search",
      searchInputDesktopId: "megamenu-blog-search-input",
      searchInputMobileId: "megamenu-blog-mobile-search-input",
      mobileMainPanelId: "megamenu-blog-mobile-main",
      mobileMainTitleId: "mobile-blog-menu-title",
      myOrangePanelId: "megamenu-blog-mobile-my-orange",
      myOrangeTitleId: "mobile-blog-my-orange-title",
    };
  }

  return {
    searchDropdownId: "megamenu-search",
    searchInputDesktopId: "megamenu-search-input",
    searchInputMobileId: "megamenu-mobile-search-input",
    mobileMainPanelId: "megamenu-mobile-main",
    mobileMainTitleId: "mobile-menu-title",
    myOrangePanelId: "megamenu-mobile-my-orange",
    myOrangeTitleId: "mobile-my-orange-title",
  };
};
