import{B as e}from"./p-105f7627.js";import{P as i,R as s,C as t,a as o}from"./p-ca5153f1.js";import{d as r}from"./p-a3d5ad34.js";const n=(n,c,a)=>{var d;return i.decode({actionPermissions:{subscriber:{completePair:!1},subscribed:{completePair:!!(null==a?void 0:a.canMentorEndSubscription)}},fields:[{type:"reference",id:"subscriber",otherCollection:"group"===n.menteeType?"groups":"mentees"},{type:"reference",id:"subscribed",otherCollection:"mentors"}],selection:"group"===n.menteeType?void 0:{subscriber:{initiation:"approvingly",pairLimit:null==a?void 0:a.pairLimitForMentees,selectionLimit:null==a?void 0:a.selectionLimitForMentees,roleNameToSelect:"subscribed",rules:[new s([{firstField:e.decode({id:"city",type:"text"}),comparison:t.eq,secondField:e.decode({id:"city",type:"text"})}],o.comparison)],selectionUI:{showMessageButton:[r.allMentors,r.everyone].includes(n.conversationPermissions.mentee)},status:(null==a?void 0:a.isMentorSelectionOn)?"active":"passive"}},structure:c?{meetingConfigs:(null===(d=c.meetingGoals)||void 0===d?void 0:d.map((e=>({id:e.identifier,name:e.meetingTitle,meetingCount:1,specifications:{subscriber:e.specifications.mentee,subscribed:e.specifications.mentor}}))))||[]}:void 0,calendarConfig:{_id:c?"mentornity-structured-calendar-config":"mentornity-calendar-config"}})};export{n as p}