import{j as s,ar as j,al as p,am as u,ai as R}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf10.js";import{a as d}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf4.js";import{b as v,u as w,A as M,p as N}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf23.js";import{u as b}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf19.js";import{c as g}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf74.js";import{q as y}from"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf8.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf18.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf6.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf7.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf9.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf5.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf2.js";import"./v_7_4_2_9_8cb79d4f-81e0-49c1-b597-7f2344477fbf3.js";function I({onSelect:r,btnCancel:x=!1}){const{userTabs:h}=v(),f=w(e=>e.crm),{variaveisWA:t}=M(),{close:i}=N(),{language:o}=b(),[n]=d.useState(()=>[{id:"abas",list:h,name:`${o.abas}`,hexColor:"var(--primaria)"},...f]),[l,C]=d.useState([]);return s.jsx("div",{children:s.jsx("ul",{className:"overflow-hidden flex "+t.modalOptions.content2,children:s.jsxs("div",{className:t.modalOptions.content3,children:[s.jsx(j,{filtragem:e=>{let a=[];n.forEach(c=>{var m;(m=c.name)!=null&&m.toUpperCase().includes(e.toUpperCase())&&a.push(c)}),C(a)},placeholder:o.pesquisarCRM,dependenciasADD:[n],btnClear:!0}),s.jsxs("div",{className:"max-w-[300px] overflow-x-hidden overflow-y-auto "+t.listagem.content1,style:{maxHeight:"60vh"},children:[x&&s.jsx(p,{content:o.cancelSelection,icon:s.jsx(g,{className:"w-5 h-5 text-red-500"}),setFunction:()=>{r(null),i()},stroke:"1"}),l.map((e,a)=>s.jsx(p,{content:e.name,icon:e.id==="abas"?s.jsx(u,{className:"h-5 w-5",style:{color:e.hexColor}}):s.jsx(y,{className:"h-5 w-5",style:{color:e.hexColor}}),setFunction:()=>{r(e),i()},stroke:"1"},a)),l.length===0&&s.jsx(R,{icon:s.jsx(u,{className:"w-5 h-5 text-[var(--primaria)]"}),title:"Nenhum CRM foi Encontrado",description:"Nenhum CRM foi criada. Crie um para começar a utilizár essa funcionalidade"})]})]})})})}export{I as default};
