import{_ as M}from"./G7u0egV4.js";import{d as b,a as E,o as h,f as o,g as i,w as e,R as A,O as U,P as I,W as w,F as x,i as N,A as O,h as s,t as m,n as K}from"./JQJBiNWj.js";import{_ as P}from"./DUQr9DrG.js";import{_ as V}from"./DTOFlTEg.js";import{_ as B}from"./CYDRfonM.js";import{r as g,h as L}from"./CLkB_muw.js";import{a as v}from"./BRY5UTQQ.js";import $ from"./CuNuZBQO.js";import{D as G}from"./DKM0wLqG.js";import{A as _}from"./CLzE61HQ.js";import{a as j}from"./HFT9CEIP.js";import{u as z}from"./CL7Msd7o.js";import{u as W}from"./BfZwoNNq.js";import{_ as Z}from"./DwxF_264.js";import{_ as q}from"./CMYfa1Mu.js";import{_ as H}from"./gxHWKiUc.js";import J from"./BBDFeM-T.js";import{A as Q}from"./Bli8EQqv.js";import{T as X}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"./DMxbovom.js";import"./DBWLnasn.js";import"./RO0fiRDZ.js";import"./Cr9ZZaT-.js";import"./DNRi6U01.js";import"./BYfmWBgX.js";import"./CJYlvWEf.js";import"./CeWG_dyW.js";import"./CDSORL4U.js";import"./vkXHPWu2.js";import"./BuR5k2Xw.js";import"./ClVEEBFD.js";import"./2JTb7YQn.js";import"./Dk4pWsnS.js";import"./BSHuRY0P.js";import"./3oa0FK2h.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"./DPeK_S5k.js";import"./BAmc1GPw.js";import"./CRodc3LN.js";import"./DncddsCV.js";import"./BweM3Zv8.js";import"./Dm5UwSfy.js";import"./BagArUDo.js";const Y={class:"base-grid grid lg:grid-cols-4 grid-cols-2"},oo=b({__name:"Filtros",setup(S){return(p,f)=>{const l=Z,u=q,c=H,d=J;return h(),E("div",Y,[o(l,{"tipo-ativo":i(_).TipoAtivo.Drenagem},null,8,["tipo-ativo"]),o(c,{name:"sigla",label:"Sigla:"},{default:e(()=>[o(u,{name:"sigla","campo-referencia":"idSigla","tipo-ativo":i(_).TipoAtivo.Drenagem,multi:""},null,8,["tipo-ativo"])]),_:1}),o(c,{name:"classificacao",label:"Classificação:"},{default:e(()=>[o(d,{id:"classificacao",name:"classificacao",options:i(Q).TIPO_CLASSIFICACAO_DRENAGEM,"option-label":"label","option-value":"value",placeholder:"Selecione...","show-clear":"","show-toggle-all":!1,filter:""},null,8,["options"])]),_:1})])}}}),to=Object.assign(oo,{__name:"AtivosElementoDrenagemFiltros"}),bt=b({__name:"index",async setup(S){let p,f;const l=z({view:A.ATV_VISUALIZAR_CADASTRO_DRENAGEM,add:A.ATV_EDITAR_CADASTRO_DRENAGEM}),u=U(),c=([p,f]=I(()=>u.getEmpresaSelecionada()),p=await p,f(),p),d=W("ativos-cadastros-drenagem",a=>N.ativos.cadastros.findAllByTipo(c.sigla,X.Drenagem,a));function D(a){return a&&a.charAt(0).toUpperCase()+a.slice(1)}function R(a){(l.value.view||l.value.add)&&K(g(a.data.id.idElemento),L(a))}return(a,ao)=>{const C=M,T=O,y=P,k=V,r=$,F=B;return h(),E(x,null,[o(y,{title:"Cadastros - Drenagem/OAC"},w({_:2},[i(l).add?{name:"title-buttons",fn:e(()=>[o(T,{to:("resolveRelativeRoute"in a?a.resolveRelativeRoute:i(g))(i(G))},{default:e(()=>[o(C,{mode:"add"})]),_:1},8,["to"])]),key:"0"}:void 0]),1024),o(k,{status:i(d).status.value,schema:i(j),"paginated-url":""},{default:e(()=>[o(i(to))]),_:1},8,["status","schema"]),o(F,{value:i(d),onRowClick:R},{default:e(()=>[o(r,{field:"codigo",header:"Identificação",sortable:""}),o(r,{field:"classificacao",header:"Classificação",sortable:""},{body:e(t=>[s(m(D(t.data.classificacao)),1)]),_:1}),o(r,{field:"tipoElemento.descricao",header:"Tipo",sortable:""},{body:e(t=>{var n;return[s(m((n=t.data.tipoElemento)==null?void 0:n.descricao),1)]}),_:1}),o(r,{field:"sigla",header:"Sigla",sortable:""},{body:e(t=>{var n;return[s(m(((n=t.data.sigla)==null?void 0:n.nome)||"Não se aplica"),1)]}),_:1}),o(r,{field:"rodovia",header:"Rodovia",sortable:"","sort-field":"rodovia.descricao"},{body:e(t=>{var n;return[s(m((n=t.data.rodovia)==null?void 0:n.descricao),1)]}),_:1}),o(r,{field:"uf",header:"UF",sortable:""},{body:e(t=>[s(m(t.data.uf),1)]),_:1}),o(r,{field:"kmInicial",header:"KM inicial",sortable:""},{body:e(t=>[s(m(("applyKmEstacaMask"in a?a.applyKmEstacaMask:i(v))(t.data.kmInicial)),1)]),_:1}),o(r,{field:"kmFinal",header:"KM final",sortable:""},{body:e(t=>[s(m(("applyKmEstacaMask"in a?a.applyKmEstacaMask:i(v))(t.data.kmFinal)),1)]),_:1}),o(r,{field:"sentido",header:"Sentido",sortable:""},{body:e(t=>[s(m(i(_).Enums.TipoSentido[t.data.sentido]),1)]),_:1}),o(r,{field:"direcao",header:"Direção",sortable:""},{body:e(t=>[s(m(i(_).Enums.TipoDirecao[t.data.direcao]),1)]),_:1})]),_:1},8,["value"])],64)}}});export{bt as default};
