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B,oCAAqC,GACpL,OAAO,KAAM,WAAgB,IAAI,EAAS,QAAQ,sBACpD,EAAO,QAAQ,QAAQ,QAAQ,GAC1B,EAAO,aACZ,OAAO,IAAI,SACN,OAAO,IAAI,KAGd,EAAO,OAAO,WAAY,kBAF1B,EAAO,aAAa,WAAY,kBAInC,CATgB","file":"/npm/@wmhilton/login-with-github-vue-component@0.0.5/build/component.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@wmhilton/login-with-github-vue-component@0.0.5/build/component.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n",";(function(){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _loginWithGithubClient = require('@wmhilton/login-with-github-client');\n\nvar _loginWithGithubClient2 = _interopRequireDefault(_loginWithGithubClient);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = {\n  name: 'login-with-github',\n  data: function data() {\n    return {\n      auth_token: null\n    };\n  },\n\n  props: ['client_id'],\n  computed: {\n    logged_in: function logged_in() {\n      return this.auth_token ? true : false;\n    }\n  },\n  methods: {\n    toggle: function toggle() {\n      this.auth_token ? this.logout() : this.login();\n    },\n    login: function login() {\n      self = this;\n      (0, _loginWithGithubClient2.default)({\n        client_id: this.client_id\n      }).then(function (auth_token) {\n        self.auth_token = auth_token;\n        self.$emit('login', auth_token);\n      }).catch(function () {\n        self.$emit('error');\n      });\n    },\n    logout: function logout() {\n      self.auth_token = null;\n    }\n  },\n  ready: function ready() {}\n};\n})()\nif (module.exports.__esModule) module.exports = module.exports.default\nvar __vue__options__ = (typeof module.exports === \"function\"? module.exports.options: module.exports)\nif (__vue__options__.functional) {console.error(\"[vueify] functional components are not supported and should be defined in plain js files using render functions.\")}\n__vue__options__.render = function(){with(this){return _h('span',{staticClass:\"login-with-github\",on:{\"click\":toggle}},[(!logged_in)?_t(\"login\",[_m(0)]):_t(\"logout\",[_h('button',{staticClass:\"btn btn-default\"},[_h('i',{staticClass:\"fa fa-github\"}),\"\\n      Log Out\\n    \"])]),\" \"])}}\n__vue__options__.staticRenderFns = [function(){with(this){return _h('button',{staticClass:\"btn btn-primary\"},[_h('i',{staticClass:\"fa fa-github\"}),\"\\n      Log In With Github\\n    \"])}}]\nif (module.hot) {(function () {  var hotAPI = require(\"vue-hot-reload-api\")\n  hotAPI.install(require(\"vue\"), true)\n  if (!hotAPI.compatible) return\n  module.hot.accept()\n  if (!module.hot.data) {\n    hotAPI.createRecord(\"data-v-1\", __vue__options__)\n  } else {\n    hotAPI.reload(\"data-v-1\", __vue__options__)\n  }\n})()}"]}