'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"),NavigationMenu=require("./NavigationMenu.js"),Text=require("../../text/components/Text.js");const DropdownMenu=({setting:e={},styles:t})=>{let{data:r}=e;return jsxRuntime.jsx("div",{className:"gp-flex gp-justify-center",children:jsxRuntime.jsx("div",{className:"gp-inline-flex gp-items-center",children:r?.ROOT?.childrens?.map(e=>jsxRuntime.jsxs("div",{className:"gp-group gp-relative gp-mx-4 gp-flex gp-cursor-pointer gp-items-center gp-bg-transparent gp-py-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Link,{href:r?.[e]?.link??"",children:jsxRuntime.jsx(Text.default,{styles:t,setting:{htmlTag:"span",text:r?.[e]?.title,excludeFlex:!0}})}),!!r?.[e]?.childrens?.length&&jsxRuntime.jsx("span",{className:core.cls("gp-ml-1.5 gp-inline-flex gp-transition-all gp-duration-[300ms] group-hover:gp-rotate-180",core.getGlobalColorStateClass("text",t?.color)),style:{...core.getGlobalColorStateStyle("c",t?.color)},children:jsxRuntime.jsx("svg",{width:"14",height:"7",viewBox:"0 0 15 8",fill:"currentColor",children:jsxRuntime.jsx("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"})})})]}),jsxRuntime.jsx("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:!!r?.[e]?.childrens?.length&&jsxRuntime.jsx(NavigationMenu.default,{data:r,menu:r?.[e]?.childrens,styles:t})})]},e))})})};exports.default=DropdownMenu;
