import{aI as m,ax as h,bd as x,e9 as S,ao as s,ap as c,ba as b,aq as j,L as I,a_ as v,av as w,bb as N}from"./app-k0jcl5PQ.js";import{u}from"./D51gfRTO.chunk.js";import{I as n}from"./CqF9ND51.chunk.js";import{s as g}from"./8YUd4Bv8.chunk.js";const d="g-share-to-classroom";function C(e){e&&(window.___gcfg={parsetags:"explicit"});const t=u("https://apis.google.com/js/platform.js",e);return m.useEffect(()=>{var i,a;!e||!t||(a=(i=window.gapi)==null?void 0:i.sharetoclassroom)==null||a.go(d)},[e,t]),d}function k(e){const t=u("https://teams.microsoft.com/share/launcher.js",e);m.useEffect(()=>{var i;!e||!t||(i=window.shareToMicrosoftTeams)==null||i.renderButtons()},[e,t])}const f="shared.lookingForIntegration",T=I.encloseNamespace(f);function _(e){const[t,i]=h(S.LOOKING_FOR_INTEGRATION,{show:!0},{storage:x.LocalStorage});return t.show?s.jsxs("div",{className:c("d-flex justify-content-between",!e.hideBackground&&"rounded p-2 bg-light-blue"),children:[s.jsx(b,{appLink:e.appLink,onClick:()=>{var a;return(a=e.closePopup)==null?void 0:a.call(e)},className:"d-inline-flex align-items-center mb-0",children:s.jsx("span",{className:c("ms-1 text-info",!e.normalText&&"fw-semibold"),children:s.jsx(j,{namespace:f,phrase:"lookingForIntegration"})})}),!e.hideDismiss&&s.jsx("button",{onClick:()=>i({show:!1}),"aria-label":`${T("ariaClose")}`,children:s.jsx(v,{svg:N,size:w.Small,className:"text-info d-inline-block svg-container"})})]}):s.jsx(s.Fragment,{})}const y="32";function z(e){var r,l;const t=C((r=e.integrations)==null?void 0:r.includes(n.GoogleClassroom));if(k((l=e.integrations)==null?void 0:l.includes(n.MicrosoftTeams)),!e.integrations.length&&!e.hideLookingForIntegrations)return s.jsx(_,{appLink:e.appLink,closePopup:e.closePopup});function i(){switch(e.iconSize){case"sm":return"24";case"md":default:return y}}const a=i(),o={height:`${a}px`,width:`${a}px`};return s.jsxs("div",{className:"d-flex gap-1 align-items-start",children:[e.integrations.includes(n.GoogleClassroom)&&s.jsx("div",{id:t,className:"rounded partial-loading-background",style:o,children:s.jsx("div",{className:"g-sharetoclassroom","data-size":a,"data-url":e.url})}),e.integrations.includes(n.MicrosoftTeams)&&s.jsx("div",{className:`rounded overflow-hidden ${g.hoverable}`,children:s.jsx("div",{className:`teams-share-button ${g.msTeamsContainer}`,style:o,"data-href":e.url,"data-button-type":"smallTransWhite","data-preview":"false","data-icon-px-size":a})})]})}export{_ as L,z as S};
//# sourceMappingURL=6i75Rx5z.chunk.js.map
