import{_ as C}from"./Brk5FU9k.js";import{d as v,a as g,o as S,f as o,g as t,R as u,O as D,P as O,U as F,w as e,F as N,i as z,A as U,h as s,t as n,n as w}from"./dVzHJMF1.js";import{_ as M}from"./DDV-HLQE.js";import{_ as x}from"./CPhxMljB.js";import{_ as H}from"./C682XpkB.js";import{r as f,h as K}from"./pI06Dkb8.js";import{a as A}from"./BRY5UTQQ.js";import B from"./G1F3Bacz.js";import{D as P}from"./CX2DUt_P.js";import{A as d}from"./DJzKbefB.js";import{a as V}from"./D4oUL8iA.js";import{u as Z}from"./CJ1p9Ehj.js";import{u as $}from"./BWID9sOX.js";import{_ as G}from"./DSijqxIZ.js";import{T as j}from"./Byi2WFzI.js";import"./yXj_05M0.js";import"./Bhud8mbC.js";import"./DhLu8RVk.js";import"./CWHHmK0V.js";import"./tESAK1vk.js";import"./B79Hoqpc.js";import"./iZ-xiGRB.js";import"./CH1bAkoS.js";import"./DaykkcNl.js";import"./D2P12BLM.js";import"./DTJCrQga.js";import"./C5Oc2f2M.js";import"./CBbadgK0.js";import"./a1m94JqE.js";import"./CM8mMzv6.js";import"./DP0doleY.js";import"./BAtzogEJ.js";import"./B7Hqpkvs.js";import"./DiwqsPB4.js";import"./KcBrPYTF.js";import"./r1Y5hC84.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"./BuQ9u7Je.js";import"./BW5cYMVL.js";import"./CPg0DzIm.js";import"./BphmgIhx.js";import"./ClA_a7pZ.js";import"./Bpf-t_rp.js";import"./yHxjwlra.js";import"./KG16xCEZ.js";import"./BqnRxGiA.js";import"./cMkL48JQ.js";import"./BSLzRQpY.js";import"./RwcpOhWN.js";import"./B-d7gz-d.js";import"./CNJ8Vm0G.js";import"./FcRkkR--.js";import"./DYJY2RZG.js";import"./Coj9p228.js";import"./wlXwsacy.js";import"./fvoe36K6.js";import"./BNYh59m7.js";import"./CrEL4Vxb.js";const q={class:"base-grid grid lg:grid-cols-4 grid-cols-2"},J=v({__name:"Filters",setup(h){return(m,l)=>{const p=G;return S(),g("div",q,[o(p,{"tipo-ativo":t(d).TipoAtivo.SinalizacaoHorizontalLongitudinal,"show-tipo-elemento":!1},null,8,["tipo-ativo"])])}}}),Q=Object.assign(J,{__name:"AtivosElementoSinalizacaoHorizontalLongitudinalFilters"}),dt=v({__name:"index",async setup(h){let m,l;const p=Z({view:u.ATV_VISUALIZAR_CADASTRO_SINALIZACAO_HORIZONTAL_LONGITUDINAL,add:u.ATV_EDITAR_CADASTRO_SINALIZACAO_HORIZONTAL_LONGITUDINAL}),E=D(),R=([m,l]=O(()=>E.getEmpresaSelecionada()),m=await m,l(),m),_=$("ativos-cadastros-sinalizacao-longitudinal",i=>z.ativos.cadastros.findAllByTipo(R.sigla,j.SinalizacaoHorizontalLongitudinal,i));function T(i){(p.value.add||p.value.view)&&w(f(i.data.id.idElemento),K(i))}return(i,W)=>{const b=C,I=U,L=M,k=x,r=B,y=H;return S(),g(N,null,[o(L,{title:"Cadastros - Sinalização Horizontal - Longitudinal"},F({_:2},[t(p).add?{name:"title-buttons",fn:e(()=>[o(I,{to:("resolveRelativeRoute"in i?i.resolveRelativeRoute:t(f))(t(P))},{default:e(()=>[o(b,{mode:"add"})]),_:1},8,["to"])]),key:"0"}:void 0]),1024),o(k,{status:t(_).status.value,schema:t(V),"paginated-url":""},{default:e(()=>[o(t(Q))]),_:1},8,["status","schema"]),o(y,{value:t(_),onRowClick:T},{default:e(()=>[o(r,{field:"codigo",header:"Identificação",sortable:""}),o(r,{field:"rodovia",header:"Rodovia",sortable:"","sort-field":"rodovia.descricao"},{body:e(a=>{var c;return[s(n((c=a.data.rodovia)==null?void 0:c.descricao),1)]}),_:1}),o(r,{field:"uf",header:"UF",sortable:""},{body:e(a=>[s(n(a.data.uf),1)]),_:1}),o(r,{field:"kmInicial",header:"KM inicial",sortable:""},{body:e(a=>[s(n(("applyKmEstacaMask"in i?i.applyKmEstacaMask:t(A))(a.data.kmInicial)),1)]),_:1}),o(r,{field:"kmFinal",header:"KM final",sortable:""},{body:e(a=>[s(n(("applyKmEstacaMask"in i?i.applyKmEstacaMask:t(A))(a.data.kmFinal)),1)]),_:1}),o(r,{field:"sentido",header:"Sentido",sortable:""},{body:e(a=>[s(n(t(d).Enums.TipoSentido[a.data.sentido]),1)]),_:1}),o(r,{field:"direcao",header:"Direção",sortable:""},{body:e(a=>[s(n(t(d).Enums.TipoDirecao[a.data.direcao]),1)]),_:1})]),_:1},8,["value"])],64)}}});export{dt as default};
