import{_ as I}from"./G7u0egV4.js";import{_ as F}from"./DUQr9DrG.js";import{_ as V}from"./DTOFlTEg.js";import{_ as w}from"./CYDRfonM.js";import{d as A,a as E,o as S,f as i,g as o,R as _,O as M,P as O,W as U,w as e,F as z,i as K,n as u,h as n,t as p}from"./JQJBiNWj.js";import{r as f,h as D}from"./CLkB_muw.js";import{a as v}from"./BRY5UTQQ.js";import{T as L}from"./BKl0aY3w.js";import{a as N}from"./BlGPNclf.js";import{u as B}from"./CL7Msd7o.js";import{u as x}from"./BfZwoNNq.js";import{_ as P}from"./DwxF_264.js";import{A as Z}from"./CLzE61HQ.js";import r from"./CuNuZBQO.js";import"./HM4z-iuB.js";import"./DqVYbxj5.js";import"./BwwR4PPN.js";import"./B6O9xiO5.js";import"./CxkaGOlL.js";import"./BgAkS4D_.js";import"./DKM0wLqG.js";import"./D42GNhrT.js";import"./CH1bAkoS.js";import"./Dd3ROLQd.js";import"./f6QOa6wf.js";import"./Tk23Dwa0.js";import"./BBDFeM-T.js";import"./BuR5k2Xw.js";import"./ClVEEBFD.js";import"./2JTb7YQn.js";import"./Dk4pWsnS.js";import"./BSHuRY0P.js";import"./CJYlvWEf.js";import"./CeWG_dyW.js";import"./CDSORL4U.js";import"./3oa0FK2h.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"./CeGk6Fsr.js";import"./D1rKqwCM.js";import"./CfLdzzlL.js";import"./CjLYEAc3.js";import"./BTchAptP.js";import"./B-La3K3C.js";import"./F98GHXdS.js";import"./DvBDpJyt.js";import"./gxHWKiUc.js";import"./Dm5UwSfy.js";import"./Dc_YXEFz.js";import"./D7IyRfqO.js";import"./CbtPaznW.js";import"./DmwTwIPt.js";import"./FcRkkR--.js";import"./DPeK_S5k.js";import"./BAmc1GPw.js";import"./Bli8EQqv.js";import"./BagArUDo.js";import"./CRodc3LN.js";import"./DncddsCV.js";const $={class:"base-grid grid lg:grid-cols-4 grid-cols-2"},j=A({__name:"Filtros",setup(R){return(s,l)=>{const m=P;return S(),E("div",$,[i(m,{"tipo-ativo":o(Z).TipoAtivo.SinalizacaoVertical},null,8,["tipo-ativo"])])}}}),W=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}),T=M(),h=([s,l]=O(()=>T.getEmpresaSelecionada()),s=await s,l(),s),c=x("sinalizacao-vertical",t=>K.ativos.cadastros.findAllByTipo(h.sigla,L.SinalizacaoVertical,t));function b(t){(m.value.add||m.value.view)&&u(f(t.data.id.idElemento),D(t))}return(t,d)=>{const g=I,k=F,C=V,y=w;return S(),E(z,null,[i(k,{title:"Cadastros - Sinalização Vertical"},U({_:2},[o(m).add?{name:"title-buttons",fn:e(()=>[i(g,{mode:"add",onClick:d[0]||(d[0]=a=>("navigateTo"in t?t.navigateTo:o(u))(("resolveRelativeRoute"in t?t.resolveRelativeRoute:o(f))("adicionar")))})]),key:"0"}:void 0]),1024),i(C,{status:o(c).status.value,schema:o(N)},{default:e(()=>[i(o(W))]),_:1},8,["status","schema"]),i(y,{value:o(c),onRowClick:b},{default:e(()=>[i(o(r),{field:"codigo",header:"Identificação",sortable:""}),i(o(r),{field:"tipoElemento.descricao",header:"Tipo",sortable:""},{body:e(a=>[n(p(a.data.tipoElemento.descricao),1)]),_:1}),i(o(r),{field:"rodovia",header:"Rodovia",sortable:"","sort-field":"rodovia.descricao"},{body:e(a=>[n(p(a.data.rodovia.descricao),1)]),_:1}),i(o(r),{field:"uf",header:"UF",sortable:""}),i(o(r),{field:"kmInicial",header:"KM inicial",sortable:""},{body:e(a=>[n(p(("applyKmEstacaMask"in t?t.applyKmEstacaMask:o(v))(a.data.kmInicial)),1)]),_:1}),i(o(r),{field:"kmFinal",header:"KM final",sortable:""},{body:e(a=>[n(p(("applyKmEstacaMask"in t?t.applyKmEstacaMask:o(v))(a.data.kmFinal)),1)]),_:1})]),_:1},8,["value"])],64)}}});export{st as default};
