{"version":3,"sources":["webpack:///./node_modules/@aws-amplify/ui-components/dist/esm-es5/amplify-federated-buttons_2.entry.js"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA+D;AACnB;AACc;AACjB;AACL;AACgC;AACM;AAC1E;AACA;AACA,QAAQ,4DAAgB;AACxB;AACA,yBAAyB,yDAAS;AAClC;AACA;AACA;AACA;AACA;AACA,qCAAqC,sDAA4B;AACjE;AACA;AACA,aAAa,sDAAI,WAAW,sDAAI;AAChC,4BAA4B,wDAAoB;AAChD;AACA,iBAAiB,sDAAI,8CAA8C;AACnE;AACA;AACA,uEAAuE;AACvE;AACA;AACA,uEAAuE;AACvE;AACA;AACA,uEAAuE;AACvE;AACA;AACA;AACA,2BAA2B,yDAAS;AACpC;AACA;AACA,YAAY,iEAAO;AACnB;AACA;AACA;AACA,gBAAgB,4DAAC,iCAAiC,4DAAC,cAAc,4DAAC,2BAA2B,8EAA8E,uBAAuB,4DAAC,cAAc,4DAAC,6BAA6B,0EAA0E,wBAAwB,4DAAC,cAAc,4DAAC,2BAA2B,8EAA8E,qBAAqB,4DAAC,cAAc,4DAAC,0BAA0B,sBAAsB,qBAAqB,4DAAC,cAAc,4DAAC,0BAA0B,yEAAyE;AACvqB;AACA;AACA,CAAC;AACD,6CAA6C,4BAA4B,yCAAyC,0CAA0C,cAAc,WAAW,kBAAkB,4CAA4C,kBAAkB,cAAc,mBAAmB,kCAAkC,qCAAqC,eAAe,iCAAiC,gBAAgB;AAC7a;AACA;AACA,QAAQ,4DAAgB;AACxB;AACA;AACA,gBAAgB,4DAAC,UAAU,0BAA0B,EAAE,4DAAC;AACxD;AACA;AACA,CAAC;AACD;AACiG","file":"js/21.js","sourcesContent":["import { r as registerInstance, h } from './index-83f2275b.js';\nimport { isEmpty } from '@aws-amplify/core';\nimport { A as AuthState } from './auth-types-78df304e.js';\nimport { Auth } from '@aws-amplify/auth';\nimport './Translations-108d469f.js';\nimport { N as NO_AUTH_MODULE_FOUND } from './constants-c8ecaa24.js';\nimport { d as dispatchAuthStateChangeEvent } from './helpers-14fcb50c.js';\nvar AmplifyFederatedButtons = /** @class */ (function () {\n function AmplifyFederatedButtons(hostRef) {\n registerInstance(this, hostRef);\n /** The current authentication state. */\n this.authState = AuthState.SignIn;\n /** Federated credentials & configuration. */\n this.federated = {};\n /** Auth state change handler for this component\n * e.g. SignIn -> 'Create Account' link -> SignUp\n */\n this.handleAuthStateChange = dispatchAuthStateChangeEvent;\n }\n AmplifyFederatedButtons.prototype.componentWillLoad = function () {\n if (!Auth || typeof Auth.configure !== 'function') {\n throw new Error(NO_AUTH_MODULE_FOUND);\n }\n var _a = Auth.configure().oauth, oauth = _a === void 0 ? {} : _a;\n // backward compatibility\n if (oauth['domain']) {\n this.federated.oauthConfig = Object.assign(Object.assign({}, this.federated.oauthConfig), oauth);\n }\n else if (oauth['awsCognito']) {\n this.federated.oauthConfig = Object.assign(Object.assign({}, this.federated.oauthConfig), oauth['awsCognito']);\n }\n if (oauth['auth0']) {\n this.federated.auth0Config = Object.assign(Object.assign({}, this.federated.auth0Config), oauth['auth0']);\n }\n };\n AmplifyFederatedButtons.prototype.render = function () {\n if (!Object.values(AuthState).includes(this.authState)) {\n return null;\n }\n if (isEmpty(this.federated)) {\n return null;\n }\n var _a = this.federated, amazonClientId = _a.amazonClientId, auth0Config = _a.auth0Config, facebookAppId = _a.facebookAppId, googleClientId = _a.googleClientId, oauthConfig = _a.oauthConfig;\n return (h(\"div\", null, googleClientId && (h(\"div\", null, h(\"amplify-google-button\", { clientId: googleClientId, handleAuthStateChange: this.handleAuthStateChange }))), facebookAppId && (h(\"div\", null, h(\"amplify-facebook-button\", { appId: facebookAppId, handleAuthStateChange: this.handleAuthStateChange }))), amazonClientId && (h(\"div\", null, h(\"amplify-amazon-button\", { clientId: amazonClientId, handleAuthStateChange: this.handleAuthStateChange }))), oauthConfig && (h(\"div\", null, h(\"amplify-oauth-button\", { config: oauthConfig }))), auth0Config && (h(\"div\", null, h(\"amplify-auth0-button\", { config: auth0Config, handleAuthStateChange: this.handleAuthStateChange })))));\n };\n return AmplifyFederatedButtons;\n}());\nvar amplifyStrikeCss = \".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}\";\nvar AmplifyStrike = /** @class */ (function () {\n function AmplifyStrike(hostRef) {\n registerInstance(this, hostRef);\n }\n AmplifyStrike.prototype.render = function () {\n return (h(\"span\", { class: \"strike-content\" }, h(\"slot\", null)));\n };\n return AmplifyStrike;\n}());\nAmplifyStrike.style = amplifyStrikeCss;\nexport { AmplifyFederatedButtons as amplify_federated_buttons, AmplifyStrike as amplify_strike };\n"],"sourceRoot":""}