import{_ as C}from"./G7u0egV4.js";import{d as v,a as T,o as h,f as o,g as e,w as t,R as f,O as D,P as U,W as w,F as M,i as O,A as x,h as s,t as p,n as N}from"./JQJBiNWj.js";import{_ as B}from"./DUQr9DrG.js";import{_ as K}from"./DTOFlTEg.js";import{_ as L}from"./CYDRfonM.js";import{a as E}from"./BRY5UTQQ.js";import V from"./CuNuZBQO.js";import{D as $}from"./DKM0wLqG.js";import{T as A}from"./BKl0aY3w.js";import{a as q}from"./BdkICEVt.js";import{u as z}from"./CL7Msd7o.js";import{u as Z}from"./BfZwoNNq.js";import{h as j,r as G}from"./CLkB_muw.js";import{_ as W}from"./DwxF_264.js";import{_ as H}from"./gxHWKiUc.js";import{_ as J}from"./CMYfa1Mu.js";import Q from"./DPeK_S5k.js";import{A as X}from"./Bli8EQqv.js";import{A as S}from"./CLzE61HQ.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"./D7IyRfqO.js";import"./CbtPaznW.js";import"./Dc_YXEFz.js";import"./DmwTwIPt.js";import"./FcRkkR--.js";import"./CRodc3LN.js";import"./DncddsCV.js";import"./Dm5UwSfy.js";import"./BweM3Zv8.js";import"./BAmc1GPw.js";import"./BagArUDo.js";const Y={class:"base-grid grid lg:grid-cols-4 grid-cols-2"},oo=v({__name:"Filtros",setup(b){return(m,d)=>{const n=W,u=Q,l=H,_=J;return h(),T("div",Y,[o(n,{"tipo-ativo":e(S).TipoAtivo.EquipamentoProtecaoSeguranca,"show-tipo-elemento":!1},null,8,["tipo-ativo"]),o(l,{name:"tipoEps",label:"Tipo elemento:"},{default:t(()=>[o(u,{id:"sinalizacao_tipos",name:"tipoEps",options:e(X).TIPOS_SINALIZACAO_EPS,"option-label":"label","option-value":"value",placeholder:"Selecione...",filter:"","show-toggle-all":!1,"show-clear":""},null,8,["options"])]),_:1}),o(l,{name:"idEspecificacaoEps",label:"Especificação:"},{default:t(()=>[o(_,{name:"idEspecificacaoEps","campo-referencia":"idEspecificacaoEps","tipo-ativo":e(S).TipoAtivo.EquipamentoProtecaoSeguranca,multi:!0},null,8,["tipo-ativo"])]),_:1})])}}}),to=Object.assign(oo,{__name:"AtivosElementoSinalizacaoEpsFiltros"}),vt=v({__name:"index",async setup(b){let m,d;const n=z({view:f.ATV_VISUALIZAR_CADASTRO_EPS,add:f.ATV_EDITAR_CADASTRO_EPS}),u=D(),l=([m,d]=U(()=>u.getEmpresaSelecionada()),m=await m,d(),m),_=Z(A.EquipamentoProtecaoSeguranca,i=>O.ativos.cadastros.findAllByTipo(l.sigla,A.EquipamentoProtecaoSeguranca,i));function g(i){(n.value.view||n.value.view)&&N(G(i.data.id.idElemento),j(i))}const R={BARREIRA_RIGIDA:"Barreira rígida",DEFENSA_METALICA:"Defensa metálica",TELA_ANTIOFUSCANTE:"Tela antiofuscante",ATENUADOR_IMPACTO:"Atenuador de impacto"};return(i,ao)=>{const I=C,F=x,P=B,k=K,r=V,y=L;return h(),T(M,null,[o(P,{title:"Cadastros - EPS"},w({_:2},[e(n).add?{name:"title-buttons",fn:t(()=>[o(F,{to:`../cadastros/eps/${e($)}`},{default:t(()=>[o(I,{mode:"add"})]),_:1},8,["to"])]),key:"0"}:void 0]),1024),o(k,{status:e(_).status.value,schema:e(q),"paginated-url":!0},{default:t(()=>[o(e(to))]),_:1},8,["status","schema"]),o(y,{value:e(_),onRowClick:g},{default:t(()=>[o(r,{field:"codigo",header:"Identificação",sortable:""}),o(r,{field:"tipoEps",header:"Tipo",sortable:""},{body:t(a=>[s(p(R[a.data.tipoEps]),1)]),_:1}),o(r,{field:"especificacao",header:"Especificação",sortable:""},{body:t(a=>{var c;return[s(p((c=a.data.especificacao)==null?void 0:c.nome),1)]}),_:1}),o(r,{field:"rodovia",header:"Rodovia",sortable:"","sort-field":"rodovia.descricao"},{body:t(a=>{var c;return[s(p((c=a.data.rodovia)==null?void 0:c.descricao),1)]}),_:1}),o(r,{field:"ufs",header:"UF",sortable:""},{body:t(a=>[s(p(a.data.uf),1)]),_:1}),o(r,{field:"kmInicial",header:"KM inicial",sortable:""},{body:t(a=>[s(p(("applyKmEstacaMask"in i?i.applyKmEstacaMask:e(E))(a.data.kmInicial)),1)]),_:1}),o(r,{field:"kmFinal",header:"KM final",sortable:""},{body:t(a=>[s(p(("applyKmEstacaMask"in i?i.applyKmEstacaMask:e(E))(a.data.kmFinal)),1)]),_:1})]),_:1},8,["value"])],64)}}});export{vt as default};
