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