import{j as s,as as C,am as p,aj as R}from"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e410.js";import{a as u}from"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e44.js";import{u as g,A as N,q as w}from"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e423.js";import{u as M}from"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e419.js";import{c as b}from"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e4105.js";import{q as d}from"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e48.js";import"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e418.js";import"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e46.js";import"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e47.js";import"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e4.js";import"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e49.js";import"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e45.js";import"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e42.js";import"./v_7_4_2_14_b047d88c-9af4-4a49-a965-946ffe7780e43.js";function K({id:f,onSelect:i,btnCancel:x=!1,abasRM:h=[]}){const j=g(e=>e.crm),{variaveisWA:o}=N(),{close:r}=w(),{language:n}=M(),[l]=u.useState(()=>{const e=j.filter(t=>t.id===f);return e.length>0?e[0].list:[]}),[c,v]=u.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(C,{filtragem:e=>{let t=[];l.filter(a=>h.includes(a.id)===!1).forEach(a=>{var m;(m=a.name)!=null&&m.toUpperCase().includes(e.toUpperCase())&&t.push(a)}),v(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:[x&&s.jsx(p,{content:n.cancelSelection,icon:s.jsx(b,{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(d,{className:"h-5 w-5",style:{color:e.hexColor}}),setFunction:()=>{i(e),r()},stroke:"1"},t)),c.length===0&&s.jsx(R,{icon:s.jsx(d,{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{K as default};
