import{_ as I}from"./Brk5FU9k.js";import{_ as F}from"./DDV-HLQE.js";import{_ as V}from"./CPhxMljB.js";import{_ as w}from"./C682XpkB.js";import{d as A,a as E,o as S,f as a,g as o,R as _,O as U,P as M,U as O,w as e,F as z,i as K,n as u,h as p,t as n}from"./dVzHJMF1.js";import{r as f,h as D}from"./pI06Dkb8.js";import{a as v}from"./BRY5UTQQ.js";import{T as L}from"./Byi2WFzI.js";import{a as N}from"./D4oUL8iA.js";import{u as B}from"./CJ1p9Ehj.js";import{u as P}from"./BWID9sOX.js";import{_ as x}from"./DSijqxIZ.js";import{A as Z}from"./DJzKbefB.js";import r from"./G1F3Bacz.js";import"./yXj_05M0.js";import"./Bhud8mbC.js";import"./DhLu8RVk.js";import"./CWHHmK0V.js";import"./tESAK1vk.js";import"./B79Hoqpc.js";import"./CX2DUt_P.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 $={class:"base-grid grid lg:grid-cols-4 grid-cols-2"},j=A({__name:"Filtros",setup(R){return(s,l)=>{const m=x;return S(),E("div",$,[a(m,{"tipo-ativo":o(Z).TipoAtivo.SinalizacaoVertical},null,8,["tipo-ativo"])])}}}),q=Object.assign(j,{__name:"AtivosElementoSinalizacaoVerticalFiltros"}),st=A({__name:"index",async setup(R){let s,l;const m=B({view:_.ATV_VISUALIZAR_CADASTRO_SINALIZACAO_VERTICAL,add:_.ATV_EDITAR_CADASTRO_SINALIZACAO_VERTICAL}),g=U(),h=([s,l]=M(()=>g.getEmpresaSelecionada()),s=await s,l(),s),c=P("sinalizacao-vertical",t=>K.ativos.cadastros.findAllByTipo(h.sigla,L.SinalizacaoVertical,t));function T(t){(m.value.add||m.value.view)&&u(f(t.data.id.idElemento),D(t))}return(t,d)=>{const b=I,C=F,k=V,y=w;return S(),E(z,null,[a(C,{title:"Cadastros - Sinalização Vertical"},O({_:2},[o(m).add?{name:"title-buttons",fn:e(()=>[a(b,{mode:"add",onClick:d[0]||(d[0]=i=>("navigateTo"in t?t.navigateTo:o(u))(("resolveRelativeRoute"in t?t.resolveRelativeRoute:o(f))("adicionar")))})]),key:"0"}:void 0]),1024),a(k,{status:o(c).status.value,schema:o(N)},{default:e(()=>[a(o(q))]),_:1},8,["status","schema"]),a(y,{value:o(c),onRowClick:T},{default:e(()=>[a(o(r),{field:"codigo",header:"Identificação",sortable:""}),a(o(r),{field:"codigoPlaca",header:"Código da placa",sortable:""}),a(o(r),{field:"tipoElemento.descricao",header:"Tipo",sortable:""},{body:e(i=>[p(n(i.data.tipoElemento.descricao),1)]),_:1}),a(o(r),{field:"rodovia",header:"Rodovia",sortable:"","sort-field":"rodovia.descricao"},{body:e(i=>[p(n(i.data.rodovia.descricao),1)]),_:1}),a(o(r),{field:"uf",header:"UF",sortable:""}),a(o(r),{field:"kmInicial",header:"KM inicial",sortable:""},{body:e(i=>[p(n(("applyKmEstacaMask"in t?t.applyKmEstacaMask:o(v))(i.data.kmInicial)),1)]),_:1}),a(o(r),{field:"kmFinal",header:"KM final",sortable:""},{body:e(i=>[p(n(("applyKmEstacaMask"in t?t.applyKmEstacaMask:o(v))(i.data.kmFinal)),1)]),_:1})]),_:1},8,["value"])],64)}}});export{st as default};
