import{ao as r,ap as u,au as o,av as h,cq as g,cr as T,aw as S,bj as b,aB as t,L as m}from"./app-k0jcl5PQ.js";import{S as n}from"./Boh3c6zT.chunk.js";const v="sharev2.shareAvatar",i=m.encloseNamespace(v),f={[t.Open]:S,[t.Link]:b,[t.Classroom]:S,[t.Live]:T,[t.LegacyDirect]:g},y={[t.Open]:"blue",[t.Link]:"black",[t.Classroom]:"purple",[t.Live]:"purple",[t.LegacyDirect]:"indigo"},d={[t.Open]:"openShareType",[t.Link]:"linkShareType",[t.Classroom]:"classroomShareType",[t.Live]:"liveShareType",[t.LegacyDirect]:"legacyDirectShareType"};function L({type:e,classroomName:a,additionalTitleText:s,openClassroomName:l}){if(e===t.Open&&l)return l;if(e===t.Classroom&&a)return a;let c=i(d[e]);return s&&(c+=" "+s),c}function p(e,a){return e&&a?`${i("groupSubTitle",{smartCount:e})}, ${i("studentSubTitle",{smartCount:a})}`:e?i("groupSubTitle",{smartCount:e}):a?i("studentSubTitle",{smartCount:a}):i("allStudentsSubTitle")}function x(e){if([n.JustMySchool,n.Protected].includes(e))return i("respectRatingsSubTitle");if(e===n.JustMySchoolOverrideRestriction)return i("anyoneInSchoolSubTitle");if(e===n.ProtectedOverrideRestriction)return i("anyoneSignedInSubTitle");if(e===n.Public)return i("anyoneWithLinkSubTitle");if(e===n.PinCode)return i("anyoneWithPinSubTitle")}function C({type:e,privacy:a,studentCount:s=0,classroomGroupCount:l=0}){switch(e){case t.Classroom:return p(l,s);case t.Open:return i("openShareTypeSubTitle");case t.Link:return x(a);case t.Live:return i("liveShareTypeSubTitle");case t.LegacyDirect:return i("legacyDirectTypeSubTitle");default:return i("publicShareTypeSubTitle")}}function j(e){const a=L(e);return r.jsxs("div",{className:u("d-flex align-items-center gap-2",e.className),children:[r.jsx("div",{children:r.jsx(o,{svg:f[e.type],variant:y[e.type],textVariant:"white",svgWrapperClassName:"p-1",svgSize:e.svgSize??h.Standard})}),r.jsxs("div",{className:"d-flex flex-column",children:[r.jsx("p",{className:u("m-0",e.titleClassName),title:a,children:a}),!e.hideSubtitle&&r.jsx("span",{className:"text-secondary",children:e.subtitleText??C(e)})]})]})}export{j as S};
//# sourceMappingURL=UBCV9Jq8.chunk.js.map
