'use client';
import{jsx as e,jsxs as r}from"react/jsx-runtime";import t from"next/link";import{cls as l,getGlobalColorStateClass as p,getGlobalColorStateStyle as o}from"@gem-sdk/core";import i from"./NavigationMenu.js";import n from"../../text/components/Text.js";let DropdownMenu=({setting:g={},styles:s})=>{let{data:a}=g;return e("div",{className:"gp-flex gp-justify-center",children:e("div",{className:"gp-inline-flex gp-items-center",children:a?.ROOT?.childrens?.map(g=>r("div",{className:"gp-group gp-relative gp-mx-4 gp-flex gp-cursor-pointer gp-items-center gp-bg-transparent gp-py-4",children:[r("div",{children:[e(t,{href:a?.[g]?.link??"",children:e(n,{styles:s,setting:{htmlTag:"span",text:a?.[g]?.title,excludeFlex:!0}})}),!!a?.[g]?.childrens?.length&&e("span",{className:l("gp-ml-1.5 gp-inline-flex gp-transition-all gp-duration-[300ms] group-hover:gp-rotate-180",p("text",s?.color)),style:{...o("c",s?.color)},children:e("svg",{width:"14",height:"7",viewBox:"0 0 15 8",fill:"currentColor",children:e("path",{d:"M7.4995 8C7.22536 8 6.95108 7.90234 6.74217 7.70703L0.313881 1.70703C-0.104627 1.31641 -0.104627 0.683594 0.313881 0.292969C0.732389 -0.0976562 1.41037 -0.0976562 1.82888 0.292969L7.4995 5.5875L13.1711 0.29375C13.5896 -0.0968752 14.2676 -0.0968752 14.6861 0.29375C15.1046 0.684375 15.1046 1.31719 14.6861 1.70781L8.25783 7.70781C8.04858 7.90312 7.77404 8 7.4995 8Z",fill:"currentColor"})})})]}),e("div",{className:"gp-absolute gp-top-full gp-mt-2 gp-hidden gp-cursor-default gp-bg-white gp-pb-3 gp-pt-4 before:gp-absolute before:gp-bottom-full before:gp-h-2 before:gp-w-full group-hover:gp-block",children:!!a?.[g]?.childrens?.length&&e(i,{data:a,menu:a?.[g]?.childrens,styles:s})})]},g))})})};export{DropdownMenu as default};
