import{_ as M}from"./Brk5FU9k.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,U as D,w as e,F as w,i as U,A as O,h as m,t as n,n as N}from"./dVzHJMF1.js";import{_ as V}from"./DDV-HLQE.js";import{_ as B}from"./DSijqxIZ.js";import{A as _}from"./DJzKbefB.js";import{_ as $}from"./CPhxMljB.js";import{_ as j}from"./C682XpkB.js";import{r as v,h as x}from"./pI06Dkb8.js";import{a as b}from"./BRY5UTQQ.js";import{f as d}from"./DcOKUJR4.js";import Z from"./G1F3Bacz.js";import{D as q}from"./CX2DUt_P.js";import{b as z,T as G}from"./fvoe36K6.js";import{a as H}from"./D4oUL8iA.js";import{u as J}from"./CJ1p9Ehj.js";import{u as Q}from"./BWID9sOX.js";import{T as W}from"./Byi2WFzI.js";import"./yXj_05M0.js";import"./Bhud8mbC.js";import"./DhLu8RVk.js";import"./CWHHmK0V.js";import"./tESAK1vk.js";import"./B79Hoqpc.js";import"./BqnRxGiA.js";import"./cMkL48JQ.js";import"./iZ-xiGRB.js";import"./BSLzRQpY.js";import"./RwcpOhWN.js";import"./B-d7gz-d.js";import"./CNJ8Vm0G.js";import"./Bpf-t_rp.js";import"./yHxjwlra.js";import"./KG16xCEZ.js";import"./FcRkkR--.js";import"./DP0doleY.js";import"./BAtzogEJ.js";import"./DYJY2RZG.js";import"./a1m94JqE.js";import"./CM8mMzv6.js";import"./BuQ9u7Je.js";import"./BW5cYMVL.js";import"./DiwqsPB4.js";import"./KcBrPYTF.js";import"./Coj9p228.js";import"./B7Hqpkvs.js";import"./r1Y5hC84.js";import"./C5Oc2f2M.js";import"./CBbadgK0.js";import"./wlXwsacy.js";import"./BNYh59m7.js";import"./CrEL4Vxb.js";import"./CH1bAkoS.js";import"./DaykkcNl.js";import"./D2P12BLM.js";import"./DTJCrQga.js";import"./DDpCYtr5.js";import"./C9UvFovT.js";import"./FaLtR_4n.js";import"./C9L2ikqF.js";import"./B3dHCiEQ.js";import"./BZjcnCH7.js";import"./B_Kqq5Cu.js";import"./BSe03gVj.js";import"./B-6EeO4n.js";import"./CPg0DzIm.js";import"./BphmgIhx.js";import"./ClA_a7pZ.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=J({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=Q("ativos-cadastros-pavimento",o=>U.ativos.cadastros.findAllByTipo(E.sigla,W.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=Z,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(q))},{default:e(()=>[a(K,{mode:"add"})]),_:1},8,["to"])]),key:"0"}:void 0]),1024),a(k,{status:i(c).status.value,schema:i(H),"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(z)[t.data.tipoPavimento]),1)]),_:1}),a(r,{field:"subtipoPista",header:"Subtipo pista",sortable:""},{body:e(t=>[m(n(i(G)[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};
