import{_ as I}from"./G7u0egV4.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,W as D,F as w,i as U,A as N,h as _,t as f,n as O}from"./JQJBiNWj.js";import{_ as K}from"./DUQr9DrG.js";import{_ as $}from"./DwxF_264.js";import{_ as B}from"./gxHWKiUc.js";import P from"./Cr9ZZaT-.js";import V from"./CJYlvWEf.js";import{A as L}from"./CLzE61HQ.js";import{_ as j}from"./DTOFlTEg.js";import{_ as W}from"./CYDRfonM.js";import{r as u,h as Z}from"./CLkB_muw.js";import{a as E}from"./BRY5UTQQ.js";import q from"./CuNuZBQO.js";import{D as z}from"./DKM0wLqG.js";import{T as v}from"./BKl0aY3w.js";import{a as G}from"./CndwAhuI.js";import{u as H}from"./CL7Msd7o.js";import{u as J}from"./BfZwoNNq.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"./3oa0FK2h.js";import"./BBDFeM-T.js";import"./BuR5k2Xw.js";import"./Bli8EQqv.js";import"./BagArUDo.js";import"./CRodc3LN.js";import"./DncddsCV.js";import"./Dm5UwSfy.js";import"./D42GNhrT.js";import"./DNRi6U01.js";import"./BYfmWBgX.js";import"./CH1bAkoS.js";import"./Dd3ROLQd.js";import"./f6QOa6wf.js";import"./Tk23Dwa0.js";import"./DMxbovom.js";import"./DBWLnasn.js";import"./RO0fiRDZ.js";import"./vkXHPWu2.js";import"./qAEGbaa4.js";import"./CASPyZT-.js";import"./CfLdzzlL.js";import"./CjLYEAc3.js";import"./BTchAptP.js";import"./BlGPNclf.js";const Q={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",Q,[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=H({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=J(v.Edificacao,o=>U.ativos.cadastros.findAllByTipo(e.sigla,v.Edificacao,o));function h(o){(s.value.view||s.value.add)&&O(u(o.data.id.idElemento),Z(o))}return(o,aa)=>{const R=I,F=N,M=K,k=Y,C=j,r=q,T=W;return g(),A(w,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(z))},{default:t(()=>[a(R,{mode:"add"})]),_:1},8,["to"])]),key:"0"}:void 0]),1024),a(C,{status:i(m).status.value,schema:i(G),"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};
