import{j as s,al as j,af as p,ag as u,ac as R}from"./v_7_4_2_1_59f2e4f7-dc00-41f3-9942-b1c61b935c9910.js";import{a as d}from"./v_7_4_2_1_59f2e4f7-dc00-41f3-9942-b1c61b935c994.js";import{a as v,u as w,D as g,p as M}from"./v_7_4_2_1_59f2e4f7-dc00-41f3-9942-b1c61b935c9923.js";import{u as N}from"./v_7_4_2_1_59f2e4f7-dc00-41f3-9942-b1c61b935c9919.js";import{d as b}from"./v_7_4_2_1_59f2e4f7-dc00-41f3-9942-b1c61b935c9974.js";import{S as y}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 I({onSelect:r,btnCancel:x=!1}){const{userTabs:f}=v(),h=w(e=>e.crm),{variaveisWA:t}=g(),{close:i}=M(),{language:o}=N(),[n]=d.useState(()=>[{id:"abas",list:f,name:`${o.abas}`,hexColor:"var(--primaria)"},...h]),[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(b,{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};
