import{c as A,j as n,r as i,e as _e,u as Ct,aa as pe,a as I,X as We,E as K,s as Nt,_ as xe,p as J,P as H,ab as O,ac as Be,ad as Et,n as jt,q as U,J as fe,K as St,ae as kt,o as Rt,v as re,Q as At,U as Dt,Z as Mt,d as Tt,L as S}from"./index-BrJVGHG-.js";import{I as It,B as T}from"./Footer-CQVBSHrP.js";/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ye=A("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Pt=A("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ot=A("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const be=A("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const we=A("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Lt=A("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ft=A("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _t=A("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ce=A("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ne=A("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ee=A("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]]),je=({className:e="h-8",showText:t=!0})=>n.jsxs("div",{className:`flex items-center gap-2 ${e}`,children:[n.jsxs("svg",{viewBox:"0 0 100 100",className:"h-full w-auto",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("path",{d:"M50 5 L90 20 L90 50 Q90 80 50 95 Q10 80 10 50 L10 20 Z",fill:"white",stroke:"white",strokeWidth:"2"}),n.jsx("text",{x:"50",y:"58",fontFamily:"Arial, sans-serif",fontSize:"28",fontWeight:"bold",fill:"hsl(var(--primary))",textAnchor:"middle",children:"CSS"})]}),t&&n.jsx("span",{className:"text-2xl font-bold text-primary-foreground",children:"Clyper"})]}),ne="recent-searches",Se=5,Wt=()=>{const[e,t]=i.useState([]);i.useEffect(()=>{try{const l=localStorage.getItem(ne);if(l){const o=JSON.parse(l);Array.isArray(o)&&t(o.slice(0,Se))}}catch(l){console.error("Error loading recent searches:",l)}},[]);const r=i.useCallback(l=>{try{localStorage.setItem(ne,JSON.stringify(l))}catch(o){console.error("Error saving recent searches:",o)}},[]),a=i.useCallback(l=>{const o=l.trim().toLowerCase();o&&t(f=>{const h=f.filter(d=>d.toLowerCase()!==o),g=[l.trim(),...h].slice(0,Se);return r(g),g})},[r]),s=i.useCallback(l=>{t(o=>{const f=o.filter(h=>h!==l);return r(f),f})},[r]),c=i.useCallback(()=>{t([]);try{localStorage.removeItem(ne)}catch(l){console.error("Error clearing recent searches:",l)}},[]);return{recentSearches:e,addSearch:a,removeSearch:s,clearAll:c}},Bt=e=>e.toLowerCase().replace(/[ăâ]/g,"a").replace(/[îí]/g,"i").replace(/[șş]/g,"s").replace(/[țţ]/g,"t").replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"").substring(0,100),zt=e=>{const t=e.toLowerCase();return t.includes("carti")||t.includes("cărți")?"📚":t.includes("auto")?"🚗":t.includes("caini")||t.includes("câini")?"🐕":t.includes("pisici")?"🐱":t.includes("jucari")||t.includes("jucării")?"🧸":t.includes("electro")||t.includes("home")||t.includes("garden")?"🏠":t.includes("telefon")?"📱":t.includes("laptop")||t.includes("computer")?"💻":t.includes("gaming")?"🎮":t.includes("fashion")||t.includes("îmbrăcăminte")?"👕":t.includes("cosmetice")||t.includes("beauty")?"💄":t.includes("sport")?"⚽":"📦"},ke=({className:e,inputClassName:t,placeholder:r="Caută produse, branduri, categorii...",showButton:a=!0,onSearchSubmit:s})=>{const[c,l]=i.useState(""),[o,f]=i.useState(!1),[h,g]=i.useState(-1),d=_e(),x=i.useRef(null),y=i.useRef(null),{recentSearches:N,addSearch:u,removeSearch:m,clearAll:p}=Wt(),{data:w=[],isLoading:C}=Ct({queryKey:["popular-categories-search"],queryFn:async()=>{const{data:v,error:j}=await Nt.rpc("get_top_categories",{limit_count:4});if(j)throw j;return v||[]},staleTime:3e5}),b=i.useMemo(()=>w.map(v=>({name:v.name,slug:Bt(v.name),icon:zt(v.name)})),[w]);i.useEffect(()=>{const v=j=>{y.current&&!y.current.contains(j.target)&&f(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[]);const E=v=>{v.preventDefault();const j=c.trim();j&&(pe(j),u(j),f(!1),d(`/products?search=${encodeURIComponent(j)}`),s==null||s())},M=i.useCallback(v=>{pe(v),f(!1),l(""),d(`/products?search=${encodeURIComponent(v)}`),s==null||s()},[d,s]),R=i.useCallback(v=>{f(!1),l(""),d(`/categorie/${v}`),s==null||s()},[d,s]),F=i.useCallback((v,j)=>{v.stopPropagation(),m(j)},[m]),V=N.length+b.length,ge=N.length>0||b.length>0||C,wt=v=>{var j;if(!o){v.key==="Escape"&&((j=x.current)==null||j.blur());return}switch(v.key){case"ArrowDown":v.preventDefault(),g(k=>k<V-1?k+1:0);break;case"ArrowUp":v.preventDefault(),g(k=>k>0?k-1:V-1);break;case"Enter":if(h>=0)if(v.preventDefault(),h<N.length)M(N[h]);else{const k=h-N.length;R(b[k].slug)}break;case"Escape":f(!1),g(-1);break}};return n.jsxs("div",{ref:y,className:I("relative",e),children:[n.jsx("form",{onSubmit:E,className:"w-full",children:n.jsxs("div",{className:"flex gap-2",children:[n.jsx("div",{className:"relative flex-1",children:n.jsx(It,{ref:x,type:"search",placeholder:r,value:c,onChange:v=>{l(v.target.value),g(-1)},onFocus:()=>{ge&&f(!0)},onKeyDown:wt,className:I("h-12 text-lg",t),autoComplete:"off"})}),a&&n.jsxs(T,{type:"submit",size:"lg",className:"px-8",children:[n.jsx(_t,{className:"h-5 w-5 mr-2"}),"Caută"]})]})}),o&&ge&&n.jsxs("div",{className:"absolute z-50 top-full left-0 right-0 mt-1 bg-popover border border-border rounded-lg shadow-lg max-h-96 overflow-y-auto",children:[N.length>0&&n.jsxs("div",{children:[n.jsxs("div",{className:"px-3 py-2 text-xs font-semibold text-muted-foreground uppercase bg-muted/50 flex items-center justify-between",children:[n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx(ye,{className:"h-3 w-3"}),"Căutări recente"]}),n.jsx("button",{type:"button",onClick:p,className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Șterge toate"})]}),N.map((v,j)=>n.jsxs("button",{type:"button",className:I("w-full flex items-center gap-3 px-3 py-2.5 text-left hover:bg-accent transition-colors group",h===j&&"bg-accent"),onClick:()=>M(v),onMouseEnter:()=>g(j),children:[n.jsx(ye,{className:"h-4 w-4 text-muted-foreground"}),n.jsx("span",{className:"flex-1 text-sm",children:v}),n.jsx("button",{type:"button",onClick:k=>F(k,v),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-muted rounded transition-all","aria-label":`Șterge "${v}"`,children:n.jsx(We,{className:"h-3 w-3 text-muted-foreground"})})]},v))]}),n.jsxs("div",{children:[n.jsxs("div",{className:"px-3 py-2 text-xs font-semibold text-muted-foreground uppercase bg-muted/50 flex items-center gap-1.5",children:[n.jsx(Pt,{className:"h-3 w-3"}),"Categorii populare"]}),C?n.jsxs("div",{className:"px-3 py-2 space-y-2",children:[n.jsx(K,{className:"h-9 w-full"}),n.jsx(K,{className:"h-9 w-full"}),n.jsx(K,{className:"h-9 w-full"}),n.jsx(K,{className:"h-9 w-full"})]}):b.length>0?b.map((v,j)=>{const k=N.length+j;return n.jsxs("button",{type:"button",className:I("w-full flex items-center gap-3 px-3 py-2.5 text-left hover:bg-accent transition-colors",h===k&&"bg-accent"),onClick:()=>R(v.slug),onMouseEnter:()=>g(k),children:[n.jsx("span",{className:"text-base",children:v.icon}),n.jsx("span",{className:"text-sm",children:v.name})]},v.slug)}):null]})]})]})};var ae="focusScope.autoFocusOnMount",oe="focusScope.autoFocusOnUnmount",Re={bubbles:!1,cancelable:!0},Ht="FocusScope",ze=i.forwardRef((e,t)=>{const{loop:r=!1,trapped:a=!1,onMountAutoFocus:s,onUnmountAutoFocus:c,...l}=e,[o,f]=i.useState(null),h=xe(s),g=xe(c),d=i.useRef(null),x=J(t,u=>f(u)),y=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(a){let u=function(C){if(y.paused||!o)return;const b=C.target;o.contains(b)?d.current=b:P(d.current,{select:!0})},m=function(C){if(y.paused||!o)return;const b=C.relatedTarget;b!==null&&(o.contains(b)||P(d.current,{select:!0}))},p=function(C){if(document.activeElement===document.body)for(const E of C)E.removedNodes.length>0&&P(o)};document.addEventListener("focusin",u),document.addEventListener("focusout",m);const w=new MutationObserver(p);return o&&w.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",u),document.removeEventListener("focusout",m),w.disconnect()}}},[a,o,y.paused]),i.useEffect(()=>{if(o){De.add(y);const u=document.activeElement;if(!o.contains(u)){const p=new CustomEvent(ae,Re);o.addEventListener(ae,h),o.dispatchEvent(p),p.defaultPrevented||(Vt(qt(He(o)),{select:!0}),document.activeElement===u&&P(o))}return()=>{o.removeEventListener(ae,h),setTimeout(()=>{const p=new CustomEvent(oe,Re);o.addEventListener(oe,g),o.dispatchEvent(p),p.defaultPrevented||P(u??document.body,{select:!0}),o.removeEventListener(oe,g),De.remove(y)},0)}}},[o,h,g,y]);const N=i.useCallback(u=>{if(!r&&!a||y.paused)return;const m=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,p=document.activeElement;if(m&&p){const w=u.currentTarget,[C,b]=Ut(w);C&&b?!u.shiftKey&&p===b?(u.preventDefault(),r&&P(C,{select:!0})):u.shiftKey&&p===C&&(u.preventDefault(),r&&P(b,{select:!0})):p===w&&u.preventDefault()}},[r,a,y.paused]);return n.jsx(H.div,{tabIndex:-1,...l,ref:x,onKeyDown:N})});ze.displayName=Ht;function Vt(e,{select:t=!1}={}){const r=document.activeElement;for(const a of e)if(P(a,{select:t}),document.activeElement!==r)return}function Ut(e){const t=He(e),r=Ae(t,e),a=Ae(t.reverse(),e);return[r,a]}function He(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const s=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||s?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Ae(e,t){for(const r of e)if(!Kt(r,{upTo:t}))return r}function Kt(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Gt(e){return e instanceof HTMLInputElement&&"select"in e}function P(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Gt(e)&&t&&e.select()}}var De=$t();function $t(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Me(e,t),e.unshift(t)},remove(t){var r;e=Me(e,t),(r=e[0])==null||r.resume()}}}function Me(e,t){const r=[...e],a=r.indexOf(t);return a!==-1&&r.splice(a,1),r}function qt(e){return e.filter(t=>t.tagName!=="A")}var se=0;function Xt(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Te()),document.body.insertAdjacentElement("beforeend",e[1]??Te()),se++,()=>{se===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),se--}},[])}function Te(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Y="right-scroll-bar-position",Q="width-before-scroll-bar",Yt="with-scroll-bars-hidden",Qt="--removed-body-scroll-bar-size";function ie(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Zt(e,t){var r=i.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(a){var s=r.value;s!==a&&(r.value=a,r.callback(a,s))}}}})[0];return r.callback=t,r.facade}var Jt=typeof window<"u"?i.useLayoutEffect:i.useEffect,Ie=new WeakMap;function er(e,t){var r=Zt(null,function(a){return e.forEach(function(s){return ie(s,a)})});return Jt(function(){var a=Ie.get(r);if(a){var s=new Set(a),c=new Set(e),l=r.current;s.forEach(function(o){c.has(o)||ie(o,null)}),c.forEach(function(o){s.has(o)||ie(o,l)})}Ie.set(r,e)},[e]),r}function tr(e){return e}function rr(e,t){t===void 0&&(t=tr);var r=[],a=!1,s={read:function(){if(a)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(c){var l=t(c,a);return r.push(l),function(){r=r.filter(function(o){return o!==l})}},assignSyncMedium:function(c){for(a=!0;r.length;){var l=r;r=[],l.forEach(c)}r={push:function(o){return c(o)},filter:function(){return r}}},assignMedium:function(c){a=!0;var l=[];if(r.length){var o=r;r=[],o.forEach(c),l=r}var f=function(){var g=l;l=[],g.forEach(c)},h=function(){return Promise.resolve().then(f)};h(),r={push:function(g){l.push(g),h()},filter:function(g){return l=l.filter(g),r}}}};return s}function nr(e){e===void 0&&(e={});var t=rr(null);return t.options=O({async:!0,ssr:!1},e),t}var Ve=function(e){var t=e.sideCar,r=Be(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=t.read();if(!a)throw new Error("Sidecar medium not found");return i.createElement(a,O({},r))};Ve.isSideCarExport=!0;function ar(e,t){return e.useMedium(t),Ve}var Ue=nr(),ce=function(){},ee=i.forwardRef(function(e,t){var r=i.useRef(null),a=i.useState({onScrollCapture:ce,onWheelCapture:ce,onTouchMoveCapture:ce}),s=a[0],c=a[1],l=e.forwardProps,o=e.children,f=e.className,h=e.removeScrollBar,g=e.enabled,d=e.shards,x=e.sideCar,y=e.noRelative,N=e.noIsolation,u=e.inert,m=e.allowPinchZoom,p=e.as,w=p===void 0?"div":p,C=e.gapMode,b=Be(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=x,M=er([r,t]),R=O(O({},b),s);return i.createElement(i.Fragment,null,g&&i.createElement(E,{sideCar:Ue,removeScrollBar:h,shards:d,noRelative:y,noIsolation:N,inert:u,setCallbacks:c,allowPinchZoom:!!m,lockRef:r,gapMode:C}),l?i.cloneElement(i.Children.only(o),O(O({},R),{ref:M})):i.createElement(w,O({},R,{className:f,ref:M}),o))});ee.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ee.classNames={fullWidth:Q,zeroRight:Y};var or=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function sr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=or();return t&&e.setAttribute("nonce",t),e}function ir(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function cr(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var lr=function(){var e=0,t=null;return{add:function(r){e==0&&(t=sr())&&(ir(t,r),cr(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ur=function(){var e=lr();return function(t,r){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Ke=function(){var e=ur(),t=function(r){var a=r.styles,s=r.dynamic;return e(a,s),null};return t},dr={left:0,top:0,right:0,gap:0},le=function(e){return parseInt(e||"",10)||0},fr=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],a=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[le(r),le(a),le(s)]},hr=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return dr;var t=fr(e),r=document.documentElement.clientWidth,a=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,a-r+t[2]-t[0])}},mr=Ke(),z="data-scroll-locked",vr=function(e,t,r,a){var s=e.left,c=e.top,l=e.right,o=e.gap;return r===void 0&&(r="margin"),`
.`.concat(Yt,` {
overflow: hidden `).concat(a,`;
padding-right: `).concat(o,"px ").concat(a,`;
}
body[`).concat(z,`] {
overflow: hidden `).concat(a,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(a,";"),r==="margin"&&`
padding-left: `.concat(s,`px;
padding-top: `).concat(c,`px;
padding-right: `).concat(l,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(o,"px ").concat(a,`;
`),r==="padding"&&"padding-right: ".concat(o,"px ").concat(a,";")].filter(Boolean).join(""),`
}
.`).concat(Y,` {
right: `).concat(o,"px ").concat(a,`;
}
.`).concat(Q,` {
margin-right: `).concat(o,"px ").concat(a,`;
}
.`).concat(Y," .").concat(Y,` {
right: 0 `).concat(a,`;
}
.`).concat(Q," .").concat(Q,` {
margin-right: 0 `).concat(a,`;
}
body[`).concat(z,`] {
`).concat(Qt,": ").concat(o,`px;
}
`)},Pe=function(){var e=parseInt(document.body.getAttribute(z)||"0",10);return isFinite(e)?e:0},gr=function(){i.useEffect(function(){return document.body.setAttribute(z,(Pe()+1).toString()),function(){var e=Pe()-1;e<=0?document.body.removeAttribute(z):document.body.setAttribute(z,e.toString())}},[])},pr=function(e){var t=e.noRelative,r=e.noImportant,a=e.gapMode,s=a===void 0?"margin":a;gr();var c=i.useMemo(function(){return hr(s)},[s]);return i.createElement(mr,{styles:vr(c,!t,s,r?"":"!important")})},de=!1;if(typeof window<"u")try{var G=Object.defineProperty({},"passive",{get:function(){return de=!0,!0}});window.addEventListener("test",G,G),window.removeEventListener("test",G,G)}catch{de=!1}var _=de?{passive:!1}:!1,xr=function(e){return e.tagName==="TEXTAREA"},Ge=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!xr(e)&&r[t]==="visible")},yr=function(e){return Ge(e,"overflowY")},br=function(e){return Ge(e,"overflowX")},Oe=function(e,t){var r=t.ownerDocument,a=t;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var s=$e(e,a);if(s){var c=qe(e,a),l=c[1],o=c[2];if(l>o)return!0}a=a.parentNode}while(a&&a!==r.body);return!1},wr=function(e){var t=e.scrollTop,r=e.scrollHeight,a=e.clientHeight;return[t,r,a]},Cr=function(e){var t=e.scrollLeft,r=e.scrollWidth,a=e.clientWidth;return[t,r,a]},$e=function(e,t){return e==="v"?yr(t):br(t)},qe=function(e,t){return e==="v"?wr(t):Cr(t)},Nr=function(e,t){return e==="h"&&t==="rtl"?-1:1},Er=function(e,t,r,a,s){var c=Nr(e,window.getComputedStyle(t).direction),l=c*a,o=r.target,f=t.contains(o),h=!1,g=l>0,d=0,x=0;do{if(!o)break;var y=qe(e,o),N=y[0],u=y[1],m=y[2],p=u-m-c*N;(N||p)&&$e(e,o)&&(d+=p,x+=N);var w=o.parentNode;o=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!f&&o!==document.body||f&&(t.contains(o)||t===o));return(g&&(Math.abs(d)<1||!s)||!g&&(Math.abs(x)<1||!s))&&(h=!0),h},$=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Le=function(e){return[e.deltaX,e.deltaY]},Fe=function(e){return e&&"current"in e?e.current:e},jr=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Sr=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},kr=0,W=[];function Rr(e){var t=i.useRef([]),r=i.useRef([0,0]),a=i.useRef(),s=i.useState(kr++)[0],c=i.useState(Ke)[0],l=i.useRef(e);i.useEffect(function(){l.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var u=Et([e.lockRef.current],(e.shards||[]).map(Fe),!0).filter(Boolean);return u.forEach(function(m){return m.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),u.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var o=i.useCallback(function(u,m){if("touches"in u&&u.touches.length===2||u.type==="wheel"&&u.ctrlKey)return!l.current.allowPinchZoom;var p=$(u),w=r.current,C="deltaX"in u?u.deltaX:w[0]-p[0],b="deltaY"in u?u.deltaY:w[1]-p[1],E,M=u.target,R=Math.abs(C)>Math.abs(b)?"h":"v";if("touches"in u&&R==="h"&&M.type==="range")return!1;var F=Oe(R,M);if(!F)return!0;if(F?E=R:(E=R==="v"?"h":"v",F=Oe(R,M)),!F)return!1;if(!a.current&&"changedTouches"in u&&(C||b)&&(a.current=E),!E)return!0;var V=a.current||E;return Er(V,m,u,V==="h"?C:b,!0)},[]),f=i.useCallback(function(u){var m=u;if(!(!W.length||W[W.length-1]!==c)){var p="deltaY"in m?Le(m):$(m),w=t.current.filter(function(E){return E.name===m.type&&(E.target===m.target||m.target===E.shadowParent)&&jr(E.delta,p)})[0];if(w&&w.should){m.cancelable&&m.preventDefault();return}if(!w){var C=(l.current.shards||[]).map(Fe).filter(Boolean).filter(function(E){return E.contains(m.target)}),b=C.length>0?o(m,C[0]):!l.current.noIsolation;b&&m.cancelable&&m.preventDefault()}}},[]),h=i.useCallback(function(u,m,p,w){var C={name:u,delta:m,target:p,should:w,shadowParent:Ar(p)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(b){return b!==C})},1)},[]),g=i.useCallback(function(u){r.current=$(u),a.current=void 0},[]),d=i.useCallback(function(u){h(u.type,Le(u),u.target,o(u,e.lockRef.current))},[]),x=i.useCallback(function(u){h(u.type,$(u),u.target,o(u,e.lockRef.current))},[]);i.useEffect(function(){return W.push(c),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:x}),document.addEventListener("wheel",f,_),document.addEventListener("touchmove",f,_),document.addEventListener("touchstart",g,_),function(){W=W.filter(function(u){return u!==c}),document.removeEventListener("wheel",f,_),document.removeEventListener("touchmove",f,_),document.removeEventListener("touchstart",g,_)}},[]);var y=e.removeScrollBar,N=e.inert;return i.createElement(i.Fragment,null,N?i.createElement(c,{styles:Sr(s)}):null,y?i.createElement(pr,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ar(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Dr=ar(Ue,Rr);var Xe=i.forwardRef(function(e,t){return i.createElement(ee,O({},e,{ref:t,sideCar:Dr}))});Xe.classNames=ee.classNames;var Mr=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},B=new WeakMap,q=new WeakMap,X={},ue=0,Ye=function(e){return e&&(e.host||Ye(e.parentNode))},Tr=function(e,t){return t.map(function(r){if(e.contains(r))return r;var a=Ye(r);return a&&e.contains(a)?a:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Ir=function(e,t,r,a){var s=Tr(t,Array.isArray(e)?e:[e]);X[r]||(X[r]=new WeakMap);var c=X[r],l=[],o=new Set,f=new Set(s),h=function(d){!d||o.has(d)||(o.add(d),h(d.parentNode))};s.forEach(h);var g=function(d){!d||f.has(d)||Array.prototype.forEach.call(d.children,function(x){if(o.has(x))g(x);else try{var y=x.getAttribute(a),N=y!==null&&y!=="false",u=(B.get(x)||0)+1,m=(c.get(x)||0)+1;B.set(x,u),c.set(x,m),l.push(x),u===1&&N&&q.set(x,!0),m===1&&x.setAttribute(r,"true"),N||x.setAttribute(a,"true")}catch(p){console.error("aria-hidden: cannot operate on ",x,p)}})};return g(t),o.clear(),ue++,function(){l.forEach(function(d){var x=B.get(d)-1,y=c.get(d)-1;B.set(d,x),c.set(d,y),x||(q.has(d)||d.removeAttribute(a),q.delete(d)),y||d.removeAttribute(r)}),ue--,ue||(B=new WeakMap,B=new WeakMap,q=new WeakMap,X={})}},Pr=function(e,t,r){r===void 0&&(r="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),s=Mr(e);return s?(a.push.apply(a,Array.from(s.querySelectorAll("[aria-live]"))),Ir(a,s,r,"aria-hidden")):function(){return null}},te="Dialog",[Qe,tn]=jt(te),[Or,D]=Qe(te),Ze=e=>{const{__scopeDialog:t,children:r,open:a,defaultOpen:s,onOpenChange:c,modal:l=!0}=e,o=i.useRef(null),f=i.useRef(null),[h,g]=Rt({prop:a,defaultProp:s??!1,onChange:c,caller:te});return n.jsx(Or,{scope:t,triggerRef:o,contentRef:f,contentId:re(),titleId:re(),descriptionId:re(),open:h,onOpenChange:g,onOpenToggle:i.useCallback(()=>g(d=>!d),[g]),modal:l,children:r})};Ze.displayName=te;var Je="DialogTrigger",et=i.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,s=D(Je,r),c=J(t,s.triggerRef);return n.jsx(H.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":ve(s.open),...a,ref:c,onClick:U(e.onClick,s.onOpenToggle)})});et.displayName=Je;var he="DialogPortal",[Lr,tt]=Qe(he,{forceMount:void 0}),rt=e=>{const{__scopeDialog:t,forceMount:r,children:a,container:s}=e,c=D(he,t);return n.jsx(Lr,{scope:t,forceMount:r,children:i.Children.map(a,l=>n.jsx(fe,{present:r||c.open,children:n.jsx(At,{asChild:!0,container:s,children:l})}))})};rt.displayName=he;var Z="DialogOverlay",nt=i.forwardRef((e,t)=>{const r=tt(Z,e.__scopeDialog),{forceMount:a=r.forceMount,...s}=e,c=D(Z,e.__scopeDialog);return c.modal?n.jsx(fe,{present:a||c.open,children:n.jsx(_r,{...s,ref:t})}):null});nt.displayName=Z;var Fr=Dt("DialogOverlay.RemoveScroll"),_r=i.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,s=D(Z,r);return n.jsx(Xe,{as:Fr,allowPinchZoom:!0,shards:[s.contentRef],children:n.jsx(H.div,{"data-state":ve(s.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),L="DialogContent",at=i.forwardRef((e,t)=>{const r=tt(L,e.__scopeDialog),{forceMount:a=r.forceMount,...s}=e,c=D(L,e.__scopeDialog);return n.jsx(fe,{present:a||c.open,children:c.modal?n.jsx(Wr,{...s,ref:t}):n.jsx(Br,{...s,ref:t})})});at.displayName=L;var Wr=i.forwardRef((e,t)=>{const r=D(L,e.__scopeDialog),a=i.useRef(null),s=J(t,r.contentRef,a);return i.useEffect(()=>{const c=a.current;if(c)return Pr(c)},[]),n.jsx(ot,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:U(e.onCloseAutoFocus,c=>{var l;c.preventDefault(),(l=r.triggerRef.current)==null||l.focus()}),onPointerDownOutside:U(e.onPointerDownOutside,c=>{const l=c.detail.originalEvent,o=l.button===0&&l.ctrlKey===!0;(l.button===2||o)&&c.preventDefault()}),onFocusOutside:U(e.onFocusOutside,c=>c.preventDefault())})}),Br=i.forwardRef((e,t)=>{const r=D(L,e.__scopeDialog),a=i.useRef(!1),s=i.useRef(!1);return n.jsx(ot,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{var l,o;(l=e.onCloseAutoFocus)==null||l.call(e,c),c.defaultPrevented||(a.current||(o=r.triggerRef.current)==null||o.focus(),c.preventDefault()),a.current=!1,s.current=!1},onInteractOutside:c=>{var f,h;(f=e.onInteractOutside)==null||f.call(e,c),c.defaultPrevented||(a.current=!0,c.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const l=c.target;((h=r.triggerRef.current)==null?void 0:h.contains(l))&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&s.current&&c.preventDefault()}})}),ot=i.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:c,...l}=e,o=D(L,r),f=i.useRef(null),h=J(t,f);return Xt(),n.jsxs(n.Fragment,{children:[n.jsx(ze,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:s,onUnmountAutoFocus:c,children:n.jsx(St,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":ve(o.open),...l,ref:h,onDismiss:()=>o.onOpenChange(!1)})}),n.jsxs(n.Fragment,{children:[n.jsx(zr,{titleId:o.titleId}),n.jsx(Vr,{contentRef:f,descriptionId:o.descriptionId})]})]})}),me="DialogTitle",st=i.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,s=D(me,r);return n.jsx(H.h2,{id:s.titleId,...a,ref:t})});st.displayName=me;var it="DialogDescription",ct=i.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,s=D(it,r);return n.jsx(H.p,{id:s.descriptionId,...a,ref:t})});ct.displayName=it;var lt="DialogClose",ut=i.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,s=D(lt,r);return n.jsx(H.button,{type:"button",...a,ref:t,onClick:U(e.onClick,()=>s.onOpenChange(!1))})});ut.displayName=lt;function ve(e){return e?"open":"closed"}var dt="DialogTitleWarning",[rn,ft]=kt(dt,{contentName:L,titleName:me,docsSlug:"dialog"}),zr=({titleId:e})=>{const t=ft(dt),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Hr="DialogDescriptionWarning",Vr=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ft(Hr).contentName}}.`;return i.useEffect(()=>{var c;const s=(c=e.current)==null?void 0:c.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},Ur=Ze,Kr=et,Gr=rt,ht=nt,mt=at,vt=st,gt=ct,$r=ut;const qr=Ur,Xr=Kr,Yr=Gr,pt=i.forwardRef(({className:e,...t},r)=>n.jsx(ht,{className:I("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));pt.displayName=ht.displayName;const Qr=Mt("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),xt=i.forwardRef(({side:e="right",className:t,children:r,...a},s)=>n.jsxs(Yr,{children:[n.jsx(pt,{}),n.jsxs(mt,{ref:s,className:I(Qr({side:e}),t),...a,children:[r,n.jsxs($r,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[n.jsx(We,{className:"h-4 w-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));xt.displayName=mt.displayName;const yt=({className:e,...t})=>n.jsx("div",{className:I("flex flex-col space-y-2 text-center sm:text-left",e),...t});yt.displayName="SheetHeader";const bt=i.forwardRef(({className:e,...t},r)=>n.jsx(vt,{ref:r,className:I("text-lg font-semibold text-foreground",e),...t}));bt.displayName=vt.displayName;const Zr=i.forwardRef(({className:e,...t},r)=>n.jsx(gt,{ref:r,className:I("text-sm text-muted-foreground",e),...t}));Zr.displayName=gt.displayName;const nn=()=>{const{user:e,isAdmin:t,signOut:r}=Tt(),a=_e(),[s,c]=i.useState(!1),l=async()=>{await r(),c(!1),a("/")},o=()=>{c(!1)};return n.jsx("header",{className:"bg-primary text-primary-foreground sticky top-0 z-50 shadow-md",children:n.jsx("div",{className:"container mx-auto px-4",children:n.jsxs("div",{className:"flex items-center justify-between h-16",children:[n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsxs(qr,{open:s,onOpenChange:c,children:[n.jsx(Xr,{asChild:!0,children:n.jsxs(T,{variant:"ghost",size:"icon",className:"lg:hidden text-primary-foreground hover:bg-primary/80",children:[n.jsx(Lt,{className:"h-5 w-5"}),n.jsx("span",{className:"sr-only",children:"Deschide meniul"})]})}),n.jsxs(xt,{side:"left",className:"w-[300px] sm:w-[350px]",children:[n.jsx(yt,{className:"mb-6",children:n.jsx(bt,{className:"flex items-center gap-2",children:n.jsx(je,{showText:!0,className:"h-8"})})}),n.jsx("div",{className:"mb-6",children:n.jsx(ke,{placeholder:"Căutare produse...",showButton:!1,inputClassName:"h-11"})}),n.jsxs("nav",{className:"space-y-2",children:[n.jsxs(S,{to:"/",onClick:o,className:"flex items-center gap-3 px-3 py-3 rounded-lg hover:bg-muted transition-colors text-foreground",children:[n.jsx(Ot,{className:"h-5 w-5"}),n.jsx("span",{className:"font-medium",children:"Acasă"})]}),n.jsxs(S,{to:"/products",onClick:o,className:"flex items-center gap-3 px-3 py-3 rounded-lg hover:bg-muted transition-colors text-foreground",children:[n.jsx(Ft,{className:"h-5 w-5"}),n.jsx("span",{className:"font-medium",children:"Produse"})]}),n.jsxs(S,{to:"/categorii",onClick:o,className:"flex items-center gap-3 px-3 py-3 rounded-lg hover:bg-muted transition-colors text-foreground",children:[n.jsx(be,{className:"h-5 w-5"}),n.jsx("span",{className:"font-medium",children:"Categorii"})]}),e&&t&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"border-t my-4"}),n.jsx("p",{className:"px-3 text-xs text-muted-foreground uppercase tracking-wide mb-2",children:"Admin"}),n.jsxs(S,{to:"/dashboard",onClick:o,className:"flex items-center gap-3 px-3 py-3 rounded-lg hover:bg-muted transition-colors text-foreground",children:[n.jsx(be,{className:"h-5 w-5"}),n.jsx("span",{className:"font-medium",children:"Dashboard"})]}),n.jsxs(S,{to:"/security",onClick:o,className:"flex items-center gap-3 px-3 py-3 rounded-lg hover:bg-muted transition-colors text-foreground",children:[n.jsx(Ne,{className:"h-5 w-5"}),n.jsx("span",{className:"font-medium",children:"Securitate"})]}),n.jsxs(S,{to:"/advertisers",onClick:o,className:"flex items-center gap-3 px-3 py-3 rounded-lg hover:bg-muted transition-colors text-foreground",children:[n.jsx(Ee,{className:"h-5 w-5"}),n.jsx("span",{className:"font-medium",children:"Advertiseri"})]}),n.jsxs(S,{to:"/settings",onClick:o,className:"flex items-center gap-3 px-3 py-3 rounded-lg hover:bg-muted transition-colors text-foreground",children:[n.jsx(Ce,{className:"h-5 w-5"}),n.jsx("span",{className:"font-medium",children:"Setări"})]})]}),e&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"border-t my-4"}),n.jsxs("button",{onClick:l,className:"flex items-center gap-3 px-3 py-3 rounded-lg hover:bg-muted transition-colors text-foreground w-full text-left",children:[n.jsx(we,{className:"h-5 w-5"}),n.jsx("span",{className:"font-medium",children:"Delogare"})]})]})]})]})]}),n.jsx(S,{to:"/",className:"flex items-center",children:n.jsx(je,{showText:!0,className:"h-8"})})]}),n.jsx("div",{className:"flex-1 max-w-2xl mx-4 hidden md:block",children:n.jsx(ke,{placeholder:"Căutare produse",showButton:!1,inputClassName:"bg-primary-foreground text-foreground h-11"})}),n.jsx("div",{className:"flex items-center gap-2",children:e?n.jsxs(n.Fragment,{children:[t&&n.jsxs(n.Fragment,{children:[n.jsx(T,{variant:"ghost",className:"text-primary-foreground hover:bg-primary/80 hidden sm:inline-flex",asChild:!0,children:n.jsx(S,{to:"/dashboard",children:"Dashboard"})}),n.jsx(T,{variant:"ghost",size:"icon",className:"text-primary-foreground hover:bg-primary/80 hidden sm:inline-flex",asChild:!0,title:"Securitate",children:n.jsx(S,{to:"/security",children:n.jsx(Ne,{className:"h-5 w-5"})})}),n.jsx(T,{variant:"ghost",size:"icon",className:"text-primary-foreground hover:bg-primary/80 hidden sm:inline-flex",asChild:!0,title:"Advertiseri",children:n.jsx(S,{to:"/advertisers",children:n.jsx(Ee,{className:"h-5 w-5"})})}),n.jsx(T,{variant:"ghost",size:"icon",className:"text-primary-foreground hover:bg-primary/80 hidden sm:inline-flex",asChild:!0,title:"Setări",children:n.jsx(S,{to:"/settings",children:n.jsx(Ce,{className:"h-5 w-5"})})})]}),n.jsx(T,{variant:"ghost",className:"text-primary-foreground hover:bg-primary/80 hidden sm:inline-flex",asChild:!0,children:n.jsx(S,{to:"/products",children:"Produse"})}),n.jsx(T,{variant:"ghost",size:"icon",className:"text-primary-foreground hover:bg-primary/80 hidden sm:inline-flex",onClick:l,children:n.jsx(we,{className:"h-5 w-5"})})]}):n.jsx(T,{variant:"ghost",className:"text-primary-foreground hover:bg-primary/80 hidden sm:inline-flex",asChild:!0,children:n.jsx(S,{to:"/products",children:"Produse"})})})]})})})};export{ye as C,gt as D,ze as F,nn as H,ht as O,Ft as P,Ur as R,Ee as S,vt as T,rn as W,ke as a,_t as b,Ot as c,Ce as d,Gr as e,mt as f,Xe as g,Pr as h,Ne as i,qr as j,Xr as k,xt as l,yt as m,bt as n,$r as o,Kr as p,tn as q,Xt as u};