import{ej as c,j as a,Y as m,h as d,i as o,cD as u}from"./app-BgLa5dit.js";import{T as x}from"./lZO4aq5x.chunk.js";import{C as h}from"./c3I67AiW.chunk.js";const t=c(),l={name:()=>t.accessor("user",{id:"name",header:"Name",cell:e=>{const s=e.getValue();return a.jsx(m,{appLink:{application:o.CRM_STUDIO,action:d.CrmStudio.USER_OVERVIEW,args:[s.id]},className:"text-info",openInNewTab:!0,children:s.displayName||`${s.name} ${s.surname}`})},size:250}),email:()=>t.accessor("email",{id:"email",header:"Email",cell:e=>a.jsx("div",{className:"text-wrap",children:e.getValue()}),size:250}),username:()=>t.accessor("username",{id:"username",header:"Username",cell:e=>a.jsx("div",{className:"text-wrap",children:e.getValue()}),size:200}),type:()=>t.accessor("type",{id:"type",header:"Type",cell:e=>a.jsx("div",{className:"text-wrap",children:e.getValue()}),size:150})};function p(e){if(!e.users||e.users.length===0)return null;const s=e.users.map(n=>({user:n,email:n.email||"-",username:n.username||"-",type:n.userType||"-"})),i=[l.name(),l.email(),l.username(),l.type()];return a.jsx(x,{data:s,columns:i,theme:h})}function y(e){const s=()=>{if(e.targetId){const r=document.getElementById(e.targetId);r&&r.scrollIntoView({behavior:"instant",block:"start"})}},i=e.count===0,n=e.variant==="warning"?"text-dark":"text-white";return e.targetId?a.jsxs(u,{className:`btn d-flex align-items-center gap-2 rounded-3 px-3 py-2 border-0 bg-${e.variant} ${n}`,onClick:s,disabled:i,children:[a.jsx("span",{className:"fw-bold",children:e.count}),a.jsx("span",{children:e.label})]}):a.jsxs("div",{className:`d-flex align-items-center gap-2 rounded-3 px-3 py-2 bg-${e.variant} ${n}`,children:[a.jsx("span",{className:"fw-bold",children:e.count}),a.jsx("span",{children:e.label})]})}export{p as D,y as S};
//# sourceMappingURL=yOMNDs-G.chunk.js.map
