import{_ as C}from"./G7u0egV4.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,W as V,w as r,F as z,i as O,A as w,h as s,t as m,n as N}from"./JQJBiNWj.js";import{_ as U}from"./DUQr9DrG.js";import{_ as x}from"./DTOFlTEg.js";import{_ as L}from"./CYDRfonM.js";import{r as f,h as H}from"./CLkB_muw.js";import{a as A}from"./BRY5UTQQ.js";import K from"./CuNuZBQO.js";import{D as B}from"./DKM0wLqG.js";import{A as d}from"./CLzE61HQ.js";import{a as P}from"./HFT9CEIP.js";import{u as Z}from"./CL7Msd7o.js";import{u as $}from"./BfZwoNNq.js";import{_ as j}from"./DwxF_264.js";import{T as W}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"./BlGPNclf.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 q={class:"base-grid grid lg:grid-cols-4 grid-cols-2"},G=v({__name:"Filters",setup(E){return(n,c)=>{const p=j;return R(),S("div",q,[o(p,{"tipo-ativo":t(d).TipoAtivo.SinalizacaoHorizontalMarcasViarias},null,8,["tipo-ativo"])])}}}),J=Object.assign(G,{__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,W.SinalizacaoHorizontalMarcasViarias,i));function T(i){(p.value.add||p.value.view)&&N(f(i.data.id.idElemento),H(i))}return(i,Q)=>{const I=C,y=w,M=U,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(J))]),_: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};
