import{j as s,al as C,af as p,ac as R}from"./v_7_4_2_1_59f2e4f7-dc00-41f3-9942-b1c61b935c9910.js";import{a as u}from"./v_7_4_2_1_59f2e4f7-dc00-41f3-9942-b1c61b935c994.js";import{u as g,D as N,p as w}from"./v_7_4_2_1_59f2e4f7-dc00-41f3-9942-b1c61b935c9923.js";import{u as M}from"./v_7_4_2_1_59f2e4f7-dc00-41f3-9942-b1c61b935c9919.js";import{d as S}from"./v_7_4_2_1_59f2e4f7-dc00-41f3-9942-b1c61b935c9974.js";import{S as d}from"./v_7_4_2_1_59f2e4f7-dc00-41f3-9942-b1c61b935c998.js";import"./v_7_4_2_1_59f2e4f7-dc00-41f3-9942-b1c61b935c9918.js";import"./v_7_4_2_1_59f2e4f7-dc00-41f3-9942-b1c61b935c996.js";import"./v_7_4_2_1_59f2e4f7-dc00-41f3-9942-b1c61b935c997.js";import"./v_7_4_2_1_59f2e4f7-dc00-41f3-9942-b1c61b935c99.js";import"./v_7_4_2_1_59f2e4f7-dc00-41f3-9942-b1c61b935c999.js";import"./v_7_4_2_1_59f2e4f7-dc00-41f3-9942-b1c61b935c995.js";import"./v_7_4_2_1_59f2e4f7-dc00-41f3-9942-b1c61b935c992.js";import"./v_7_4_2_1_59f2e4f7-dc00-41f3-9942-b1c61b935c993.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(S,{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};
