import{r as l,c as s,a as e,t as v,i as w,g as h,u as c,b as y,f as u,n as b,F as k,o as a,l as x}from"./app-a39c937f.js";import z from"./Menu-bdf286ac.js";import{_ as B}from"./ProfileModal-61a09d92.js";import"./Modal-df1e3aae.js";import"./transition-37a067aa.js";import"./hidden-695af094.js";import"./use-text-value-d1d229e7.js";import"./micro-task-89dcd6af.js";import"./LangToggle-edfcdcaa.js";import"./FormInput-4b7fa008.js";import"./FormPhoneInput-1c9c9926.js";/* empty css                      */import"./FormSelect-c7672027.js";import"./index-8758cb17.js";import"./tabs-86fdd039.js";const C={key:0,class:"sticky top-0 z-10 w-full bg-white border-b px-4 py-4 flex items-center justify-between md:hidden"},M={class:"text-xl font-semibold"},S={class:"flex flex-col h-full w-full bg-white"},I={__name:"MobileSidebar",props:{title:{type:String},displayTopBar:{type:Boolean,default:!0},displayCreateBtn:{type:Boolean},user:{type:Object,required:!0},config:{type:Array,required:!0},organization:{type:Object,required:!0},organizations:{type:Object,required:!0}},setup(p){const o=p,r=l(!1),i=l(!1),d=()=>{r.value=!1};function m(){i.value=!0,r.value=!1}const f=()=>{i.value=!1};return(g,t)=>(a(),s(k,null,[o.displayTopBar===!0?(a(),s("div",C,[e("div",null,[e("span",{onClick:t[0]||(t[0]=n=>r.value=!0)},t[3]||(t[3]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"2em",height:"2em",viewBox:"0 0 24 24"},[e("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 17h8m-8-5h14M5 7h8"})],-1)]))]),e("h3",M,v(o.title),1),e("div",null,[o.displayCreateBtn?(a(),w(c(x),{key:0,href:g.$page.url+"/create"},{default:h(()=>t[4]||(t[4]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"2em",height:"2em",viewBox:"0 0 20 20"},[e("path",{fill:"currentColor",d:"M10 6.5a4.5 4.5 0 1 1-9 0a4.5 4.5 0 0 1 9 0m-4-2a.5.5 0 0 0-1 0V6H3.5a.5.5 0 0 0 0 1H5v1.5a.5.5 0 0 0 1 0V7h1.5a.5.5 0 0 0 0-1H6zm6 .5h-1.207a5.466 5.466 0 0 0-.393-1H12a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1.257c.307.253.642.474 1 .657v.6a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1M6 16a2 2 0 0 1-1.732-1H12a3 3 0 0 0 3-3V6.268A2 2 0 0 1 16 8v4a4 4 0 0 1-4 4zm2 2a2 2 0 0 1-1.732-1H12a5 5 0 0 0 5-5V8.268A2 2 0 0 1 18 10v2a6 6 0 0 1-6 6z"})],-1)])),_:1},8,["href"])):(a(),s("span",{key:1,onClick:m},t[5]||(t[5]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"2em",height:"2em",viewBox:"0 0 24 24"},[e("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5"},[e("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10s10-4.477 10-10S17.523 2 12 2"}),e("path",{d:"M4.271 18.346S6.5 15.5 12 15.5s7.73 2.846 7.73 2.846M12 12a3 3 0 1 0 0-6a3 3 0 0 0 0 6"})])],-1)])))])])):y("",!0),e("aside",{class:b(["transform top-0 left-0 w-full bg-white fixed h-full overflow-auto ease-in-out transition-all duration-300 z-30",r.value?"translate-x-0":"-translate-x-full"])},[e("aside",S,[u(z,{isSidebarOpen:r.value,config:o.config,user:o.user,organization:o.organization,organizations:o.organizations,onCloseSidebar:t[1]||(t[1]=n=>d())},null,8,["isSidebarOpen","config","user","organization","organizations"])])],2),u(B,{user:o.user,organization:o.organization,isOpen:i.value,role:"user",onClose:t[2]||(t[2]=n=>f())},null,8,["user","organization","isOpen"])],64))}};export{I as default};
