(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-fa345352"],{"3c47":function(e,t,o){},5863:function(e,t,o){"use strict";o("3c47")},d1a9:function(e,t,o){"use strict";o.r(t);var n=function(){var e=this,t=e._self._c;return t("button",{directives:[{name:"google-signin-button",rawName:"v-google-signin-button",value:e.value,expression:"value"}],staticClass:"google-signin-button",attrs:{id:"teste-google"}},[e._v("Fazer Integração")])},i=[],c=(o("d3b7"),o("2b0e")),s=c["default"].directive("google-signin-button",{bind:function(e,t,o){l(),console.log(t);let n=t.value.clientId,i=t.value.scope,c=document.createElement("script");function s(){gapi.load("auth2",()=>{const e=gapi.auth2.init({client_id:n,scope:i,cookiepolicy:"single_host_origin"});e.grantOfflineAccess().then(u)})}function u(e){o.context.OnGoogleAuthSuccess(e)}function l(){if(!o.context.OnGoogleAuthSuccess)throw new Error("The method OnGoogleAuthSuccess must be defined on the component");if(!o.context.OnGoogleAuthFail)throw new Error("The method OnGoogleAuthFail must be defined on the component")}c.setAttribute("src","https://apis.google.com/js/api:client.js"),document.head.appendChild(c),c.onload=s}}),u=o("bc3a"),l=o.n(u),a={directives:{GoogleSignInButton:s},data:function(){return{value:{clientId:"753585437519-c6kn7emvogui3emd98ji8811m3eue21l.apps.googleusercontent.com",scope:"https://www.googleapis.com/auth/youtube.readonly"}}},methods:{OnGoogleAuthSuccess:function(e){l.a.post("https://api.greenn.club/connection/google/code",e,{headers:{Authorization:this.$route.params.auth}}).finally((function(){return window.top.postMessage("reloadGoogleConections","*")}))},OnGoogleAuthFail:function(e){},simulateClick:function(){setTimeout((function(){document.getElementById("teste-google").click(),document.getElementById("teste-google").classList.add("google-signin-button2")}),1e3)}},mounted:function(){this.simulateClick()}},g=a,d=(o("5863"),o("2877")),r=Object(d["a"])(g,n,i,!1,null,"443084fc",null);t["default"]=r.exports}}]);
//# sourceMappingURL=chunk-fa345352.4a503ed9.js.map