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

/***/ 185:
/***/ (function(module, exports) {

// Exports
module.exports = {

};


/***/ }),

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

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


/***/ }),

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

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

// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/product-builder/DialogSelectAddr.vue?vue&type=template&id=69716650&scoped=true
var render = function render() {
  var _vm = this,
    _c = _vm._self._c;
  return _c('div', {
    attrs: {
      "id": "dialogSelectAddr"
    }
  }, [_c('el-dialog', {
    attrs: {
      "lock-scroll": false,
      "title": "Choose a delivery address",
      "visible": _vm.show,
      "close-on-click-modal": false,
      "close-on-press-escape": false,
      "show-close": true,
      "width": "50%"
    },
    on: {
      "update:visible": function ($event) {
        _vm.show = $event;
      },
      "close": _vm.close
    }
  }, [_c('el-table', {
    ref: "table",
    staticStyle: {
      "width": "100%"
    },
    attrs: {
      "height": "300",
      "data": _vm.computedList,
      "row-class-name": 'row-cursor'
    },
    on: {
      "row-click": _vm.handleCurrentChange
    }
  }, [_c('el-table-column', {
    attrs: {
      "label": "checked",
      "width": "80px"
    },
    scopedSlots: _vm._u([{
      key: "default",
      fn: function (scope) {
        return [_c('el-checkbox', {
          attrs: {
            "value": scope.row.selected
          }
        })];
      }
    }])
  }), _vm._v(" "), _c('el-table-column', {
    attrs: {
      "label": "address"
    },
    scopedSlots: _vm._u([{
      key: "default",
      fn: function (scope) {
        return [_vm._v("\n          " + _vm._s(scope.row.name) + " " + _vm._s(scope.row.address) + ", " + _vm._s(scope.row.city) + ", " + _vm._s(scope.row.post_code) + ", " + _vm._s(scope.row.country) + ", Phone number: " + _vm._s(scope.row.phone) + "\n        ")];
      }
    }])
  })], 1), _vm._v(" "), _c('br'), _vm._v(" "), _c('div', [_c('el-button', {
    attrs: {
      "size": "mini",
      "type": "text",
      "plain": ""
    },
    on: {
      "click": _vm.newAddr
    }
  }, [_vm._v("Add Shipping Address")])], 1), _vm._v(" "), _c('br'), _vm._v(" "), _c('el-button', {
    attrs: {
      "size": "small",
      "type": "primary"
    },
    on: {
      "click": _vm.submit
    }
  }, [_vm._v("Deliver to this address")])], 1)], 1);
};
var staticRenderFns = [];

// CONCATENATED MODULE: ./components/product-builder/DialogSelectAddr.vue?vue&type=template&id=69716650&scoped=true

// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/product-builder/DialogSelectAddr.vue?vue&type=script&lang=js
/* harmony default export */ var DialogSelectAddrvue_type_script_lang_js = ({
  name: 'DialogSelectAddr',
  components: {},
  filters: {},
  props: {
    addressDetail: {
      type: Object,
      default: function () {
        return {};
      }
    },
    visible: {
      type: Boolean,
      default: false
    },
    addressList: {
      type: Array,
      default: function () {
        return [];
      }
    }
  },
  data() {
    return {
      show: false,
      selectedId: -1,
      computedList: []
    };
  },
  computed: {},
  watch: {
    visible() {
      this.show = this.visible;
      if (this.visible) {
        this.generateAddressList();
      }
    },
    addressList() {
      this.generateAddressList();
    }
  },
  mounted() {},
  methods: {
    generateAddressList() {
      this.computedList = this.addressList.map(item => {
        return {
          ...item,
          selected: false
        };
      });
    },
    submit() {
      if (this.selectedId === -1) {
        this.$message.error('Please check address before click this button');
        return;
      }
      this.$emit('select-addr', this.selectedId);
      this.close();
    },
    close() {
      this.selectedId = -1;
      this.computedList = [];
      this.$emit('close', false);
    },
    newAddr() {
      this.$emit('add-new-addr');
      this.close();
    },
    handleCurrentChange(value, row, p3) {
      this.selectedId = value.id || -1;
      this.$refs.table.setCurrentRow(value);
      this.computedList = this.addressList.map(item => {
        return {
          ...item,
          selected: item.id === value.id
        };
      });
    }
  }
});
// CONCATENATED MODULE: ./components/product-builder/DialogSelectAddr.vue?vue&type=script&lang=js
 /* harmony default export */ var product_builder_DialogSelectAddrvue_type_script_lang_js = (DialogSelectAddrvue_type_script_lang_js); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);

// CONCATENATED MODULE: ./components/product-builder/DialogSelectAddr.vue



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

}

/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  product_builder_DialogSelectAddrvue_type_script_lang_js,
  render,
  staticRenderFns,
  false,
  injectStyles,
  "69716650",
  "3dfc6015"
  
)

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

/***/ })

};;
//# sourceMappingURL=product-builder-dialog-select-addr.js.map