import{_ as I}from"./Brk5FU9k.js";import{d as x,a as A,o as g,f as a,g as i,w as t,R as l,O as S,P as y,U as D,F as U,i as w,A as N,h as _,t as f,n as O}from"./dVzHJMF1.js";import{_ as K}from"./DDV-HLQE.js";import{_ as $}from"./DSijqxIZ.js";import{_ as B}from"./BqnRxGiA.js";import P from"./C9L2ikqF.js";import V from"./B7Hqpkvs.js";import{A as L}from"./DJzKbefB.js";import{_ as j}from"./CPhxMljB.js";import{_ as Z}from"./C682XpkB.js";import{r as u,h as q}from"./pI06Dkb8.js";import{a as E}from"./BRY5UTQQ.js";import z from"./G1F3Bacz.js";import{D as G}from"./CX2DUt_P.js";import{T as v}from"./Byi2WFzI.js";import{a as H}from"./CcBfGqq8.js";import{u as J}from"./CJ1p9Ehj.js";import{u as Q}from"./BWID9sOX.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"./r1Y5hC84.js";import"./C5Oc2f2M.js";import"./CBbadgK0.js";import"./wlXwsacy.js";import"./fvoe36K6.js";import"./BNYh59m7.js";import"./CrEL4Vxb.js";import"./cMkL48JQ.js";import"./iZ-xiGRB.js";import"./B3dHCiEQ.js";import"./BZjcnCH7.js";import"./CH1bAkoS.js";import"./DaykkcNl.js";import"./D2P12BLM.js";import"./DTJCrQga.js";import"./DDpCYtr5.js";import"./C9UvFovT.js";import"./FaLtR_4n.js";import"./B_Kqq5Cu.js";import"./BSe03gVj.js";import"./B-6EeO4n.js";import"./CPg0DzIm.js";import"./BphmgIhx.js";import"./ClA_a7pZ.js";import"./D4oUL8iA.js";const W={class:"base-grid grid lg:grid-cols-4 grid-cols-2"},X=x({__name:"Filtros",setup(b){return(n,c)=>{const s=$,p=V,e=B,m=P;return g(),A("div",W,[a(s,{"tipo-ativo":i(L).TipoAtivo.Edificacao,"split-tipo-parent":!1},null,8,["tipo-ativo"]),a(e,{name:"nomeEdificacao",label:"Nome da edificação:"},{default:t(()=>[a(p,{id:"nome-edificacao",name:"nomeEdificacao",type:"text",placeholder:"Digite o nome da edificação"})]),_:1}),a(e,{name:"areaEdificadaMin",label:"Área edificada mín. (m²):"},{default:t(()=>[a(m,{id:"area-edificada-min",name:"areaEdificadaMin","min-fraction-digits":0,"max-fraction-digits":2,suffix:" m²"})]),_:1}),a(e,{name:"areaEdificadaMax",label:"Área edificada máx. (m²):"},{default:t(()=>[a(m,{id:"area-edificada-max",name:"areaEdificadaMax","min-fraction-digits":0,"max-fraction-digits":2,suffix:" m²"})]),_:1}),a(e,{name:"areaEstacionamentoMin",label:"Área estacionamento mín. (m²):"},{default:t(()=>[a(m,{id:"area-estacionamento-min",name:"areaEstacionamentoMin","min-fraction-digits":0,"max-fraction-digits":2,suffix:" m²"})]),_:1}),a(e,{name:"areaEstacionamentoMax",label:"Área estacionamento máx. (m²):"},{default:t(()=>[a(m,{id:"area-estacionamento-max",name:"areaEstacionamentoMax","min-fraction-digits":0,"max-fraction-digits":2,suffix:" m²"})]),_:1})])}}}),Y=Object.assign(X,{__name:"AtivosElementoEdificacaoFiltros"}),uo=x({__name:"index",async setup(b){let n,c;const s=J({view:l.ATV_VISUALIZAR_CADASTRO_EDIFICACAO,add:l.ATV_EDITAR_CADASTRO_EDIFICACAO}),p=S(),e=([n,c]=y(()=>p.getEmpresaSelecionada()),n=await n,c(),n),m=Q(v.Edificacao,o=>w.ativos.cadastros.findAllByTipo(e.sigla,v.Edificacao,o));function h(o){(s.value.view||s.value.add)&&O(u(o.data.id.idElemento),q(o))}return(o,aa)=>{const R=I,F=N,M=K,k=Y,C=j,r=z,T=Z;return g(),A(U,null,[a(M,{title:"Cadastros - Edificação"},D({_:2},[i(s).add?{name:"title-buttons",fn:t(()=>[a(F,{to:("resolveRelativeRoute"in o?o.resolveRelativeRoute:i(u))(i(G))},{default:t(()=>[a(R,{mode:"add"})]),_:1},8,["to"])]),key:"0"}:void 0]),1024),a(C,{status:i(m).status.value,schema:i(H),"paginated-url":""},{default:t(()=>[a(k)]),_:1},8,["status","schema"]),a(T,{value:i(m),onRowClick:h},{default:t(()=>[a(r,{field:"codigo",header:"Identificação",sortable:""}),a(r,{field:"nomeEdificacao",header:"Nome",sortable:""}),a(r,{field:"tipoElemento.descricao",header:"Tipo",sortable:""}),a(r,{field:"rodovia.descricao",header:"Rodovia",sortable:""}),a(r,{field:"rodovia.uf",header:"UF",sortable:""}),a(r,{field:"kmInicial",header:"KM inicial",sortable:""},{body:t(d=>[_(f(("applyKmEstacaMask"in o?o.applyKmEstacaMask:i(E))(d.data.kmInicial)),1)]),_:1}),a(r,{field:"kmFinal",header:"KM final",sortable:""},{body:t(d=>[_(f(("applyKmEstacaMask"in o?o.applyKmEstacaMask:i(E))(d.data.kmFinal)),1)]),_:1})]),_:1},8,["value"])],64)}}});export{uo as default};
