import{d as C,c as u,g as k,a as E,f as v,u as N,i as s,b as y,h as S,r as D,t as L}from"./web.4OCuPnM3.js";import{C as z}from"./CaretDown.ClI4lLwN.js";var A=L('<div><button type=button class="flex items-center gap-x-1 leading-6"aria-expanded=false><!$><!/><span class="transition-all duration-500"></span></button><div><div class="p-1 px-2 lg:p-4 flex flex-col gap-1 ">');const M=({label:m,pop:n,justify:r="center",children:p,className:$})=>{const[i,b]=u(),[l,o]=u(!1);return window.addEventListener("click",t=>{t.target!==i()&&o(!1)}),(()=>{var t=k(A),a=t.firstChild,h=a.firstChild,[c,w]=E(h.nextSibling),d=c.nextSibling,f=a.nextSibling,_=f.firstChild;return v(t,`relative flex flex-col ${$??""}`),a.$$click=e=>{i()?.setAttribute("clicked",`${!l()}`),o(!l())},N(e=>b(e),a),s(a,m,c,w),s(d,y(z,{className:"h-5 w-5 flex-none text-gray-600"})),s(_,p),S(e=>{var g=!!l(),x=`z-10 transition-all duration-[900ms] ${n?"absolute rounded-3xl ring-gray-900/5":""} ${l()?(r==="left"?"!left-0 translate-x-[50%]":r==="right"?"!right-0 translate-x-[-50%]":"!left-0")+(n?"mt-3 ring-1 top-full shadow-lg bg-white":""):"h-0 scale-50 opacity-0 overflow-hidden"}`;return g!==e.e&&d.classList.toggle("rotate-180",e.e=g),x!==e.t&&v(f,e.t=x),e},{e:void 0,t:void 0}),D(),t})()};C(["click"]);export{M as default};
