import{_ as P}from"./BqnRxGiA.js";import T from"./C5Oc2f2M.js";import{b as l,T as n,a as A,c as u}from"./DTBQT8lh.js";import{u as E}from"./CrEL4Vxb.js";import{d as I,c as _,k as O,a as M,o as R,f as p,a2 as V,w as g,g as c,z as h,O as F,$ as N,i as S,n as L}from"./dVzHJMF1.js";import{M as b}from"./8xtJPFc-.js";import{u as w}from"./BWID9sOX.js";import{P as B,a as U}from"./JmK0ihQ-.js";import{h as $,r as k}from"./pI06Dkb8.js";const x={class:"base-grid grid lg:grid-cols-4 grid-cols-2"},C=I({__name:"BaseFilters",setup(s){const e=E(),r=_(()=>{var a,i,o;return(o=(i=(a=e.value)==null?void 0:a.fields)==null?void 0:i[l])==null?void 0:o.states.value});return O(r,()=>{r.value||e.value.setFieldValue(l,n.individual)}),(a,i)=>{const o=T,m=P;return R(),M("div",x,[p(m,{name:c(l),label:"Tipo:"},{default:g(()=>[p(o,{id:"tipo",name:c(l),options:c(A),"option-label":"label","option-value":"value",placeholder:"Selecione...","default-value":c(n).individual,"show-toggle-all":!1},null,8,["name","options","default-value"])]),_:1},8,["name"]),V(a.$slots,"default")])}}}),J=Object.assign(C,{__name:"AtivosMonitoracoesPavimentoBaseFilters"}),W=b.extend({tipo_pavimento:h.string()}),X=(s,e)=>{const r={[s]:u[n.individual],[e]:u[n.segmentado]},a=F(),i=N(),o=_(()=>i.query.tipo_pavimento===n.individual?s:e),m=w(`ativos-monitoracoes-pavimentos-${s}-${e}`,t=>S.ativos.monitoracoes.findAllByTipo(a.empresaSelecionada.sigla,o.value,{...t,TIPO_PAVIMENTO:void 0}));function d(t,v){const f={[s]:U,[e]:B}[t.data.tipoAtivo];v&&L(k(`${t.data.id.idMonitoracao}?tipo=${f}`),$(t))}return{pavimentoSelecionado:o,monitoracoesList:m,tipoSelecionado:_(()=>r[o.value]),handleRowClick:d}};export{W as M,J as _,X as u};
