import{h as L,o as e,c as n,F as u,r as p,n as v,t as h,i as k,j as _,k as d,e as x,Q as T,u as $,b as o,m as S,a as C,a4 as V}from"./app-13978987.js";const I={class:"submenu"},O=["href"],j={__name:"SubMenu",props:{children:{type:[Array,Object]}},setup(m){return(f,c)=>{const y=L("Link");return e(),n("ul",I,[(e(!0),n(u,null,p(m.children,t=>{var s,r;return e(),n("li",{key:t.id,class:v({dropdown:((s=t.children)==null?void 0:s.length)>0})},[t.target=="_top"?(e(),n("a",{key:0,href:t.href??"#"},h(t.text),9,O)):(e(),k(y,{key:1,href:t.href??"#",target:t.target},{default:_(()=>[d(h(t.text),1)]),_:2},1032,["href","target"])),((r=t.children)==null?void 0:r.length)>0?(e(),k(j,{key:2,children:t.children,class:"second-level"},null,8,["children"])):x("",!0)],2)}),128))])}}},Q={key:0,id:"mobile-menu"},W={__name:"NavMenu",setup(m){const f=T().props.menus.filter(c=>c.position==="main-menu")[0];return(c,y)=>{const t=L("Link");return $(f)?(e(),n("nav",Q,[o("ul",null,[(e(!0),n(u,null,p($(f).data??[],s=>{var r;return e(),n("li",{key:s.id},[s.href?(e(),k(t,{key:0,href:s.href,target:s.target,role:"button"},{default:_(()=>[d(h(s.text),1)]),_:2},1032,["href","target"])):(e(),k(t,{key:1,href:"#"},{default:_(()=>[d(h(s.text),1)]),_:2},1024)),((r=s.children)==null?void 0:r.length)>0?(e(),k(j,{key:2,children:s.children,class:"first-level"},null,8,["children"])):x("",!0)])}),128))])])):x("",!0)}}},q={class:"mean-nav"},G=["onClick"],H=o("i",{class:"fal fa-plus"},null,-1),J=[H],K=["onClick"],P=o("i",{class:"fal fa-plus"},null,-1),R=[P],X={__name:"MobileMenu",emits:["closeMobileMenu"],setup(m,{emit:f}){var w;const c=T().props.menus.filter(l=>l.position==="main-menu")[0],y=(w=(c==null?void 0:c.data)??[])==null?void 0:w.map(l=>{var M;return{id:l.id,has_dropdown:!!((M=l.children)!=null&&M.length),text:l.text,href:l.href,sub_menus:l.children}}),t=S(""),s=l=>{t.value===l?t.value="":t.value=l},r=S(""),z=l=>{r.value===l?r.value="":r.value=l},F=f,g=()=>{F("closeMobileMenu")};return(l,M)=>{const b=L("Link");return e(),n("nav",q,[o("ul",null,[(e(!0),n(u,null,p($(y),(a,A)=>(e(),n("li",{key:A,class:v(`${a.has_dropdown?"has-dropdowns":""}`)},[C(b,{href:a.href,onClick:g},{default:_(()=>[d(h(a.text),1)]),_:2},1032,["href"]),a.has_dropdown?(e(),n(u,{key:0},[o("ul",{class:"submenu",style:V(`display: ${t.value===a.text?"block":"none"}`)},[(e(!0),n(u,null,p(a.sub_menus,(i,D)=>{var N;return e(),n("li",{key:D},[C(b,{onClick:g,href:i.href},{default:_(()=>[d(h(i.text),1)]),_:2},1032,["href"]),((N=i.children)==null?void 0:N.length)>0?(e(),n(u,{key:0},[o("ul",{class:"submenu",style:V(`display: ${r.value===i.text?"block":"none"}`)},[(e(!0),n(u,null,p(i.children,(B,E)=>(e(),n("li",{key:E},[C(b,{onClick:g,href:B.href},{default:_(()=>[d(h(B.text),1)]),_:2},1032,["href"])]))),128))],4),o("a",{class:v(`mean-expand ${r.value===i.text?"mean-clicked":""}`),onClick:()=>z(i.text),href:"#"},J,10,G)],64)):x("",!0)])}),128))],4),o("a",{class:v(`mean-expand ${t.value===a.text?"mean-clicked":""}`),onClick:()=>s(a.text),href:"#"},R,10,K)],64)):x("",!0)],2))),128))])])}}};export{W as _,X as a};
