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