import{r as m,j as s}from"./v_7_4_3_15_0399e866-74c7-4569-9f5c-4e0b92137cdb.js";import{u as C,ac as j,n as R}from"./v_7_4_3_15_0399e866-74c7-4569-9f5c-4e0b92137cdb23.js";import{m as v,u as w}from"./v_7_4_3_15_0399e866-74c7-4569-9f5c-4e0b92137cdb20.js";import{aD as M,ax as p,ay as u,au as N}from"./v_7_4_3_15_0399e866-74c7-4569-9f5c-4e0b92137cdb11.js";import{c as g}from"./v_7_4_3_15_0399e866-74c7-4569-9f5c-4e0b92137cdb107.js";import{D as y}from"./v_7_4_3_15_0399e866-74c7-4569-9f5c-4e0b92137cdb9.js";import"./v_7_4_3_15_0399e866-74c7-4569-9f5c-4e0b92137cdb8.js";import"./v_7_4_3_15_0399e866-74c7-4569-9f5c-4e0b92137cdb7.js";import"./v_7_4_3_15_0399e866-74c7-4569-9f5c-4e0b92137cdb19.js";import"./v_7_4_3_15_0399e866-74c7-4569-9f5c-4e0b92137cdb4.js";import"./v_7_4_3_15_0399e866-74c7-4569-9f5c-4e0b92137cdb3.js";import"./v_7_4_3_15_0399e866-74c7-4569-9f5c-4e0b92137cdb2.js";import"./v_7_4_3_15_0399e866-74c7-4569-9f5c-4e0b92137cdb10.js";import"./v_7_4_3_15_0399e866-74c7-4569-9f5c-4e0b92137cdb6.js";function H({onSelect:r,btnCancel:d=!1}){const{userTabs:x}=C(),h=v(e=>e.crm),{variaveisWA:t}=j(),{close:i}=R(),{language:o}=w(),[n]=m.useState(()=>[{id:"abas",list:x,name:`${o.abas}`,hexColor:"var(--primaria)"},...h]),[l,f]=m.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(M,{filtragem:e=>{let a=[];n.forEach(c=>{c.name?.toUpperCase().includes(e.toUpperCase())&&a.push(c)}),f(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:[d&&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(N,{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{H as default};
