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

/***/ 122:
/***/ (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/setup/DbStep.vue?vue&type=template&id=38e87493&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-title',{staticClass:"text-h5"},[_vm._v("Database"),_c('v-card-text'),_c('v-form',[_c('v-btn-toggle',{attrs:{"text":"","color":"primary"},model:{value:(_vm.db.dialect),callback:function ($$v) {_vm.$set(_vm.db, "dialect", $$v)},expression:"db.dialect"}},[_c('v-btn',{attrs:{"value":"sqlite","text":""}},[_vm._v("sqlite")]),_c('v-btn',{attrs:{"value":"postgres","text":""}},[_vm._v("postgres")]),_c('v-btn',{attrs:{"value":"mariadb","text":""}},[_vm._v("mariadb")])],1),(_vm.db.dialect === "sqlite")?[_c('v-text-field',{attrs:{"label":"Path"},model:{value:(_vm.db.storage),callback:function ($$v) {_vm.$set(_vm.db, "storage", $$v)},expression:"db.storage"}})]:_vm._e(),(_vm.db.dialect !== "sqlite")?[_c('v-text-field',{attrs:{"label":"Hostname","rules":[_vm.$validators.required('hostname')]},model:{value:(_vm.db.host),callback:function ($$v) {_vm.$set(_vm.db, "host", $$v)},expression:"db.host"}}),_c('v-text-field',{attrs:{"label":"Database","rules":[_vm.$validators.required('database')]},model:{value:(_vm.db.database),callback:function ($$v) {_vm.$set(_vm.db, "database", $$v)},expression:"db.database"}}),_c('v-text-field',{attrs:{"label":"Username","rules":[_vm.$validators.required('username')]},model:{value:(_vm.db.username),callback:function ($$v) {_vm.$set(_vm.db, "username", $$v)},expression:"db.username"}}),_c('v-text-field',{attrs:{"type":"password","label":"Password","rules":[_vm.$validators.required('password')]},model:{value:(_vm.db.password),callback:function ($$v) {_vm.$set(_vm.db, "password", $$v)},expression:"db.password"}})]:_vm._e()],2)],1),_c('v-card-actions',[_c('v-btn',{attrs:{"text":"","color":"primary","loading":_vm.loading,"disabled":_vm.loading},on:{"click":_vm.checkDb}},[_vm._v(_vm._s(_vm.$t('common.next'))),_c('v-icon',[_vm._v("mdi-arrow-right")])],1)],1)],1)}
var staticRenderFns = []


// CONCATENATED MODULE: ./pages/setup/DbStep.vue?vue&type=template&id=38e87493&lang=pug&

// 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/setup/DbStep.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var DbStepvue_type_script_lang_js_ = ({
  data() {
    return {
      db: {
        dialect: 'sqlite',
        storage: './gancio.sqlite',
        host: 'localhost',
        database: 'gancio'
      },
      loading: false
    };
  },

  methods: {
    async checkDb() {
      this.loading = true;

      try {
        await this.$axios.$post('/setup/db', {
          db: this.db
        });
        this.$root.$message('DB Connection OK!', {
          color: 'success'
        });
        this.$emit('complete', this.db);
      } catch (e) {
        this.$root.$message(e.response.data, {
          color: 'error'
        });
      }

      this.loading = false;
    }

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

// CONCATENATED MODULE: ./pages/setup/DbStep.vue





/* normalize component */

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

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

/***/ })

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