import{j as s,ak as C,ae as p,ab as R}from"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b10.js";import{a as u}from"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b4.js";import{u as g,D as N,p as w}from"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b23.js";import{u as M}from"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b19.js";import{d as b}from"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b74.js";import{S as d}from"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b8.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b18.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b7.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b6.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b9.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b5.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b2.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b3.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};
