import{c as t}from"./createLucideIcon-C4f7Jwm9.js";import{r as h}from"./app-C796L9fe.js";const g=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],R=t("chevron-down",g);const w=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],H=t("layout-dashboard",w);const x=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],S=t("log-out",x);const M=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],j=t("mail",M);const _=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],D=t("menu",_);const E=[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]],Y=t("shopping-bag",E);const L=[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]],q=t("shopping-cart",L);const b=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],z=t("user",b);const N=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],I=t("x",N);function V({open:o,onOpen:d,onClose:l,edgeThreshold:y=24,swipeThreshold:k=70,enabled:p=!0}){const a=h.useRef(null),s=h.useRef(null),c=h.useRef(!1);h.useEffect(()=>{if(!p||typeof window>"u")return;const v=e=>!!e?.closest('button, a, input, textarea, select, label, [data-swipe-ignore="true"]'),f=e=>{if(e.touches.length!==1||v(e.target))return;const n=e.touches[0],r=n.clientX<=y,i=o&&n.clientX<=window.innerWidth*.75;!r&&!i||(c.current=!0,a.current=n.clientX,s.current=n.clientY)},m=e=>{if(!c.current||a.current===null||s.current===null||e.touches.length!==1)return;const n=e.touches[0],r=n.clientX-a.current,i=n.clientY-s.current;if(Math.abs(i)>Math.abs(r)&&Math.abs(i)>12){c.current=!1;return}!o&&r>10&&(d(),c.current=!1),o&&r<-10&&(l(),c.current=!1)},u=()=>{c.current=!1,a.current=null,s.current=null};return document.addEventListener("touchstart",f,{passive:!0}),document.addEventListener("touchmove",m,{passive:!0}),document.addEventListener("touchend",u,{passive:!0}),document.addEventListener("touchcancel",u,{passive:!0}),()=>{document.removeEventListener("touchstart",f),document.removeEventListener("touchmove",m),document.removeEventListener("touchend",u),document.removeEventListener("touchcancel",u)}},[p,y,o,l,d,k])}export{R as C,S as L,j as M,Y as S,z as U,I as X,q as a,D as b,H as c,V as u};
