import{_ as C}from"./G7u0egV4.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,W as F,w as e,F as N,i as z,A as U,h as s,t as n,n as w}from"./JQJBiNWj.js";import{_ as M}from"./DUQr9DrG.js";import{_ as x}from"./DTOFlTEg.js";import{_ as H}from"./CYDRfonM.js";import{r as f,h as K}from"./CLkB_muw.js";import{a as A}from"./BRY5UTQQ.js";import B from"./CuNuZBQO.js";import{D as P}from"./DKM0wLqG.js";import{A as d}from"./CLzE61HQ.js";import{a as V}from"./BlGPNclf.js";import{u as Z}from"./CL7Msd7o.js";import{u as $}from"./BfZwoNNq.js";import{_ as G}from"./DwxF_264.js";import{T as j}from"./BKl0aY3w.js";import"./HM4z-iuB.js";import"./DqVYbxj5.js";import"./BwwR4PPN.js";import"./B6O9xiO5.js";import"./CxkaGOlL.js";import"./BgAkS4D_.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 W={class:"base-grid grid lg:grid-cols-4 grid-cols-2"},q=v({__name:"Filters",setup(h){return(m,l)=>{const p=G;return S(),g("div",W,[o(p,{"tipo-ativo":t(d).TipoAtivo.SinalizacaoHorizontalLongitudinal,"show-tipo-elemento":!1},null,8,["tipo-ativo"])])}}}),J=Object.assign(q,{__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,Q)=>{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(J))]),_: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};
