import{j as s,ak as C,ad as p,aa as R}from"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e10.js";import{a as u}from"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e4.js";import{u as g,B as N,o as w}from"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e22.js";import{u as M}from"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e19.js";import{c as S}from"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e105.js";import{S as d}from"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e8.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e18.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e7.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e6.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e2.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e3.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e9.js";import"./v_7_4_0_1_4b8cc392-a410-45f6-b662-85abdad9c03e5.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};
