import{_ as I}from"./Brk5FU9k.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,U as H,w as e,F as w,i as U,A as x,h as s,t as m,n as M}from"./dVzHJMF1.js";import{_ as N}from"./DDV-HLQE.js";import{_ as L}from"./DSijqxIZ.js";import{A as c}from"./DJzKbefB.js";import{_ as K}from"./CPhxMljB.js";import{_ as B}from"./C682XpkB.js";import{r as f,h as P}from"./pI06Dkb8.js";import{a as A}from"./BRY5UTQQ.js";import V from"./G1F3Bacz.js";import{D as Z}from"./CX2DUt_P.js";import{a as $}from"./D4oUL8iA.js";import{u as j}from"./CJ1p9Ehj.js";import{u as q}from"./BWID9sOX.js";import{T as G}from"./Byi2WFzI.js";import"./yXj_05M0.js";import"./Bhud8mbC.js";import"./DhLu8RVk.js";import"./CWHHmK0V.js";import"./tESAK1vk.js";import"./B79Hoqpc.js";import"./BqnRxGiA.js";import"./cMkL48JQ.js";import"./iZ-xiGRB.js";import"./BSLzRQpY.js";import"./RwcpOhWN.js";import"./B-d7gz-d.js";import"./CNJ8Vm0G.js";import"./Bpf-t_rp.js";import"./yHxjwlra.js";import"./KG16xCEZ.js";import"./FcRkkR--.js";import"./DP0doleY.js";import"./BAtzogEJ.js";import"./DYJY2RZG.js";import"./a1m94JqE.js";import"./CM8mMzv6.js";import"./BuQ9u7Je.js";import"./BW5cYMVL.js";import"./DiwqsPB4.js";import"./KcBrPYTF.js";import"./Coj9p228.js";import"./B7Hqpkvs.js";import"./r1Y5hC84.js";import"./C5Oc2f2M.js";import"./CBbadgK0.js";import"./wlXwsacy.js";import"./fvoe36K6.js";import"./BNYh59m7.js";import"./CrEL4Vxb.js";import"./CH1bAkoS.js";import"./DaykkcNl.js";import"./D2P12BLM.js";import"./DTJCrQga.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"./CPg0DzIm.js";import"./BphmgIhx.js";import"./ClA_a7pZ.js";const J={class:"base-grid grid lg:grid-cols-4 grid-cols-2"},Q=h({__name:"Filters",setup(S){return(n,l)=>{const p=L;return v(),T("div",J,[o(p,{"tipo-ativo":i(c).TipoAtivo.SinalizacaoHorizontalTachaTachoes,"show-tipo-elemento":!1},null,8,["tipo-ativo"])])}}}),W=Object.assign(Q,{__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),_=q("ativos-cadastros-sinalizacao-tacha-tachoes",t=>U.ativos.cadastros.findAllByTipo(R.sigla,G.SinalizacaoHorizontalTachaTachoes,t));function b(t){(p.value.add||p.value.view)&&M(f(t.data.id.idElemento),P(t))}return(t,X)=>{const C=I,k=x,y=N,g=W,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};
