import{r as m,j as s}from"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc.js";import{u as v,A as C,q as R}from"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc24.js";import{u as g}from"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc20.js";import{au as N,ao as p,al as w}from"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc11.js";import{c as M}from"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc105.js";import{q as u}from"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc9.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc7.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc8.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc19.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc4.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc3.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc2.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc10.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc6.js";function I({id:d,onSelect:i,btnCancel:f=!1,abasRM:x=[]}){const h=v(e=>e.crm),{variaveisWA:o}=C(),{close:r}=R(),{language:n}=g(),[l]=m.useState(()=>{const e=h.filter(t=>t.id===d);return e.length>0?e[0].list:[]}),[c,j]=m.useState([]);return s.jsx("div",{children:s.jsx("ul",{className:"overflow-hidden flex "+o.modalOptions.content2,children:s.jsxs("div",{className:o.modalOptions.content3,children:[s.jsx(N,{filtragem:e=>{let t=[];l.filter(a=>x.includes(a.id)===!1).forEach(a=>{a.name?.toUpperCase().includes(e.toUpperCase())&&t.push(a)}),j(t)},placeholder:n.pesquisarCRM,dependenciasADD:[l],btnClear:!0}),s.jsxs("div",{className:"max-w-[300px] overflow-x-hidden overflow-y-auto "+o.listagem.content1,style:{maxHeight:"60vh"},children:[f&&s.jsx(p,{content:n.cancelSelection,icon:s.jsx(M,{className:"w-5 h-5 text-red-500"}),setFunction:()=>{i(null),r()},stroke:"1"}),c.map((e,t)=>s.jsx(p,{content:e.name,icon:s.jsx(u,{className:"h-5 w-5",style:{color:e.hexColor}}),setFunction:()=>{i(e),r()},stroke:"1"},t)),c.length===0&&s.jsx(w,{icon:s.jsx(u,{className:"h-5 w-5 text-[var(--primaria)]"}),title:"Nenhuma Aba foi Encontrada",description:"Nenhuma aba foi criada. Crie uma para começar a utilizár essa funcionalidade"})]})]})})})}export{I as default};
