import{B as BaseField}from"./BaseField-461b6d0c.js";import{P as PairConfig,R as Rule,C as Comparison,a as RuleType}from"./pair-config-cf56a965.js";import{e as InfoVisibility}from"./instance-7b02ef1d.js";var pairConfig=function(e,i,n){var o;return PairConfig.decode({actionPermissions:{subscriber:{completePair:false},subscribed:{completePair:!!(n===null||n===void 0?void 0:n.canMentorEndSubscription)}},fields:[{type:"reference",id:"subscriber",otherCollection:e.menteeType==="group"?"groups":"mentees"},{type:"reference",id:"subscribed",otherCollection:"mentors"}],selection:e.menteeType==="group"?undefined:{subscriber:{initiation:"approvingly",pairLimit:n===null||n===void 0?void 0:n.pairLimitForMentees,selectionLimit:n===null||n===void 0?void 0:n.selectionLimitForMentees,roleNameToSelect:"subscribed",rules:[new Rule([{firstField:BaseField.decode({id:"city",type:"text"}),comparison:Comparison.eq,secondField:BaseField.decode({id:"city",type:"text"})}],RuleType.comparison)],selectionUI:{showMessageButton:[InfoVisibility.allMentors,InfoVisibility.everyone].includes(e.conversationPermissions.mentee)},status:(n===null||n===void 0?void 0:n.isMentorSelectionOn)?"active":"passive"}},structure:i?{meetingConfigs:((o=i.meetingGoals)===null||o===void 0?void 0:o.map((function(e){return{id:e.identifier,name:e.meetingTitle,meetingCount:1,specifications:{subscriber:e.specifications.mentee,subscribed:e.specifications.mentor}}})))||[]}:undefined,calendarConfig:{_id:i?"mentornity-structured-calendar-config":"mentornity-calendar-config"}})};export{pairConfig as p};