import{z as e,E as t,j as o,F as s,G as a,I as r,H as n,J as i,K as l,L as d,M as c,N as m,Q as u}from"./ui-vendor-CPlxOuHz.js";import{r as p,h as x,u as f}from"./react-vendor-DjUmVRt1.js";import{e as h,d as g,B as b}from"./index-09CqdSdZ.js";import{l as N}from"./logo-oficial-BW9aD_Pb.js";import{b as w,y as j,ao as y,ap as v,X as k,aq as C}from"./icons-ClkGBw8e.js";const T=e,I=t;p.forwardRef(({className:e,inset:t,children:s,...a},r)=>o.jsxs(n,{ref:r,className:h("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...a,children:[s,o.jsx(w,{className:"ml-auto h-4 w-4"})]})).displayName=n.displayName;p.forwardRef(({className:e,...t},s)=>o.jsx(i,{ref:s,className:h("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})).displayName=i.displayName;const z=p.forwardRef(({className:e,sideOffset:t=4,...r},n)=>o.jsx(s,{children:o.jsx(a,{ref:n,sideOffset:t,className:h("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));z.displayName=a.displayName;const R=p.forwardRef(({className:e,inset:t,...s},a)=>o.jsx(r,{ref:a,className:h("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...s}));R.displayName=r.displayName;p.forwardRef(({className:e,children:t,checked:s,...a},r)=>o.jsxs(l,{ref:r,className:h("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:s,...a,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(d,{children:o.jsx(j,{className:"h-4 w-4"})})}),t]})).displayName=l.displayName;p.forwardRef(({className:e,children:t,...s},a)=>o.jsxs(c,{ref:a,className:h("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...s,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(d,{children:o.jsx(y,{className:"h-2 w-2 fill-current"})})}),t]})).displayName=c.displayName;p.forwardRef(({className:e,inset:t,...s},a)=>o.jsx(m,{ref:a,className:h("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...s})).displayName=m.displayName;p.forwardRef(({className:e,...t},s)=>o.jsx(u,{ref:s,className:h("-mx-1 my-1 h-px bg-muted",e),...t})).displayName=u.displayName;const V=({viewMode:e,onViewModeChange:t,showViewModeToggle:s=!0})=>{const[a,r]=p.useState(!1),n=x(),i=f(),{user:l,isAdmin:d}=g(),c=o=>{const s="/"===i.pathname;if("home"===o)return s?"business"===e?t("client"):window.scrollTo({top:0,behavior:"smooth"}):(n("/"),setTimeout(()=>window.scrollTo({top:0,behavior:"smooth"}),100)),void r(!1);if("services"!==o){if("contact"===o){const e=document.getElementById("contact");return void(e&&(e.scrollIntoView({behavior:"smooth"}),r(!1)))}if(s){const e=document.getElementById(o);e&&(e.scrollIntoView({behavior:"smooth"}),r(!1))}else n("/"),setTimeout(()=>{const e=document.getElementById(o);e&&e.scrollIntoView({behavior:"smooth"})},100),r(!1)}else if(s){if("business"===e)setTimeout(()=>{const e=document.getElementById("business-solutions");e&&e.scrollIntoView({behavior:"smooth"})},100);else{const e=document.getElementById(o);e&&e.scrollIntoView({behavior:"smooth"})}r(!1)}else n("/"),setTimeout(()=>{const e=document.getElementById(o);e&&e.scrollIntoView({behavior:"smooth"})},100),r(!1)};return o.jsx("header",{className:"fixed top-0 left-0 right-0 z-50 bg-white border-b border-border shadow-sm",children:o.jsxs("div",{className:"container mx-auto px-4 bg-white",children:[o.jsxs("div",{className:"flex items-center justify-between h-20",children:[o.jsxs("div",{className:"flex items-center gap-6",children:[o.jsx("button",{onClick:()=>c("home"),className:"focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 rounded active:scale-95 transition-transform touch-manipulation p-1","aria-label":"Ir para página inicial",children:o.jsx("img",{src:N,srcSet:`${N} 180w`,sizes:"(max-width: 640px) 120px, (max-width: 768px) 140px, (max-width: 1024px) 160px, 180px",alt:"Sempre Comigo - Rastreamento e Assistência Veicular em Natal RN",className:"h-6 sm:h-7 md:h-8 lg:h-9 xl:h-10 w-auto max-w-[120px] sm:max-w-[140px] md:max-w-[160px] lg:max-w-[180px] object-contain shrink-0 bg-transparent cursor-pointer",style:{maxHeight:"40px"},loading:"eager",width:"180",height:"40",decoding:"async"})}),s&&o.jsxs("div",{className:"hidden md:flex items-center gap-2 bg-muted rounded-lg p-1",children:[o.jsx("button",{onClick:()=>{n("/"),setTimeout(()=>{window.scrollTo({top:0,behavior:"smooth"})},100)},className:"px-4 py-2 rounded-md text-sm font-medium transition-colors "+("/"===i.pathname&&"client"===e?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:"Você"}),o.jsx("button",{onClick:()=>{n("/empresas"),setTimeout(()=>{window.scrollTo({top:0,behavior:"smooth"})},100)},className:"px-4 py-2 rounded-md text-sm font-medium transition-colors "+("/empresas"===i.pathname?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:"Empresas"})]})]}),o.jsxs("nav",{className:"hidden md:flex items-center gap-4 lg:gap-6 xl:gap-8 text-sm lg:text-base",children:[o.jsx("button",{onClick:()=>c("about"),className:"text-foreground hover:text-primary transition-colors font-medium",children:"Sobre Nós"}),o.jsx("button",{onClick:()=>c("contact"),className:"text-foreground hover:text-primary transition-colors font-medium",children:"Contato"}),o.jsx("button",{onClick:()=>n("/faca-parte"),className:"text-foreground hover:text-primary transition-colors font-medium",children:"Faça Parte"}),o.jsx("button",{onClick:()=>n("/blog"),className:"text-foreground hover:text-primary transition-colors font-medium",children:"Blog"}),o.jsx("button",{onClick:()=>n("/franquia"),className:"text-foreground hover:text-primary transition-colors font-medium",children:"Franquia"}),o.jsx("button",{onClick:()=>n("/afiliados"),className:"text-foreground hover:text-primary transition-colors font-medium",children:"Afiliados"}),o.jsxs(T,{children:[o.jsx(I,{asChild:!0,children:o.jsxs(b,{variant:"default",size:"sm",className:"gap-2",children:["Ãrea do cliente",o.jsx(v,{className:"h-4 w-4"})]})}),o.jsxs(z,{className:"bg-background z-50",children:[o.jsx(R,{className:"cursor-pointer",onClick:()=>window.open("https://marketplace.semprecomigo.com/checkout","_blank"),children:"2ª via de fatura"}),o.jsx(R,{className:"cursor-pointer",onClick:()=>n("/suporte"),children:"Suporte"}),o.jsx(R,{className:"cursor-pointer",onClick:()=>window.open("https://sis.getrak.com.br/rnrastreamento/","_blank"),children:"Rastreamento"})]})]})]}),o.jsx("button",{className:"md:hidden p-2",onClick:()=>r(!a),"aria-label":"Toggle menu",children:a?o.jsx(k,{className:"h-6 w-6 text-foreground"}):o.jsx(C,{className:"h-6 w-6 text-foreground"})})]}),a&&o.jsxs("nav",{className:"md:hidden py-4 space-y-4",children:[s&&o.jsxs("div",{className:"flex gap-2 px-4 mb-4",children:[o.jsx("button",{onClick:()=>{n("/"),r(!1),setTimeout(()=>{window.scrollTo({top:0,behavior:"smooth"})},100)},className:"flex-1 px-4 py-2 rounded-md text-sm font-medium transition-colors "+("/"===i.pathname&&"client"===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"),children:"Você"}),o.jsx("button",{onClick:()=>{n("/empresas"),r(!1),setTimeout(()=>{window.scrollTo({top:0,behavior:"smooth"})},100)},className:"flex-1 px-4 py-2 rounded-md text-sm font-medium transition-colors "+("/empresas"===i.pathname?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"),children:"Empresas"})]}),o.jsx("button",{onClick:()=>c("about"),className:"block w-full text-left px-4 py-2 text-foreground hover:bg-muted rounded-lg transition-colors",children:"Sobre Nós"}),o.jsx("button",{onClick:()=>c("contact"),className:"block w-full text-left px-4 py-2 text-foreground hover:bg-muted rounded-lg transition-colors",children:"Contato"}),o.jsx("button",{onClick:()=>n("/faca-parte"),className:"block w-full text-left px-4 py-2 text-foreground hover:bg-muted rounded-lg transition-colors",children:"Faça Parte"}),o.jsx("button",{onClick:()=>n("/blog"),className:"block w-full text-left px-4 py-2 text-foreground hover:bg-muted rounded-lg transition-colors",children:"Blog"}),o.jsx("button",{onClick:()=>n("/franquia"),className:"block w-full text-left px-4 py-2 text-foreground hover:bg-muted rounded-lg transition-colors",children:"Franquia"}),o.jsx("button",{onClick:()=>n("/afiliados"),className:"block w-full text-left px-4 py-2 text-foreground hover:bg-muted rounded-lg transition-colors",children:"Afiliados"}),o.jsx("div",{className:"px-4",children:o.jsxs(T,{children:[o.jsx(I,{asChild:!0,children:o.jsxs(b,{variant:"default",size:"sm",className:"w-full gap-2",children:["Ãrea do cliente",o.jsx(v,{className:"h-4 w-4"})]})}),o.jsxs(z,{className:"bg-background z-50 w-48",children:[o.jsx(R,{className:"cursor-pointer",onClick:()=>window.open("https://marketplace.semprecomigo.com/checkout","_blank"),children:"2ª via de fatura"}),o.jsx(R,{className:"cursor-pointer",onClick:()=>n("/suporte"),children:"Suporte"}),o.jsx(R,{className:"cursor-pointer",onClick:()=>window.open("https://sis.getrak.com.br/rnrastreamento/","_blank"),children:"Rastreamento"})]})]})})]})]})})};export{V as H};