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

/***/ 139:
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(161);
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add CSS to SSR context
var add = __webpack_require__(5).default
module.exports.__inject__ = function (context) {
  add("50ff4dcc", content, true, context)
};

/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_3_node_modules_sass_resources_loader_lib_loader_js_ref_7_oneOf_1_4_node_modules_nuxt_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SaveChanges_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(139);
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_3_node_modules_sass_resources_loader_lib_loader_js_ref_7_oneOf_1_4_node_modules_nuxt_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SaveChanges_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_3_node_modules_sass_resources_loader_lib_loader_js_ref_7_oneOf_1_4_node_modules_nuxt_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SaveChanges_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_3_node_modules_sass_resources_loader_lib_loader_js_ref_7_oneOf_1_4_node_modules_nuxt_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SaveChanges_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_3_node_modules_sass_resources_loader_lib_loader_js_ref_7_oneOf_1_4_node_modules_nuxt_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SaveChanges_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));


/***/ }),

/***/ 161:
/***/ (function(module, exports, __webpack_require__) {

// Imports
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(4);
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);
// Module
___CSS_LOADER_EXPORT___.push([module.i, ".save-changes .w-alert{font-weight:400;padding:.75rem .75rem .75rem 1rem;margin-bottom:.75rem;border-radius:.75rem;color:#fff;display:flex;min-width:500px;background-color:var(--color-misc-1);justify-content:space-between;align-items:center;border:none;box-shadow:3px 3px 20px rgba(48,60,77,.65)}.w-app--dark .save-changes .w-alert{box-shadow:4.5px 4.5px 30px rgba(20,23,27,.85)}", ""]);
// Exports
module.exports = ___CSS_LOADER_EXPORT___;


/***/ }),

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

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

// CONCATENATED MODULE: D:/Development/StarlaneStudios/vindigo/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!D:/Development/StarlaneStudios/vindigo/node_modules/nuxt/node_modules/@nuxt/components/dist/loader.js??ref--0-0!D:/Development/StarlaneStudios/vindigo/node_modules/vue-loader/lib??vue-loader-options!./components/SaveChanges.vue?vue&type=template&id=71067fd4&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('w-notification',{staticClass:"save-changes",attrs:{"value":_vm.changed,"bottom":"","center":"","plain":""}},[_c('span',{staticClass:"save-changes__title"},[_c('w-icon',{staticClass:"left",attrs:{"size":"1.25rem"}},[_vm._v("\n\t\t\tmdi mdi-alert-circle\n\t\t")]),_vm._v("\n\t\t"+_vm._s(_vm.$t("GENERAL_UNSAVED_CHANGES"))+"\n\t")],1),_vm._v(" "),_c('div',[_c('w-button',{attrs:{"text":"","color":"white"},on:{"click":_vm.revert}},[_c('span',[_vm._v("Revert")])]),_vm._v(" "),_c('w-button',{attrs:{"color":"white","bg-color":"accent-1","loading":_vm.isSaving},on:{"click":_vm.save}},[_vm._v("\n\t\t\tSave\n\t\t\t"),_c('w-icon',{staticClass:"right"},[_vm._v("\n\t\t\t\tmdi mdi-check\n\t\t\t")])],1)],1)])}
var staticRenderFns = []


// CONCATENATED MODULE: ./components/SaveChanges.vue?vue&type=template&id=71067fd4&

// EXTERNAL MODULE: external "lodash"
var external_lodash_ = __webpack_require__(7);

// EXTERNAL MODULE: external "vue"
var external_vue_ = __webpack_require__(1);
var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);

// CONCATENATED MODULE: D:/Development/StarlaneStudios/vindigo/node_modules/babel-loader/lib??ref--13-0!D:/Development/StarlaneStudios/vindigo/node_modules/ts-loader??ref--13-1!D:/Development/StarlaneStudios/vindigo/node_modules/nuxt/node_modules/@nuxt/components/dist/loader.js??ref--0-0!D:/Development/StarlaneStudios/vindigo/node_modules/vue-loader/lib??vue-loader-options!./components/SaveChanges.vue?vue&type=script&lang=ts&
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
  function adopt(value) {
    return value instanceof P ? value : new P(function (resolve) {
      resolve(value);
    });
  }

  return new (P || (P = Promise))(function (resolve, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }

    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e) {
        reject(e);
      }
    }

    function step(result) {
      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
    }

    step((generator = generator.apply(thisArg, _arguments || [])).next());
  });
};



/* harmony default export */ var SaveChangesvue_type_script_lang_ts_ = (external_vue_default.a.extend({
  name: 'SaveChanges',
  props: {
    value: {
      type: Object,
      required: true
    },
    onSave: {
      type: Function,
      required: true
    }
  },
  data: () => ({
    original: null,
    changed: false,
    isSaving: false
  }),
  watch: {
    value: {
      deep: true,

      handler() {
        console.log('handler');
        this.changed = !Object(external_lodash_["isEqual"])(this.value, this.original);
      }

    }
  },

  created() {
    this.original = Object.assign({}, this.value);
  },

  methods: {
    revert() {
      this.$emit('input', Object.assign({}, this.original));
    },

    save() {
      return __awaiter(this, void 0, void 0, function* () {
        this.isSaving = true;
        yield Promise.resolve(this.onSave());
        this.changed = false;
        this.isSaving = false;
        this.original = Object.assign({}, this.value);
      });
    }

  }
}));
// CONCATENATED MODULE: ./components/SaveChanges.vue?vue&type=script&lang=ts&
 /* harmony default export */ var components_SaveChangesvue_type_script_lang_ts_ = (SaveChangesvue_type_script_lang_ts_); 
// EXTERNAL MODULE: D:/Development/StarlaneStudios/vindigo/node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);

// CONCATENATED MODULE: ./components/SaveChanges.vue



function injectStyles (context) {
  
  var style0 = __webpack_require__(160)
if (style0.__inject__) style0.__inject__(context)

}

/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  components_SaveChangesvue_type_script_lang_ts_,
  render,
  staticRenderFns,
  false,
  injectStyles,
  null,
  "12a04a6c"
  
)

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

/***/ })

};;
//# sourceMappingURL=save-changes.js.map