import{x as e,y as o,j as t,z as s,E as a,I as r,F as n,G as i,H as l,J as d,K as c,L as m,M as p}from"./ui-vendor-4PEuZeLa.js";import{r as u,i as x,u as f}from"./react-vendor-SJkaNtXX.js";import{e as h,d as g,B as b}from"./index-D0PQLDZ3.js";import{l as N}from"./logo-oficial-BW9aD_Pb.js";import{b as w,y as j,aB as y,aC as v,X as k,aD as C}from"./icons-DwRt140y.js";const T=e,I=o;u.forwardRef(({className:e,inset:o,children:s,...a},r)=>t.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",o&&"pl-8",e),...a,children:[s,t.jsx(w,{className:"ml-auto h-4 w-4"})]})).displayName=n.displayName;u.forwardRef(({className:e,...o},s)=>t.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),...o})).displayName=i.displayName;const z=u.forwardRef(({className:e,sideOffset:o=4,...r},n)=>t.jsx(s,{children:t.jsx(a,{ref:n,sideOffset:o,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=u.forwardRef(({className:e,inset:o,...s},a)=>t.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",o&&"pl-8",e),...s}));R.displayName=r.displayName;u.forwardRef(({className:e,children:o,checked:s,...a},r)=>t.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:[t.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:t.jsx(d,{children:t.jsx(j,{className:"h-4 w-4"})})}),o]})).displayName=l.displayName;u.forwardRef(({className:e,children:o,...s},a)=>t.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:[t.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:t.jsx(d,{children:t.jsx(y,{className:"h-2 w-2 fill-current"})})}),o]})).displayName=c.displayName;u.forwardRef(({className:e,inset:o,...s},a)=>t.jsx(m,{ref:a,className:h("px-2 py-1.5 text-sm font-semibold",o&&"pl-8",e),...s})).displayName=m.displayName;u.forwardRef(({className:e,...o},s)=>t.jsx(p,{ref:s,className:h("-mx-1 my-1 h-px bg-muted",e),...o})).displayName=p.displayName;const B=({viewMode:e,onViewModeChange:o,showViewModeToggle:s=!0})=>{const[a,r]=u.useState(!1),n=x(),i=f(),{user:l,isAdmin:d}=g(),c=t=>{const s="/"===i.pathname;if("home"===t)return s?"business"===e?o("client"):window.scrollTo({top:0,behavior:"smooth"}):(n("/"),setTimeout(()=>window.scrollTo({top:0,behavior:"smooth"}),100)),void r(!1);if("services"!==t){if("contact"===t){const e=document.getElementById("contact");return void(e&&(e.scrollIntoView({behavior:"smooth"}),r(!1)))}if(s){const e=document.getElementById(t);e&&(e.scrollIntoView({behavior:"smooth"}),r(!1))}else n("/"),setTimeout(()=>{const e=document.getElementById(t);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(t);e&&e.scrollIntoView({behavior:"smooth"})}r(!1)}else n("/"),setTimeout(()=>{const e=document.getElementById(t);e&&e.scrollIntoView({behavior:"smooth"})},100),r(!1)};return t.jsx("header",{className:"fixed top-0 left-0 right-0 z-50 bg-white border-b border-border shadow-sm",children:t.jsxs("div",{className:"container mx-auto px-4 bg-white",children:[t.jsxs("div",{className:"flex items-center justify-between h-20",children:[t.jsxs("div",{className:"flex items-center gap-6",children:[t.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:t.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, Assistência 24h e Seguros Automotivos",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&&t.jsxs("div",{className:"hidden md:flex items-center gap-2 bg-muted rounded-lg p-1",children:[t.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ê"}),t.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"})]})]}),t.jsxs("nav",{className:"hidden md:flex items-center gap-4 lg:gap-6 xl:gap-8 text-sm lg:text-base",children:[t.jsx("button",{onClick:()=>c("about"),className:"text-foreground hover:text-primary transition-colors font-medium",children:"Sobre Nós"}),t.jsx("button",{onClick:()=>c("contact"),className:"text-foreground hover:text-primary transition-colors font-medium",children:"Contato"}),t.jsx("button",{onClick:()=>n("/faca-parte"),className:"text-foreground hover:text-primary transition-colors font-medium",children:"Faça Parte"}),t.jsx("button",{onClick:()=>n("/blog"),className:"text-foreground hover:text-primary transition-colors font-medium",children:"Blog"}),t.jsx("button",{onClick:()=>n("/franquia"),className:"text-foreground hover:text-primary transition-colors font-medium",children:"Franquia"}),t.jsx("button",{onClick:()=>n("/afiliados"),className:"text-foreground hover:text-primary transition-colors font-medium",children:"Afiliados"}),t.jsx("a",{href:"/app",onClick:e=>{e.preventDefault(),n("/app")},className:"text-foreground hover:text-primary transition-colors font-medium",children:"Baixar app"}),t.jsxs(T,{children:[t.jsx(I,{asChild:!0,children:t.jsxs(b,{variant:"default",size:"sm",className:"gap-2",children:["Área do cliente",t.jsx(v,{className:"h-4 w-4"})]})}),t.jsxs(z,{className:"bg-background z-50",children:[t.jsx(R,{className:"cursor-pointer",onClick:()=>window.open("https://marketplace.semprecomigo.com/checkout","_blank"),children:"2ª via de fatura"}),t.jsx(R,{className:"cursor-pointer",onClick:()=>n("/suporte"),children:"Suporte"}),t.jsx(R,{className:"cursor-pointer",onClick:()=>window.open("https://sis.getrak.com.br/rnrastreamento/","_blank"),children:"Rastreamento"}),t.jsx(R,{className:"cursor-pointer",onClick:()=>window.open("https://auth.semprecomigo.com.br","_blank"),children:"Rastreamento (Novo)"})]})]})]}),t.jsx("button",{className:"md:hidden p-2",onClick:()=>r(!a),"aria-label":"Toggle menu",children:a?t.jsx(k,{className:"h-6 w-6 text-foreground"}):t.jsx(C,{className:"h-6 w-6 text-foreground"})})]}),a&&t.jsxs("nav",{className:"md:hidden py-4 space-y-4",children:[s&&t.jsxs("div",{className:"flex gap-2 px-4 mb-4",children:[t.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ê"}),t.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"})]}),t.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"}),t.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"}),t.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"}),t.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"}),t.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"}),t.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"}),t.jsx("a",{href:"/app",onClick:e=>{e.preventDefault(),n("/app"),r(!1)},className:"block w-full text-left px-4 py-2 text-foreground hover:bg-muted rounded-lg transition-colors",children:"Baixar app"}),t.jsx("div",{className:"px-4",children:t.jsxs(T,{children:[t.jsx(I,{asChild:!0,children:t.jsxs(b,{variant:"default",size:"sm",className:"w-full gap-2",children:["Área do cliente",t.jsx(v,{className:"h-4 w-4"})]})}),t.jsxs(z,{className:"bg-background z-50 w-48",children:[t.jsx(R,{className:"cursor-pointer",onClick:()=>window.open("https://marketplace.semprecomigo.com/checkout","_blank"),children:"2ª via de fatura"}),t.jsx(R,{className:"cursor-pointer",onClick:()=>n("/suporte"),children:"Suporte"}),t.jsx(R,{className:"cursor-pointer",onClick:()=>window.open("https://sis.getrak.com.br/rnrastreamento/","_blank"),children:"Rastreamento"}),t.jsx(R,{className:"cursor-pointer",onClick:()=>window.open("https://auth.semprecomigo.com.br","_blank"),children:"Rastreamento (Novo)"})]})]})})]})]})})};export{B as H};