import{_ as M}from"./G7u0egV4.js";import{d as g,a as h,o as L,f as a,g as i,R as f,O as C,P as I,W as D,w as e,F as w,i as U,A as O,h as m,t as n,n as N}from"./JQJBiNWj.js";import{_ as V}from"./DUQr9DrG.js";import{_ as B}from"./DwxF_264.js";import{A as _}from"./CLzE61HQ.js";import{_ as $}from"./DTOFlTEg.js";import{_ as j}from"./CYDRfonM.js";import{r as v,h as x}from"./CLkB_muw.js";import{a as b}from"./BRY5UTQQ.js";import{f as d}from"./DcOKUJR4.js";import W from"./CuNuZBQO.js";import{D as Z}from"./DKM0wLqG.js";import{b as q,T as z}from"./BagArUDo.js";import{a as G}from"./BlGPNclf.js";import{u as H}from"./CL7Msd7o.js";import{u as J}from"./BfZwoNNq.js";import{T as Q}from"./BKl0aY3w.js";import"./HM4z-iuB.js";import"./DqVYbxj5.js";import"./BwwR4PPN.js";import"./B6O9xiO5.js";import"./CxkaGOlL.js";import"./BgAkS4D_.js";import"./gxHWKiUc.js";import"./Dm5UwSfy.js";import"./D42GNhrT.js";import"./Dc_YXEFz.js";import"./D7IyRfqO.js";import"./CbtPaznW.js";import"./DmwTwIPt.js";import"./B-La3K3C.js";import"./F98GHXdS.js";import"./DvBDpJyt.js";import"./FcRkkR--.js";import"./Dk4pWsnS.js";import"./BSHuRY0P.js";import"./DPeK_S5k.js";import"./ClVEEBFD.js";import"./2JTb7YQn.js";import"./CeGk6Fsr.js";import"./D1rKqwCM.js";import"./CeWG_dyW.js";import"./CDSORL4U.js";import"./BAmc1GPw.js";import"./CJYlvWEf.js";import"./3oa0FK2h.js";import"./BBDFeM-T.js";import"./BuR5k2Xw.js";import"./Bli8EQqv.js";import"./CRodc3LN.js";import"./DncddsCV.js";import"./CH1bAkoS.js";import"./Dd3ROLQd.js";import"./f6QOa6wf.js";import"./Tk23Dwa0.js";import"./DMxbovom.js";import"./DBWLnasn.js";import"./RO0fiRDZ.js";import"./Cr9ZZaT-.js";import"./DNRi6U01.js";import"./BYfmWBgX.js";import"./vkXHPWu2.js";import"./qAEGbaa4.js";import"./CASPyZT-.js";import"./CfLdzzlL.js";import"./CjLYEAc3.js";import"./BTchAptP.js";const X={class:"base-grid grid lg:grid-cols-4 grid-cols-2"},Y=g({__name:"Filters",setup(A){return(s,l)=>{const p=B;return L(),h("div",X,[a(p,{"tipo-ativo":i(_).TipoAtivo.Pavimento,"show-tipo-elemento":!1},null,8,["tipo-ativo"])])}}}),tt=Object.assign(Y,{__name:"AtivosElementoPavimentoFilters"}),vo=g({__name:"index",async setup(A){let s,l;const p=H({view:f.ATV_VISUALIZAR_CADASTRO_PAVIMENTO,add:f.ATV_EDITAR_CADASTRO_PAVIMENTO}),y=C(),E=([s,l]=I(()=>y.getEmpresaSelecionada()),s=await s,l(),s),c=J("ativos-cadastros-pavimento",o=>U.ativos.cadastros.findAllByTipo(E.sigla,Q.Pavimento,o));function T(o){(p.value.add||p.value.view)&&N(v(o.data.id.idElemento),x(o))}return(o,ot)=>{const K=M,P=O,R=V,F=tt,k=$,r=W,S=j;return L(),h(w,null,[a(R,{title:"Cadastros - Pavimento"},D({_:2},[i(p).add?{name:"title-buttons",fn:e(()=>[a(P,{to:("resolveRelativeRoute"in o?o.resolveRelativeRoute:i(v))(i(Z))},{default:e(()=>[a(K,{mode:"add"})]),_:1},8,["to"])]),key:"0"}:void 0]),1024),a(k,{status:i(c).status.value,schema:i(G),"paginated-url":""},{default:e(()=>[a(F)]),_:1},8,["status","schema"]),a(S,{value:i(c),onRowClick:T},{default:e(()=>[a(r,{field:"tipoPavimento",header:"Tipo",sortable:""},{body:e(t=>[m(n(i(q)[t.data.tipoPavimento]),1)]),_:1}),a(r,{field:"subtipoPista",header:"Subtipo pista",sortable:""},{body:e(t=>[m(n(i(z)[t.data.subtipoPista]),1)]),_:1}),a(r,{field:"rodovia",header:"Rodovia",sortable:"","sort-field":"rodovia.descricao"},{body:e(t=>{var u;return[m(n((u=t.data.rodovia)==null?void 0:u.descricao),1)]}),_:1}),a(r,{field:"uf",header:"UF",sortable:""},{body:e(t=>[m(n(t.data.uf),1)]),_:1}),a(r,{field:"kmInicial",header:"KM inicial",sortable:""},{body:e(t=>[m(n(("applyKmEstacaMask"in o?o.applyKmEstacaMask:i(b))(t.data.kmInicial)),1)]),_:1}),a(r,{field:"kmFinal",header:"KM final",sortable:""},{body:e(t=>[m(n(("applyKmEstacaMask"in o?o.applyKmEstacaMask:i(b))(t.data.kmFinal)),1)]),_:1}),a(r,{field:"latitudeKmInicial",header:"Latitude KM inicial",sortable:""},{body:e(t=>[m(n(("formatLatLng"in o?o.formatLatLng:i(d))(t.data.latitudeKmInicial)),1)]),_:1}),a(r,{field:"longitudeKmInicial",header:"Longitude KM inicial",sortable:""},{body:e(t=>[m(n(("formatLatLng"in o?o.formatLatLng:i(d))(t.data.longitudeKmInicial)),1)]),_:1}),a(r,{field:"latitudeKmFinal",header:"Latitude KM final",sortable:""},{body:e(t=>[m(n(("formatLatLng"in o?o.formatLatLng:i(d))(t.data.latitudeKmFinal)),1)]),_:1}),a(r,{field:"longitudeKmFinal",header:"Longitude KM final",sortable:""},{body:e(t=>[m(n(("formatLatLng"in o?o.formatLatLng:i(d))(t.data.longitudeKmFinal)),1)]),_:1}),a(r,{field:"sentido",header:"Sentido",sortable:""},{body:e(t=>[m(n(i(_).Enums.TipoSentido[t.data.sentido]),1)]),_:1}),a(r,{field:"direcao",header:"Direção",sortable:""},{body:e(t=>[m(n(i(_).Enums.TipoDirecao[t.data.direcao]),1)]),_:1})]),_:1},8,["value"])],64)}}});export{vo as default};
