import{_ as C}from"./Brk5FU9k.js";import{d as v,a as S,o as R,f as o,g as t,R as u,O as D,P as F,U as V,w as r,F as z,i as O,A as U,h as s,t as m,n as w}from"./dVzHJMF1.js";import{_ as N}from"./DDV-HLQE.js";import{_ as x}from"./CPhxMljB.js";import{_ as L}from"./C682XpkB.js";import{r as f,h as H}from"./pI06Dkb8.js";import{a as A}from"./BRY5UTQQ.js";import K from"./G1F3Bacz.js";import{D as B}from"./CX2DUt_P.js";import{A as d}from"./DJzKbefB.js";import{a as P}from"./CBivZMLc.js";import{u as Z}from"./CJ1p9Ehj.js";import{u as $}from"./BWID9sOX.js";import{_ as j}from"./DSijqxIZ.js";import{T as q}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"./D4oUL8iA.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 G={class:"base-grid grid lg:grid-cols-4 grid-cols-2"},J=v({__name:"Filters",setup(E){return(n,c)=>{const p=j;return R(),S("div",G,[o(p,{"tipo-ativo":t(d).TipoAtivo.SinalizacaoHorizontalMarcasViarias},null,8,["tipo-ativo"])])}}}),Q=Object.assign(J,{__name:"AtivosElementoSinalizacaoHorizontalMarcasViariasFilters"}),da=v({__name:"index",async setup(E){let n,c;const p=Z({view:u.ATV_VISUALIZAR_CADASTRO_SINALIZACAO_HORIZONTAL_MARCAS_VIARIAS,add:u.ATV_EDITAR_CADASTRO_SINALIZACAO_HORIZONTAL_MARCAS_VIARIAS}),b=D(),h=([n,c]=F(()=>b.getEmpresaSelecionada()),n=await n,c(),n),_=$("ativos-cadastros-sinalizacao-marcas-viarias",i=>O.ativos.cadastros.findAllByTipo(h.sigla,q.SinalizacaoHorizontalMarcasViarias,i));function T(i){(p.value.add||p.value.view)&&w(f(i.data.id.idElemento),H(i))}return(i,W)=>{const I=C,y=U,M=N,g=x,e=K,k=L;return R(),S(z,null,[o(M,{title:"Cadastros - Sinalização Horizontal - Marcas Viárias"},V({_:2},[t(p).add?{name:"title-buttons",fn:r(()=>[o(y,{to:("resolveRelativeRoute"in i?i.resolveRelativeRoute:t(f))(t(B))},{default:r(()=>[o(I,{mode:"add"})]),_:1},8,["to"])]),key:"0"}:void 0]),1024),o(g,{status:t(_).status.value,schema:t(P),"paginated-url":""},{default:r(()=>[o(t(Q))]),_:1},8,["status","schema"]),o(k,{value:t(_),onRowClick:T},{default:r(()=>[o(e,{field:"codigo",header:"Identificação",sortable:""}),o(e,{field:"tipoElemento.descricao",header:"Tipo",sortable:""},{body:r(a=>{var l;return[s(m((l=a.data.tipoElemento)==null?void 0:l.descricao),1)]}),_:1}),o(e,{field:"rodovia",header:"Rodovia",sortable:"","sort-field":"rodovia.descricao"},{body:r(a=>{var l;return[s(m((l=a.data.rodovia)==null?void 0:l.descricao),1)]}),_:1}),o(e,{field:"uf",header:"UF",sortable:""},{body:r(a=>[s(m(a.data.uf),1)]),_:1}),o(e,{field:"kmInicial",header:"KM inicial",sortable:""},{body:r(a=>[s(m(("applyKmEstacaMask"in i?i.applyKmEstacaMask:t(A))(a.data.kmInicial)),1)]),_:1}),o(e,{field:"kmFinal",header:"KM final",sortable:""},{body:r(a=>[s(m(("applyKmEstacaMask"in i?i.applyKmEstacaMask:t(A))(a.data.kmFinal)),1)]),_:1}),o(e,{field:"sentido",header:"Sentido",sortable:""},{body:r(a=>[s(m(t(d).Enums.TipoSentido[a.data.sentido]),1)]),_:1}),o(e,{field:"direcao",header:"Direção",sortable:""},{body:r(a=>[s(m(t(d).Enums.TipoDirecao[a.data.direcao]),1)]),_:1})]),_:1},8,["value"])],64)}}});export{da as default};
