import{_ as y}from"./G7u0egV4.js";import{d as b,a as I,o as S,f as t,g as o,w as i,R as A,O as g,P,W as C,F as M,i as U,A as w,h as s,t as p,n as N}from"./JQJBiNWj.js";import{_ as K}from"./DUQr9DrG.js";import{_ as V}from"./DwxF_264.js";import{_ as B}from"./gxHWKiUc.js";import L from"./BBDFeM-T.js";import{A as f}from"./Bli8EQqv.js";import{A as X}from"./CLzE61HQ.js";import{_ as $}from"./DTOFlTEg.js";import{_ as Z}from"./CYDRfonM.js";import{r as v,h as j}from"./CLkB_muw.js";import{a as F}from"./BRY5UTQQ.js";import{D as W}from"./DKM0wLqG.js";import{T as q,X as z,Z as G}from"./BKl0aY3w.js";import{b as H}from"./D4TYLqES.js";import{u as J}from"./CL7Msd7o.js";import{u as Q}from"./BfZwoNNq.js";import r from"./CuNuZBQO.js";import"./HM4z-iuB.js";import"./DqVYbxj5.js";import"./BwwR4PPN.js";import"./B6O9xiO5.js";import"./CxkaGOlL.js";import"./BgAkS4D_.js";import"./D7IyRfqO.js";import"./CbtPaznW.js";import"./Dc_YXEFz.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"./CRodc3LN.js";import"./DncddsCV.js";import"./Dm5UwSfy.js";import"./D42GNhrT.js";import"./BuR5k2Xw.js";import"./BagArUDo.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";import"./C3JtJyG7.js";import"./BlGPNclf.js";const Y={class:"base-grid grid lg:grid-cols-4 grid-cols-2"},oo=b({__name:"Filtros",setup(T){return(m,c)=>{const n=V,l=L,_=B;return S(),I("div",Y,[t(n,{"tipo-ativo":o(X).TipoAtivo.FaixaDominioAcesso,"show-tipo-elemento":!1},null,8,["tipo-ativo"]),t(_,{name:"tipoAcesso",label:"Tipo:"},{default:i(()=>[t(l,{id:"tipoAcesso",name:"tipoAcesso",options:o(f).FAIXA_DOMINIO.TIPO_ACESSO_FDA,"option-label":"label","option-value":"value",placeholder:"Selecione...",filter:""},null,8,["options"])]),_:1}),t(_,{name:"tipoProprietario",label:"Tipo de proprietário:"},{default:i(()=>[t(l,{id:"tipoProprietario",name:"tipoProprietario",options:o(f).FAIXA_DOMINIO.TIPO_PROPRIETARIO,"option-label":"label","option-value":"value",placeholder:"Selecione...",filter:""},null,8,["options"])]),_:1})])}}}),to=Object.assign(oo,{__name:"AtivosElementoFaixaDominioAcessoFiltros"}),Ft=b({__name:"index",async setup(T){let m,c;const n=J({view:A.ATV_VISUALIZAR_CADASTRO_FAIXA_DOMINIO_ACESSO,add:A.ATV_EDITAR_CADASTRO_FAIXA_DOMINIO_ACESSO}),l=g(),_=([m,c]=P(()=>l.getEmpresaSelecionada()),m=await m,c(),m),d=Q("ativos-cadastros-faixa-dominio-acesso",e=>U.ativos.cadastros.findAllByTipo(_.sigla,q.FaixaDominioAcesso,e));function h(e){(n.value.view||n.value.add)&&N(v(e.data.id.idElemento),j(e))}return(e,io)=>{const E=y,D=w,O=K,R=to,x=$,k=Z;return S(),I(M,null,[t(O,{title:"Cadastros - Faixa de domínio - Acesso"},C({_:2},[o(n).add?{name:"title-buttons",fn:i(()=>[t(D,{to:("resolveRelativeRoute"in e?e.resolveRelativeRoute:o(v))(o(W))},{default:i(()=>[t(E,{mode:"add"})]),_:1},8,["to"])]),key:"0"}:void 0]),1024),t(x,{status:o(d).status.value,schema:o(H),"paginated-url":""},{default:i(()=>[t(R)]),_:1},8,["status","schema"]),t(k,{value:o(d),onRowClick:h},{default:i(()=>[t(o(r),{field:"codigo",header:"Identificação",sortable:""}),t(o(r),{field:"tipoAcesso",header:"Tipo",sortable:""},{body:i(a=>[s(p(o(z)[a.data.tipoAcesso]),1)]),_:1}),t(o(r),{field:"tipoProprietario",header:"Tipo de prorietário ",sortable:""},{body:i(a=>[s(p(o(G)[a.data.tipoProprietario]),1)]),_:1}),t(o(r),{field:"rodovia",header:"Rodovia",sortable:"","sort-field":"rodovia.descricao"},{body:i(a=>{var u;return[s(p((u=a.data.rodovia)==null?void 0:u.descricao),1)]}),_:1}),t(o(r),{field:"uf",header:"UF",sortable:""},{body:i(a=>[s(p(a.data.uf),1)]),_:1}),t(o(r),{field:"kmInicial",header:"KM inicial",sortable:""},{body:i(a=>[s(p(("applyKmEstacaMask"in e?e.applyKmEstacaMask:o(F))(a.data.kmInicial)),1)]),_:1}),t(o(r),{field:"kmFinal",header:"KM final",sortable:""},{body:i(a=>[s(p(("applyKmEstacaMask"in e?e.applyKmEstacaMask:o(F))(a.data.kmFinal)),1)]),_:1})]),_:1},8,["value"])],64)}}});export{Ft as default};
