'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),Link=require("next/link"),core=require("@gem-sdk/core"),SubNavigationMenu=require("./SubNavigationMenu.js"),Text=require("../../text/components/Text.js");const NavigationMenu=({data:e,menu:t,styles:i})=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:t?.map(t=>jsxRuntime.jsxs("div",{className:"gp-group gp-relative gp-flex gp-h-10 gp-max-w-[256px] gp-cursor-pointer gp-items-center gp-pl-4 gp-transition-all gp-duration-[200ms]",children:[jsxRuntime.jsxs("div",{className:"gp-flex gp-items-center gp-truncate gp-pr-10",children:[jsxRuntime.jsx(Link,{href:e?.[t]?.link??"",children:jsxRuntime.jsx(Text.default,{styles:i,setting:{htmlTag:"span",text:e?.[t]?.title,excludeFlex:!0}})}),!!e?.[t]?.childrens?.length&&jsxRuntime.jsx("span",{className:core.cls("custom-menu-icon gp-absolute gp-right-0 gp-hidden group-hover:gp-inline-block",core.getGlobalColorStateClass("text",i?.color)),style:{...core.getGlobalColorStateStyle("c",i?.color)},children:jsxRuntime.jsx("svg",{width:16,height:16,viewBox:"0 0 256 512",fill:"currentColor",children:jsxRuntime.jsx("path",{fill:"currentColor",d:"M64 448c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L178.8 256L41.38 118.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l160 160c12.5 12.5 12.5 32.75 0 45.25l-160 160C80.38 444.9 72.19 448 64 448z"})})})]}),!!e?.[t]?.childrens?.length&&jsxRuntime.jsx("div",{className:"gp-absolute gp-left-full gp-top-0 gp-hidden gp-flex-col gp-bg-white group-hover:gp-flex",children:jsxRuntime.jsx(SubNavigationMenu.default,{data:e,menu:e?.[t]?.childrens,styles:i})})]},t))});exports.default=NavigationMenu;
