import{T as e}from"./p-968ee2ec.js";import{C as i}from"./p-0c34d1b7.js";import{D as a}from"./p-efd6f539.js";import{T as t}from"./p-0ff0ee91.js";import{T as o}from"./p-12a14b28.js";import{a as r,g as n}from"./p-2c9430cc.js";import{d as s,e as l,c as d,h as m,a as f}from"./p-26046226.js";import{I as c,T as p}from"./p-bea38b23.js";function u(a,t,o,n,u){if(!o)return null;const g=a.role,b=s(t,o,n,g),v=[...l(t,o,n,a.role,!0,4)];let I={};"mentee"===g&&"mentor"===n&&("individual"===o.menteeType||a.groupId)&&(I=Object.assign({customViewTag:"mentornity-schedule-meeting-button-on-card",language:t},u));const h=[],j=[{field:new e("search",r(t,"search"))},...d([...m(t,o,n).filter((e=>!["title","bio"].includes(e.id))),...f(a.role,n,o)])];return j.forEach((e=>{var i;const a=e.fieldId||(null===(i=e.field)||void 0===i?void 0:i.id);a&&h.push({fieldId:a,width:"200px"})})),i.decode({_id:`${n}-card-list`,i18nEntryId:`mentornity-${n}-card-list`,ui:{quickSearch:{fields:j,fieldUIConfigs:h},main:{cardViewConfig:{header:{cover:{size:120},image:{fieldId:"user.imageUrl",placeholderFieldId:"user.initials",size:96,position:c.TopLeft},title:{fieldId:"user.name",position:p.RightOfImage},subtitleActions:[{ui:{label:r(t,"viewDetails"),name:"view-details",tint:"neutral"}},{ui:{label:r(t,"goToProfilePage"),name:"go-to-profile-page",tint:"neutral"}}]},body:{fields:v},footer:I}}},table:{fields:b,roleName:n,name:`${n}-card-list`},query:{fields:v}})}function g(e){if(e)return o.decode({_id:"user-card-list-page-available-time-picker-view",i18nEntryId:"user-card-list-page-available-time-picker-view",table:n(e),successNavigationAction:{type:"navigation",direction:"forward",name:"open-meeting-detail-after-creation",params:{conversionConfig:{"item._id":"meetingId"}}}})}function b(e,i,o,n){if(!o)return;const d=s(i,o,n,e.role),m=l(i,o,n,e.role,!1),{organisationId:f}=e;return a.decode({table:t.decode({fields:d,base:f,name:"mentee"===n?"mentees":"mentors"}),ui:{cardConfig:{header:{title:{fieldId:"name"},actions:[{ui:{label:r(i,"goToProfilePage"),name:"go-to-profile-page"}}]},body:{fields:m}}}})}export{u as a,b,g}