-
Notifications
You must be signed in to change notification settings - Fork 0
/
373.082c5a8487a6bb36dd34.js
1 lines (1 loc) · 2.29 KB
/
373.082c5a8487a6bb36dd34.js
1
"use strict";(self.webpackChunksparkworks_console=self.webpackChunksparkworks_console||[]).push([[373],{83373:function(A,r,e){e.r(r),e.d(r,{amplify_federated_buttons:function(){return v},amplify_strike:function(){return f}});var h=e(75134),d=e(47289),t=e(65513),p=e(77),u=e(82073),l=e(33542),C=(e(33754),e(84665)),m=e(83126),v=function(){function n(i){(0,h.Z)(this,n),(0,t.r)(this,i),this.authState=u.A.SignIn,this.federated={},this.handleAuthStateChange=m.d}return(0,d.Z)(n,[{key:"componentWillLoad",value:function(){if(!l.g||"function"!=typeof l.g.configure)throw new Error(C.N);var s=l.g.configure().oauth,a=void 0===s?{}:s;a.domain?this.federated.oauthConfig=Object.assign(Object.assign({},this.federated.oauthConfig),a):a.awsCognito&&(this.federated.oauthConfig=Object.assign(Object.assign({},this.federated.oauthConfig),a.awsCognito)),a.auth0&&(this.federated.auth0Config=Object.assign(Object.assign({},this.federated.auth0Config),a.auth0))}},{key:"render",value:function(){if(!Object.values(u.A).includes(this.authState)||(0,p.xb)(this.federated))return null;var o=this.federated,s=o.amazonClientId,a=o.auth0Config,_=o.facebookAppId,c=o.googleClientId,g=o.oauthConfig;return(0,t.h)("div",null,c&&(0,t.h)("div",null,(0,t.h)("amplify-google-button",{clientId:c,handleAuthStateChange:this.handleAuthStateChange})),_&&(0,t.h)("div",null,(0,t.h)("amplify-facebook-button",{appId:_,handleAuthStateChange:this.handleAuthStateChange})),s&&(0,t.h)("div",null,(0,t.h)("amplify-amazon-button",{clientId:s,handleAuthStateChange:this.handleAuthStateChange})),g&&(0,t.h)("div",null,(0,t.h)("amplify-oauth-button",{config:g})),a&&(0,t.h)("div",null,(0,t.h)("amplify-auth0-button",{config:a,handleAuthStateChange:this.handleAuthStateChange})))}}]),n}(),f=function(){function n(i){(0,h.Z)(this,n),(0,t.r)(this,i)}return(0,d.Z)(n,[{key:"render",value:function(){return(0,t.h)("span",{class:"strike-content"},(0,t.h)("slot",null))}}]),n}();f.style=".sc-amplify-strike-h{--color:var(--amplify-grey);--border-color:var(--amplify-light-grey);--content-background:var(--amplify-white);display:block;width:100%;text-align:center;border-bottom:1px solid var(--border-color);line-height:0.1em;margin:32px 0;color:var(--color)}.strike-content.sc-amplify-strike{background:var(--content-background);padding:0 25px;font-size:var(--amplify-text-sm);font-weight:500}"}}]);