| Current Path : /home/users/unlimited/www/whatsapp-crm/public/build/assets/ |
| Current File : /home/users/unlimited/www/whatsapp-crm/public/build/assets/MobileSidebar-64958b6d.js |
import{r as l,c as i,a as e,t as g,h as m,f as v,u as w,b as _,e as u,n as y,F as b,o as s,l as k}from"./app-43851608.js";import x from"./Menu-7a7609fd.js";import{_ as z}from"./ProfileModal-628e5b7c.js";import"./Modal-22a49fae.js";import"./LangToggle-8d05b0dc.js";import"./FormInput-4a309017.js";const B={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"},C=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),M=[C],S={class:"text-xl font-semibold"},O=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),V=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),H=[V],j={class:"flex flex-col h-full w-full bg-white"},D={__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(d){const t=d,a=l(!1),r=l(!1),p=()=>{a.value=!1};function f(){r.value=!0,a.value=!1}const c=()=>{r.value=!1};return(h,o)=>(s(),i(b,null,[t.displayTopBar===!0?(s(),i("div",B,[e("div",null,[e("span",{onClick:o[0]||(o[0]=n=>a.value=!0)},M)]),e("h3",S,g(t.title),1),e("div",null,[t.displayCreateBtn?(s(),m(w(k),{key:0,href:h.$page.url+"/create"},{default:v(()=>[O]),_:1},8,["href"])):(s(),i("span",{key:1,onClick:f},H))])])):_("",!0),e("aside",{class:y(["transform top-0 left-0 w-full bg-white fixed h-full overflow-auto ease-in-out transition-all duration-300 z-30",a.value?"translate-x-0":"-translate-x-full"])},[e("aside",j,[u(x,{isSidebarOpen:a.value,config:t.config,user:t.user,organization:t.organization,organizations:t.organizations,onCloseSidebar:o[1]||(o[1]=n=>p())},null,8,["isSidebarOpen","config","user","organization","organizations"])])],2),u(z,{user:t.user,organization:t.organization,isOpen:r.value,role:"user",onClose:o[2]||(o[2]=n=>c())},null,8,["user","organization","isOpen"])],64))}};export{D as default};