import{_ as y}from"./Brk5FU9k.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,U as C,F as M,i as U,A as w,h as s,t as p,n as N}from"./dVzHJMF1.js";import{_ as K}from"./DDV-HLQE.js";import{_ as V}from"./DSijqxIZ.js";import{_ as B}from"./BqnRxGiA.js";import L from"./C5Oc2f2M.js";import{A as f}from"./wlXwsacy.js";import{A as $}from"./DJzKbefB.js";import{_ as X}from"./CPhxMljB.js";import{_ as j}from"./C682XpkB.js";import{r as v,h as Z}from"./pI06Dkb8.js";import{a as F}from"./BRY5UTQQ.js";import{D as q}from"./CX2DUt_P.js";import{T as z,u as G,w as H}from"./Byi2WFzI.js";import{b as J}from"./VAJ5YBGY.js";import{u as Q}from"./CJ1p9Ehj.js";import{u as W}from"./BWID9sOX.js";import r from"./G1F3Bacz.js";import"./yXj_05M0.js";import"./Bhud8mbC.js";import"./DhLu8RVk.js";import"./CWHHmK0V.js";import"./tESAK1vk.js";import"./B79Hoqpc.js";import"./RwcpOhWN.js";import"./B-d7gz-d.js";import"./BSLzRQpY.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"./BNYh59m7.js";import"./CrEL4Vxb.js";import"./cMkL48JQ.js";import"./iZ-xiGRB.js";import"./CBbadgK0.js";import"./fvoe36K6.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";import"./C3JtJyG7.js";import"./D4oUL8iA.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($).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=Q({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=W("ativos-cadastros-faixa-dominio-acesso",e=>U.ativos.cadastros.findAllByTipo(_.sigla,z.FaixaDominioAcesso,e));function h(e){(n.value.view||n.value.add)&&N(v(e.data.id.idElemento),Z(e))}return(e,io)=>{const E=y,D=w,O=K,R=to,x=X,k=j;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(q))},{default:i(()=>[t(E,{mode:"add"})]),_:1},8,["to"])]),key:"0"}:void 0]),1024),t(x,{status:o(d).status.value,schema:o(J),"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(G)[a.data.tipoAcesso]),1)]),_:1}),t(o(r),{field:"tipoProprietario",header:"Tipo de prorietário ",sortable:""},{body:i(a=>[s(p(o(H)[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};
