import{j as s}from"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b67155.js";import{r as m}from"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b6715.js";import{u as C,ad as j,n as R}from"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b671523.js";import{t as v,u as w}from"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b67154.js";import{al as g,af as p,ag as u,ac as M}from"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b67157.js";import{c as N}from"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b6715106.js";import{G as b}from"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b67156.js";import"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b67153.js";import"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b67159.js";import"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b671510.js";import"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b67152.js";import"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b67158.js";import"./v_7_4_3_42_40a29d0b-9b36-4e19-997c-87ed486b671520.js";function z({onSelect:r,btnCancel:d=!1}){const{userTabs:x}=C(),f=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)"},...f]),[l,h]=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(g,{filtragem:e=>{let a=[];n.forEach(c=>{c.name?.toUpperCase().includes(e.toUpperCase())&&a.push(c)}),h(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(N,{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(b,{className:"h-5 w-5",style:{color:e.hexColor}}),setFunction:()=>{r(e),i()},stroke:"1"},a)),l.length===0&&s.jsx(M,{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{z as default};
