import{d as e,T as i}from"./p-0ff0ee91.js";import{D as a}from"./p-efd6f539.js";import{A as t}from"./p-85f443f9.js";import{d as r,e as s}from"./p-a3d5ad34.js";import{c as n}from"./p-2c9430cc.js";import{p as o}from"./p-7048205a.js";import{g as d,f as l,a as c,c as m,b as u}from"./p-26046226.js";const p={view:{accept:"Accept",fetchConfigurationError:"Getting configuration failed.",fetchListError:"Fetching list failed.",noPairsMessage:"You don't have any pairs.",noReceivedRequests:"There are no pending requests.",pairs:"Pairs",receivedRequests:"Received Requests",reject:"Reject",selectionCardActionTint:"secondary",selectionCardActionLabel:"Go to selection page",selectionCardMessage:"You can view all available users and send them requests.",selectionCardTint:"primary",selectionCardTitle:"Selection is on!",sentOnDateFormat:"DD MMM YYYY, HH:mm",statusLabels:{accepted:"Accepted",canceled:"Canceled",completed:"Completed",rejected:"Rejected",requested:"Requested"},viewAndMeet:"View & Meet"}},f={view:{accept:"Kabul Et",fetchConfigurationError:"Ayarlar alınırken hata oluştu.",fetchListError:"Seçim listesi alınırken hata oluştu.",noPairsMessage:"Eşleştiğiniz kimse yok.",noReceivedRequests:"Onay bekleyen istek yok.",pairs:"Eşleşmeler",receivedRequests:"Alınan İstekler",reject:"Reddet",selectionCardActionTint:"secondary",selectionCardActionLabel:"Seçim sayfasına git",selectionCardMessage:"Müsait olan tüm kullanıcıları görüp onlara istek gönderebilirsiniz.",selectionCardTint:"primary",selectionCardTitle:"Seçim başladı!",sentOnDateFormat:"DD MMM YYYY, HH:mm",statusLabels:{accepted:"Onaylandı",canceled:"Reddedildi",completed:"Sonlandırıldı",rejected:"Reddedildi",requested:"Gönderildi"},viewAndMeet:"Detay & Toplantılar"}};function g(e){const{role:i}=e;return{memberToViewRefFieldId:"mentor"===i?"subscriber":"subscribed",userRefFieldId:"mentor"===i?"subscribed":"subscriber",viewIdToNavigateToSelectPair:"pair-selection-page",viewIdToViewRequestSender:"user-page"}}function b(e,i,a,r){const n="tr"===i?f:p,{role:g}=e,b="mentor"===g&&"group"===a.menteeType;let v=[];const h=d(r,"mentor"===g?s.MenteePairList:s.MentorPairList);if(h)v=l(g,a,h.dvnAppViewConfig.ui.main.cardViewConfig.body.fields);else{const e="mentor"===g?a.profileFieldVisibilities.mentee:a.profileFieldVisibilities.mentor,i=["title","bio","skills","imagePlaceholderValue"].filter((i=>e[i])).map((e=>({fieldId:e}))),t=["description","imagePlaceholderValue"].map((e=>({fieldId:e}))),r="mentor"===g?"mentee":"mentor",s=b?[]:c(g,r,a);v=(b?t:[...i,...m(s)]).slice(0,3).map((e=>Object.assign(Object.assign({},e),{lines:1}))).filter((e=>!["name","imageUrl","imagePlaceholderValue"].includes(e.fieldId)))}return t.decode({_id:"pair-overview-page",ui:{i18n:n.view,main:{cardViewConfig:{header:{cover:{size:100},image:{fieldId:"imageUrl",placeholderFieldId:"imagePlaceholderValue",shape:b?"rounded":void 0,size:72},title:{fieldId:b?"title":"name"}},body:{fields:v},footer:{actions:[{data:{type:"navigation",direction:"forward",placement:"view",viewId:"subscriptions",params:{conversionConfig:{"item._id":"memberToViewRefFieldValue","item.subscription._id":"pairId"}}},ui:{label:n.view.viewAndMeet||"View & Meet",name:"open-pair-detail-view",view:"ghost"}}]}}}},params:{},table:o(a,void 0,u(a))})}function v(e){return{itemId:e.params.item._id}}function h(t,s){if(!s)return;const{organisationId:o,role:d}=t,l="mentor"===d?s.profileFieldVisibilities.mentee:s.profileFieldVisibilities.mentor,u="mentor"===d?"mentee":"mentor",p=["title","bio","skills"].filter((e=>l[e])).map((e=>({fieldId:e}))),f=c(d,u,s),g=e([...n,...f]),b=[...p,...m(f)].filter((e=>!["name","imageUrl"].includes(e.fieldId))),v=[r.allMentees,r.everyone].includes(s.conversationPermissions.mentor);return a.decode({table:i.decode({base:o,name:"mentees",fields:g}),ui:{cardConfig:{header:{title:{fieldId:"name"},actions:v?[{ui:{label:"Send Message",name:"send-message"}}]:[]},body:{fields:b}}}})}export{v as a,h as b,g as c,b as g}