import{j as s}from"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b0286.js";import{a as c}from"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b0282.js";import{h as C,u as j}from"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b02833.js";import{u as R}from"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b02821.js";import{j as v,u as w}from"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b0285.js";import{ar as M,am as p,ai as u,ad as N}from"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b0288.js";import{c as g}from"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b028112.js";import{af as b}from"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b0287.js";import"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b0284.js";import"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b02838.js";import"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b0289.js";import"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b02810.js";import"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b0283.js";import"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b028.js";import"./v_7_4_3_48_026858c9-0735-4edd-ae06-f5f59030b02820.js";function I({onSelect:r,btnCancel:d=!1}){const{userTabs:x}=R(),f=v(e=>e.crm),{variaveisWA:t}=C(),{close:i}=j(),{language:o}=w(),[n]=c.useState(()=>[{id:"abas",list:x,name:`${o.abas}`,hexColor:"var(--primaria)"},...f]),[l,h]=c.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(m=>{m.name?.toUpperCase().includes(e.toUpperCase())&&a.push(m)}),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(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(b,{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{I as default};
