'use client';
import{jsx as e,Fragment as t,jsxs as l}from"react/jsx-runtime";import r from"next/link";import{cls as i,getGlobalColorStateClass as p,getGlobalColorStateStyle as n}from"@gem-sdk/core";import o from"./SubNavigationMenu.js";import g from"../../text/components/Text.js";let NavigationMenu=({data:c,menu:s,styles:a})=>e(t,{children:s?.map(t=>l("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:[l("div",{className:"gp-flex gp-items-center gp-truncate gp-pr-10",children:[e(r,{href:c?.[t]?.link??"",children:e(g,{styles:a,setting:{htmlTag:"span",text:c?.[t]?.title,excludeFlex:!0}})}),!!c?.[t]?.childrens?.length&&e("span",{className:i("custom-menu-icon gp-absolute gp-right-0 gp-hidden group-hover:gp-inline-block",p("text",a?.color)),style:{...n("c",a?.color)},children:e("svg",{width:16,height:16,viewBox:"0 0 256 512",fill:"currentColor",children:e("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"})})})]}),!!c?.[t]?.childrens?.length&&e("div",{className:"gp-absolute gp-left-full gp-top-0 gp-hidden gp-flex-col gp-bg-white group-hover:gp-flex",children:e(o,{data:c,menu:c?.[t]?.childrens,styles:a})})]},t))});export{NavigationMenu as default};
