UNPKG

@xo-union/tk-component-header-nav

Version:
182 lines • 8.85 kB
import React from "react"; import { MegaMenu, LinkSection, FeaturedSection, FeaturedUnitCard, MainCategoryPrimaryLink, LinkColumn, MainCategoryLinkMenu, SubCategoryLink, SeeAllSubCategoryLink } from "../../MegaMenu/index.js"; import { useHeaderNavContext } from "../../Context.js"; import { layout4LinkColsAnd4SmallFeaturedUnits } from "../layouts.js"; const RegistryMegaMenu = () => { const { menuTypes, loggedIn, links, imageIds } = useHeaderNavContext(); const loggedOutLinks = /*#__PURE__*/React.createElement(MainCategoryPrimaryLink, { href: links.START_A_REGISTRY }, "Start a registry"); const loggedInLinks = /*#__PURE__*/React.createElement(MainCategoryLinkMenu, { id: "your-registry", headingContent: "Your registry", href: links.YOUR_REGISTRY, isOpenByDefault: true }, /*#__PURE__*/React.createElement(SubCategoryLink, { leftIcon: "overview", href: links.YOUR_REGISTRY }, "Overview"), /*#__PURE__*/React.createElement(SubCategoryLink, { leftIcon: "compass", href: links.DISCOVER }, "Discover"), /*#__PURE__*/React.createElement(SubCategoryLink, { leftIcon: "checklist", href: links.REGISTRY_CHECKLIST }, "Registry checklist"), /*#__PURE__*/React.createElement(SubCategoryLink, { leftIcon: "edit", href: links.MANAGE_REGISTRY }, "Manage registry"), /*#__PURE__*/React.createElement(SubCategoryLink, { leftIcon: "registry", href: links.TRACK_GIFTS }, "Track gifts"), /*#__PURE__*/React.createElement(SubCategoryLink, { leftIcon: "settings", href: links.REGISTRY_SETTINGS }, "Registry settings")); return /*#__PURE__*/React.createElement(MegaMenu, { menuID: menuTypes.REGISTRY, containerProps: { 'data-trackable-context-group': 'registry' }, layout: layout4LinkColsAnd4SmallFeaturedUnits }, /*#__PURE__*/React.createElement(LinkSection, { headingContent: "Registry", headingTextProps: { href: links.REGISTRY } }, /*#__PURE__*/React.createElement(LinkColumn, null, loggedIn ? loggedInLinks : loggedOutLinks, /*#__PURE__*/React.createElement(MainCategoryPrimaryLink, { href: loggedIn ? links.ADD_STORE_REGISTRIES_LOGGED_IN : links.ADD_STORE_REGISTRIES_LOGGED_OUT }, "Add store registries"), /*#__PURE__*/React.createElement(MainCategoryPrimaryLink, { href: loggedIn ? links.THE_KNOT_CASH_FUNDS_LOGGED_IN : links.THE_KNOT_CASH_FUNDS_LOGGED_OUT }, loggedIn ? 'Add cash funds' : 'Cash funds'), /*#__PURE__*/React.createElement(MainCategoryPrimaryLink, { href: links.FIND_A_COUPLES_REGISTRY }, "Find a couple's registry")), /*#__PURE__*/React.createElement(LinkColumn, null, /*#__PURE__*/React.createElement(MainCategoryPrimaryLink, { href: links.COLLECTIONS }, "Collections"), /*#__PURE__*/React.createElement(MainCategoryPrimaryLink, { href: links.BRANDS }, "Brands"), /*#__PURE__*/React.createElement(MainCategoryLinkMenu, { id: "registry-kitchen", headingContent: "Kitchen", href: links.KITCHEN }, /*#__PURE__*/React.createElement(SeeAllSubCategoryLink, { href: links.KITCHEN }, "All kitchen"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.APPLIANCES }, "Appliances"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.COOKWARE }, "Cookware"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.BAKEWARE }, "Bakeware"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.KNIVES_BOARDS }, "Knives & boards"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.TOOLS_GADGETS }, "Utensils & gadgets"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.STORAGE_ORGANIZATION }, "Storage"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.COFFEE_TEA }, "Coffee & tea"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.KITCHEN_LINENS }, "Kitchen linens"))), /*#__PURE__*/React.createElement(LinkColumn, null, /*#__PURE__*/React.createElement(MainCategoryLinkMenu, { id: "registry-tabletop", headingContent: "Tabletop", href: links.TABLETOP }, /*#__PURE__*/React.createElement(SeeAllSubCategoryLink, { href: links.TABLETOP }, "All tabletop"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.DINNERWARE }, "Dinnerware"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.FLATWARE }, "Flatware"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.SERVEWARE }, "Serveware & entertaining"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.DRINKWARE_BAR }, "Drinkware & bar"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.TABLE_LINENS }, "Table linens")), /*#__PURE__*/React.createElement(MainCategoryLinkMenu, { id: "registry-home", headingContent: "Home", href: links.HOME }, /*#__PURE__*/React.createElement(SeeAllSubCategoryLink, { href: links.HOME }, "All home"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.HOUSEHOLD_APPLIANCES }, "Household appliances"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.HOME_STORAGE_ORGANIZATION }, "Storage & organization"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.OUTDOOR }, "Outdoor"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.DECOR }, "D\xE9cor"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.ELECTRONICS }, "Smart home"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.FURNITURE }, "Furniture"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.RUGS_MATS }, "Rugs & mats"))), /*#__PURE__*/React.createElement(LinkColumn, null, /*#__PURE__*/React.createElement(MainCategoryLinkMenu, { id: "registry-bed-and-bath", headingContent: "Bed & bath", href: links.BED_BATH }, /*#__PURE__*/React.createElement(SeeAllSubCategoryLink, { href: links.BED_BATH }, "All bed & bath"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.BED }, "Bedding"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.BEDDING_ESSENTIALS }, "Bedding essentials"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.BATH }, "Bath")), /*#__PURE__*/React.createElement(MainCategoryLinkMenu, { id: "registry-lifestyle", headingContent: "Lifestyle", href: links.LIFESTYLE }, /*#__PURE__*/React.createElement(SeeAllSubCategoryLink, { href: links.LIFESTYLE }, "All lifestyle"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.LUGGAGE }, "Luggage & travel"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.CAMPING }, "Camping"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.ELECTRONICS_GADGETS }, "Electronics & gadgets"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.PETS }, "Pets"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.FITNESS }, "Health & wellness"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.HOME_IMPROVEMENT }, "Home improvement & DIY")), /*#__PURE__*/React.createElement(MainCategoryLinkMenu, { id: "registry-experiences", headingContent: "Gift cards & experiences", href: links.GIFT_CARDS_AND_EXPERIENCES }, /*#__PURE__*/React.createElement(SeeAllSubCategoryLink, { href: links.GIFT_CARDS_AND_EXPERIENCES }, "All gift cards & experiences"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.GIFT_CARDS }, "Gift cards"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.US_EXPERIENCES }, "U.S. experiences"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.INTERNATIONAL_EXPERIENCES }, "International experiences"), /*#__PURE__*/React.createElement(SubCategoryLink, { href: links.TYPE_EXPERIENCES }, "Experience type")))), /*#__PURE__*/React.createElement(FeaturedSection, { headingContent: "Shop The Knot Registry Store" }, /*#__PURE__*/React.createElement(FeaturedUnitCard, { linkUrl: links.REGISTRY_AWARDS, imageId: imageIds.REGISTRY_AWARDS_2025, copy: "Meet our registry awards winners" }), /*#__PURE__*/React.createElement(FeaturedUnitCard, { linkUrl: links.WEDDING_REGISTRY_ESSENTIALS, imageId: imageIds.WEDDING_REGISTRY_ESSENTIALS, copy: "Wedding registry essentials" }), /*#__PURE__*/React.createElement(FeaturedUnitCard, { linkUrl: links.REGISTRY_MOST_WANTED_GIFTS, imageId: imageIds.REGISTRY_MOST_WANTED_GIFTS, copy: "Most wanted gifts" }), /*#__PURE__*/React.createElement(FeaturedUnitCard, { alt: "Get 20% off after your wedding", linkUrl: links.TWENTY_OFF, imageId: imageIds.TWENTY_OFF }))); }; export default RegistryMegaMenu;