exports.ids = [43];
exports.modules = {

/***/ 140:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/pug-plain-loader??ref--1-oneOf-0-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/settings.vue?vue&type=template&id=21f5e145&lang=pug&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-container',[_c('v-card',[_c('v-card-title',{staticClass:"text-h5"},[_vm._v(_vm._s(_vm.$auth.user.email))]),_c('v-card-text',[_c('p',[_vm._v(_vm._s(_vm.$t('settings.remove_account')))]),_c('v-btn',{staticClass:"black--text",attrs:{"color":"warning"},on:{"click":_vm.remove_account}},[_vm._v(_vm._s(_vm.$t('common.remove')))])],1)],1)],1)}
var staticRenderFns = []


// CONCATENATED MODULE: ./pages/settings.vue?vue&type=template&id=21f5e145&lang=pug&

// EXTERNAL MODULE: external "vuex"
var external_vuex_ = __webpack_require__(3);

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--2-0!./node_modules/babel-loader/lib??ref--2-1!./node_modules/vue-loader/lib??vue-loader-options!./pages/settings.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//

/* harmony default export */ var settingsvue_type_script_lang_js_ = ({
  name: 'Settings',
  middleware: ['auth'],

  data() {
    return {
      password: '',
      user: {}
    };
  },

  computed: Object(external_vuex_["mapState"])(['settings']),
  methods: {
    // async change_password () {
    //   if (!this.password) { return }
    //   const user_data = { id: this.$auth.user.id, password: this.password }
    //   try {
    //     await this.$axios.$put('/user', user_data)
    //     Message({ message: this.$t('settings.password_updated'), showClose: true, type: 'success' })
    //     this.$router.replace('/')
    //   } catch (e) {
    //     console.log(e)
    //   }
    // },
    // update_settings () {
    //   MessageBox.confirm(this.$t('settings.update_confirm'),
    //     this.$t('common.confirm'), {
    //       confirmButtonText: this.$t('common.ok'),
    //       cancelButtonText: this.$t('common.cancel'),
    //       type: 'error'
    //     }).then(async () => {
    //     this.user = await this.$axios.$put('/user', { ...this.user, password: this.password })
    //   }).catch(e => {
    //     Message({ message: e, showClose: true, type: 'warning' })
    //   })
    // },
    async remove_account() {
      const ret = await this.$root.$confirm('settings.remove_account_confirm', {
        color: 'error'
      });
      if (!ret) return;
      this.$axios.$delete('/user');
      this.$auth.logout();
      this.$router.replace('/');
    }

  },

  head() {
    return {
      title: `${this.settings.title} - ${this.$t('common.settings')}`
    };
  }

});
// CONCATENATED MODULE: ./pages/settings.vue?vue&type=script&lang=js&
 /* harmony default export */ var pages_settingsvue_type_script_lang_js_ = (settingsvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(1);

// CONCATENATED MODULE: ./pages/settings.vue





/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  pages_settingsvue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  null,
  null,
  "68905047"
  
)

/* harmony default export */ var settings = __webpack_exports__["default"] = (component.exports);

/***/ })

};;
//# sourceMappingURL=settings.js.map