"use client";import{a as x}from"./chunk-VEUVLMJO.mjs";import{a as h,b as P}from"./chunk-3TBBNSCU.mjs";import"./chunk-QHIWJPL6.mjs";import{a as b}from"./chunk-EIQPM3DQ.mjs";import{a as C}from"./chunk-JNIJ5N3Y.mjs";import{a as N,c as r}from"./chunk-S7CSCIW4.mjs";import"./chunk-JZXLCA2E.mjs";import{useCallback as B,useState as J}from"react";import{UniformText as K}from"@uniformdev/canvas-next-rsc/component";import{UniformSlot as $}from"@uniformdev/canvas-next-rsc/component";import{jsx as p}from"react/jsx-runtime";var G=({isOpen:o,backgroundColor:t,context:e,slots:a,border:i})=>p("div",{className:r("absolute left-0 max-w-64 z-10 pt-4",{hidden:!o,block:o}),children:p("div",{className:r({[`bg-${t}`]:!!t,[N(i,"{value}")]:i}),children:p("div",{className:"flex flex-col gap-y-4 p-4",children:p($,{data:e,slot:a.links,context:e})})})});import{useEffect as z,useState as A}from"react";import{UniformSlot as T}from"@uniformdev/canvas-next-rsc/component";import{jsx as l,jsxs as q}from"react/jsx-runtime";var V=()=>{let[o,t]=A(0);return z(()=>{let e=document.getElementById("mobile-header");e&&t(e.offsetHeight)},[]),o},k=({isOpen:o,backgroundColor:t,context:e,slots:a,onClose:i})=>{let n=V();return q("div",{style:{top:n},className:r("fixed left-0 right-0 bottom-0 z-10 w-full pt-4",{[`bg-${t}`]:!!t,hidden:!o,block:o}),children:[l("button",{onClick:i,className:"w-max rotate-180 px-4",children:l(h,{})}),l("div",{className:"flex flex-col items-center gap-y-4 p-4",children:l(T,{data:e,slot:a.links,context:e})})]})};var y=({isOpen:o})=>r("transition transform hidden md:block",{"rotate-180":o,"rotate-0":!o}),I=({color:o})=>r("flex items-center gap-x-2",{[`text-${o}`]:!!o});import{jsx as s,jsxs as F}from"react/jsx-runtime";var go=({icon:o,backgroundColor:t,border:e,size:a,tag:i,color:n,weight:H,font:w,transform:M,decoration:D,letterSpacing:O,alignment:S,component:E,context:m,slots:v})=>{let[c,d]=J(!1),f=B(()=>d(!0),[]),u=B(()=>d(!1),[]),[L]=C(o),{url:g,title:U=""}=L||{};return F("div",{className:"relative",onMouseLeave:u,children:[F("button",{onMouseEnter:f,onClick:f,className:I({color:n}),children:[s(x,{icon:g&&s(b,{src:g,alt:U,fill:!0}),size:a,tag:i,color:n,weight:H,font:w,transform:M,decoration:D,letterSpacing:O,alignment:S,children:s(K,{placeholder:"Text goes here",parameterId:"text",component:E,context:m})}),s("div",{className:y({isOpen:c}),children:s(P,{})})]}),s("div",{className:"hidden md:block",children:s(G,{isOpen:c,backgroundColor:t,context:m,slots:v,border:e})}),s("div",{className:"block md:hidden",children:s(k,{onClose:u,isOpen:c,backgroundColor:t,context:m,slots:v})})]})};export{go as NavigationGroup};
