1import{_ as U}from"./Dk6SVRAV.js";import{_ as D}from"./B2b6H676.js";import{e as E,c as a,g as B,o,p as k,Z as j,_ as H,w as R,a as e,F as w,k as $,t as _,b as u,be as Q,r as S,bs as I,c9 as X,I as Z,v as P,j as J,s as K,i as T,h as n,d as F,ca as W,z as Y,A as ee,q as te,aX as V,x as oe}from"./DuNswFfk.js";import{_ as re}from"./CofN-Yin.js";import{f as se}from"./Dpvwc5sV.js";import"./B7SFJ4ud.js";import"./DlAUqK2U.js";const le=["href"],ne=E({__name:"BaseCard",props:{href:{},destaque:{type:Boolean},isExternalLink:{type:Boolean}},setup(s){return(c,m)=>{const i=H;return s.isExternalLink?(o(),a("a",{key:0,href:s.href,class:k(["group relative cursor-pointer border-2px border-contrast border-solid bg-primaryLight px-32px pb-24px pt-98px transition-colors duration-200 hover:bg-hover",{"!bg-contrast !hover:bg-hover border-contrastLight":s.destaque}])},[j(c.$slots,"default")],10,le)):(o(),B(i,{key:1,to:`/${s.href}`,class:k(["group relative cursor-pointer border-2px border-contrast border-solid bg-primaryLight px-32px pb-24px pt-98px transition-colors duration-200 hover:bg-hover",{"!bg-contrast !hover:bg-hover border-contrastLight":s.destaque}])},{default:R(()=>[j(c.$slots,"default")]),_:3},8,["to","class"]))}}}),ae=Object.assign(ne,{__name:"BaseCard"}),ie={class:"absolute left--2px top-16px w-full",flex:"~ gap-8px col"},ce={class:"relative h-30px w-fit rounded-r-15px bg-backgroundDark px-20px text-14px color-primaryLight fw-500",flex:"~ items-center"},pe={class:"w-full"},de=E({__name:"CardService",props:{card:{}},setup(s){return(c,m)=>{const i=D,x=ae;return o(),B(x,{href:s.card.link,destaque:s.card.destaque,"is-external-link":s.card.isExternalLink??!1},{default:R(()=>[e("div",ie,[(o(!0),a(w,null,$(s.card.tags,p=>(o(),a("div",{key:p.id},[e("span",ce,_(p.nome),1)]))),128))]),e("div",pe,[e("h2",{class:k(["mb-10px color-backgroundDark fw-700 !text-22px group-hover:color-primaryLight",{"color-primary":s.card.destaque}])},_(s.card.titulo),3),u(i,{name:"seta",class:"mt-0 size-30px fill-site group-hover:fill-primaryLight"})])]),_:1},8,["href","destaque","is-external-link"])}}}),ue=Object.assign(de,{__name:"CardService"}),xe=Q("service",()=>{const s=S(null),c=S([]),m=S([]),{find:i}=I(),{find:x}=I();function p(){s.value=null,c.value=[],m.value=[]}async function O(f){if(!f)throw p(),new Error("O slug do tipo de serviço não foi fornecido.");try{const d=(await i("tipo-de-servicos",{filters:{slug:{$eq:f}},populate:X})).data?.[0]||null;if(!d)throw new Error(`Tipo de serviço com slug "${f}" não encontrado.`);s.value=d,c.value=d.tags||[];const g=f.split("/").filter(Boolean),y=[{label:"Home",link:"/"}];for(let b=0;b<g.length;b++){const C=g.slice(0,b+1).join("/"),A=(await x("pagina-genericas",{filters:{slug:{$eq:C}},fields:["titulo"]}).catch(()=>null))?.data?.[0]?.titulo??se(g[b]??"");y.push({label:A,...b<g.length-1?{link:`/${C}`}:{}})}return m.value=y,{service:s.value,tags:c.value}}catch(h){throw console.error(`Erro ao buscar tipo de serviço pelo slug "${f}":`,h),p(),h}}return{currentServiceType:s,relatedTags:c,breadcrumbs:m,fetchServiceTypeBySlug:O,$reset:p}}),me={class:"relative mx-auto h-490px before:absolute before:bottom-0 before:left-0 before:right-0 before:top-0 before:z-2 before:block before:bg-site before:op-60 before:content-['']"},fe={class:"relative bottom-190px z-3 mx-auto mt-4 max-w-1518px color-primaryLight fw-300 lt-lg:max-w-720px lt-md:max-w-540px lt-md:px-20px lt-xl-max-w-960px lt-xxl-max-w-1140px !text-48px !lt-lg:text-40px !lt-md:text-32px"},ge={class:"font-bold"},be={class:"mx-auto mb-50px max-w-1518px py-20px lt-md-hidden lt-lg-max-w-720px lt-xl-max-w-960px lt-xxl-max-w-1140px",flex:"~ row items-center gap-y-10px gap-x-15px min-w-0 "},ve=["href"],_e={key:1,class:"truncate color-site fw-700"},he={key:2,class:"m-0 color-contrast"},ye={class:"lt-xl-contents"},we={class:"mb-50px lt-xl-hidden"},ke={flex:"~ items-center gap-10px wrap"},Se=["onClick"],Ce={key:"mobile-filter-button",class:"mb-4 flex items-center gap-2 md:hidden"},Le={class:"size-50px rounded-50px bg-site",flex:"~ items-center justify-center"},Te={class:"mb-145px lt-lg:mb-50px lt-lg:mt-20px lt-md:mb-80px lt-md:mt-25px"},$e={class:"flex items-center rounded-50px bg-baseLight"},Re={key:0,class:"order-2 mt--22px border-5px border-neutral100 border-solid px-15px lt-md:z-1 lt-md:bg-secondary lt-xl:order-1 lt-xl:flex"},Ae={key:0,class:"fixed right-0 top-0 z-50 h-full max-w-full overflow-y-auto bg-white p-6 shadow-lg"},ze={class:"mb-6 flex items-center justify-between"},Be={class:"flex flex-wrap gap-2"},Oe=["onClick"],De=E({__name:"index",async setup(s){let c,m;const i=S([]),x=S(""),p=S(!1),O=Z(),f=xe(),h=P(()=>{const l=O.params.categoria;
1return Array.isArray(l)?l.join("/"):typeof l=="string"?l:""});[c,m]=J(()=>oe(`service-type-${h.value}`,()=>f.fetchServiceTypeBySlug(h.value))),await c,m();const{currentServiceType:d,relatedTags:g,breadcrumbs:y}=K(f);function b(){p.value=!0}function C(){p.value=!1}function q(l){i.value.includes(l)?i.value=i.value.filter(t=>t!==l):i.value.push(l)}function A(){i.value=[]}const G=P(()=>{let l=d.value?.servicos??[];if(i.value.length>0&&(l=l.filter(t=>t.tags?.some(v=>i.value.includes(v.id)))),x.value.trim()!==""){const t=x.value.toLowerCase();l=l.filter(v=>v.titulo?.toLowerCase().includes(t))}return l=l.sort((t,v)=>(t.titulo??"").localeCompare(v.titulo??"","pt-BR",{sensitivity:"base"})),l});return(l,t)=>{const v=U,L=D,N=ue,M=re;return o(),a("div",null,[e("div",me,[n(d)?(o(),B(v,{key:0,image:n(d).capa,"img-attrs":{class:"size-full object-cover"}},null,8,["image"])):T("",!0),e("h1",fe,[t[1]||(t[1]=F(" Serviços para ",-1)),t[2]||(t[2]=e("br",null,null,-1)),e("span",ge,_(n(d)?.titulo),1)])]),e("div",be,[(o(!0),a(w,null,$(n(y),(r,z)=>(o(),a(w,{key:r.link},[z<n(y).length-1?(o(),a("a",{key:0,href:r.link,class:"color-primary"},_(r.label),9,ve)):(o(),a("span",_e,_(r.label),1)),z<n(y).length-1?(o(),a("p",he," > ")):T("",!0)],64))),128))]),e("div",{class:k(["grid mx-auto max-w-1518px gap-150px pb-8 lt-lg-max-w-720px lt-md:max-w-540px lt-md:px-20px lt-xl-max-w-960px lt-xxl:max-w-1140px lt-xxl:gap-50px",[n(d)?.menu_lateral_pagina?"grid-cols-1 xl:grid-cols-[65%_25%] lt-xl:grid-cols-auto":"grid-cols-1"]])},[e("div",ye,[e("div",we,[t[4]||(t[4]=e("h5",{class:"mb-10px mt-0 text-12px color-muted fw-500"}," FILTRAR POR CATEGORIA ",-1)),e("div",ke,[(o(!0),a(w,null,$(n(g),r=>(o(),a("div",{key:r.id},[e("button",{flex:"~ justify-center items-center",class:k(["h-50px cursor-pointer border-1px border-contrastLight rounded-40px border-solid bg-transparent px-20px text-14px color-primary fw-700 transition-colors duration-200 hover:bg-contrast",[n(i).includes(r.id)?"!bg-contrast":"bg-transparent"]]),onClick:z=>q(r.id)},_(r.nome),11,Se)]))),128)),e("div",{flex:"~ row gap-12px items-center",class:"group cursor-pointer transition-colors duration-200",onClick:A},[u(L,{name:"close-rounded",class:"size-20px fill-contrast group-hover:fill-#c64d4d"}),t[3]||(t[3]=e("span",{class:"text-14px color-contrast fw-700 group-hover:color-primary"},"limpar seleção",-1))])])]),u(W,{name:"list",tag:"div",class:"order-1 grid grid-cols-3 gap-30px pr-15px lt-xl:order-2 lt-lg-grid-cols-2 lt-md-grid-cols-1"},{default:R(()=>
1[e("div",Ce,[e("button",{class:"flex items-center gap-4 rounded-full border-none bg-transparent p-0 text-12px color-muted font-semibold",onClick:b},[e("div",Le,[u(L,{name:"filter",class:"size-20px fill-white"})]),t[5]||(t[5]=F(" FILTRAR POR CATEGORIAS ",-1))])]),(o(!0),a(w,null,$(n(G),r=>(o(),B(N,{key:r.id,card:r},null,8,["card"]))),128))]),_:1})]),e("div",null,[e("div",Te,[e("div",$e,[Y(e("input",{"onUpdate:modelValue":t[0]||(t[0]=r=>te(x)?x.value=r:null),type:"text",placeholder:"Digite o que você procura",class:"w-full flex-1 rounded-50px border-none bg-baseLight px-30px py-2 text-14px color-neutral300 leading-[70px] outline-none placeholder-neutral300"},null,512),[[ee,n(x)]]),u(L,{name:"search",class:"mr-6 w-30px fill-siteLight lt-xl-w-18px"})])]),n(d)?.menu_lateral_pagina?(o(),a("div",Re,[u(M,{menu:n(d).menu_lateral_pagina},null,8,["menu"])])):T("",!0)])],2),u(V,{name:"fade"},{default:R(()=>[n(p)?(o(),a("div",{key:0,class:"fixed inset-0 z-40 bg-black/50",onClick:C})):T("",!0)]),_:1}),u(V,{name:"slide"},{default:R(()=>[n(p)?(o(),a("div",Ae,[e("div",ze,[t[6]||(t[6]=e("h5",{class:"text-gray-600 font-bold"}," FILTRAR POR CATEGORIA ",-1)),e("button",{class:"border-none bg-transparent",onClick:C},[u(L,{name:"close",class:"size-16px fill-gray-600"})])]),e("div",Be,[(o(!0),a(w,null,$(n(g),r=>(o(),a("button",{key:r.id,flex:"~ justify-center items-center",class:k(["h-36px cursor-pointer border-1px border-contrast rounded-40px border-solid bg-transparent px-20px text-12px color-primary fw-700 transition-colors duration-200 hover:bg-contrast",n(i).includes(r.id)?"!bg-contrast":"bg-transparent"]),onClick:z=>q(r.id)},_(r.nome),11,Oe))),128))]),e("div",{flex:"~ row gap-12px items-center",class:"group mt-8px cursor-pointer transition-colors duration-200",onClick:A},[u(L,{name:"close-rounded",class:"size-20px fill-contrast group-hover:fill-#c64d4d"}),t[7]||(t[7]=e("span",{class:"text-14px color-contrast fw-700 group-hover:color-primary"},"limpar seleção",-1))])])):T("",!0)]),_:1})])}}});export{De as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.