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