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

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

module.exports = __webpack_require__.p + "img/tick.affd1b1.png";

/***/ }),

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

// Exports
module.exports = {

};


/***/ }),

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

module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAUCAYAAABvVQZ0AAAAAXNSR0IArs4c6QAAAqBJREFUOE9t1Onr53MUBfDXLUrZskYIf4ElKdkSWRJmpmzJNjMP7JGMpWw11qzDGLuGB2PfoygST0hKKUWUkm0Q4sFY5q3z6375zPT7PPn06f3+nHvuuefcstEzxjgc92B7nFVVr82ujDGOxWNYiwur6q3p7zW5uDPuxMl4Aj/jIlyH5bgGV2MFtsbZWINLq+rb4NQYY5NUwfX4CudW1Xs5HGOcgkfwSwMsqaqn+uwgrMSeXWRlwN7BPs1gRVX9PWG7CPdjW/zUhZ6fnIfIjP1HAUv/H+LEqvq9q+6Ee7GwW78ZV+JivIjzq+q7vrsFnsW+AdsbL+FXnIBDcQe+xuKqSqG5Z4yxX7e9e7TC2/3vllgwN4Axxo54Afsj1KPfDVX11zzT3hRXtSyR5IM5oKq1M7BD8GSz2xWfNqtP5gGbscu9H7BVHJChpc2I/DRW4wLsgAdwRNjhpqpaN8bYDNfiMryKc7r4KpyGRQG7HUtwUlW9MdHndNyFeOg2XIHtcF5VPTO5d1QPYM4aES+AS/F4mzA2mGn5PvbAFzgg2vRZgDOoMxB2y6YJOAwPtgYx8Zt4FMf0ezESrTj/yI7cb+mqqt6dS8CEbrKY6SUyl+APfB//4cfO6nP93rxbT9TWV9WfG4Mt6HGn3X9wYLcdRrf2kJZFaCRu0TI5XVNVMfIGzAIWrwUoGt6N+3A0bsGZWIfkda++k5gtnA/suPZaRp8NESN/1h76eIyxTWuXlKTgw22P46vqlfk0i5C74KHO68tVFe1mcYrGKZrMpt1vcHBVRdP/2+xxJ0oxY8yZljKM1VW1fowRoFNxIxLuRG7VdMv8N81pbMYYWX6X91Q/bxtkMFkK2cLLqyo7boNnXrBJW7s1k+j0etZQVX25Mcjs+1/MoQbO2FAmGQAAAABJRU5ErkJggg=="

/***/ }),

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

module.exports = __webpack_require__.p + "img/xunjia.940143c.png";

/***/ }),

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

module.exports = __webpack_require__.p + "img/co2.b346d72.png";

/***/ }),

/***/ 236:
/***/ (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_Project_vue_vue_type_style_index_0_id_694555a8_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(191);
/* 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_Project_vue_vue_type_style_index_0_id_694555a8_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_Project_vue_vue_type_style_index_0_id_694555a8_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_Project_vue_vue_type_style_index_0_id_694555a8_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_Project_vue_vue_type_style_index_0_id_694555a8_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));


/***/ }),

/***/ 243:
/***/ (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/Project.vue?vue&type=template&id=694555a8&scoped=true
var render = function render() {
  var _vm$productInfo$recor, _vm$recordData, _vm$productInfo$carbo;
  var _vm = this,
    _c = _vm._self._c;
  return _c('section', {
    staticClass: "project-wrap"
  }, [_vm._ssrNode("<div class=\"project\" data-v-694555a8><div class=\"flex btn-nav\"" + _vm._ssrStyle(null, null, {
    display: false ? undefined : 'none'
  }) + " data-v-694555a8><img" + _vm._ssrAttr("src", __webpack_require__(233)) + " data-v-694555a8><span data-v-694555a8>Product builder</span></div> " + (_vm.isLogin && _vm.domainList.some(i => i.test(_vm.userInfo.email)) ? "<a" + _vm._ssrAttr("href", 'https://forms.zohopublic.com/promocollection/form/ClientDetails/formperma/1Xq9qhTYZd3EuGJarUVql1FUXi096vI60BnG-lQ0Gh4?email=' + encodeURIComponent(_vm.userInfo.email) + '&product_code=' + encodeURIComponent(_vm.productInfo.product_code)) + " target=\"_target\" data-v-694555a8><div class=\"flex btn-nav\" data-v-694555a8><img" + _vm._ssrAttr("src", __webpack_require__(190)) + " data-v-694555a8><span data-v-694555a8>Ticket</span></div></a>" : "<!---->") + " <a id=\"quickEnqriryLink\" target=\"_blank\" data-v-694555a8>" + (_vm.isLogin ? "<div class=\"flex btn-nav\" data-v-694555a8><img" + _vm._ssrAttr("src", __webpack_require__(234)) + " alt style=\"opacity: 0.8\" data-v-694555a8><span data-v-694555a8>Quick Enquiry</span></div>" : "<!---->") + "</a> <a target=\"_blank\"" + _vm._ssrAttr("href", _vm.shouldButtonRecordDisabled ? 'javascript:void(0)' : `/product-record/${_vm.productInfo.product_code}?version=${((_vm$productInfo$recor = _vm.productInfo.record) === null || _vm$productInfo$recor === void 0 ? void 0 : _vm$productInfo$recor.version) || ((_vm$recordData = _vm.recordData) === null || _vm$recordData === void 0 ? void 0 : _vm$recordData.version)}`) + _vm._ssrStyle(null, null, {
    display: _vm.btnShow ? '' : 'none'
  }) + " data-v-694555a8><div" + _vm._ssrClass("flex btn-nav", {
    disabled: _vm.shouldButtonRecordDisabled
  }) + " data-v-694555a8><img" + _vm._ssrAttr("src", __webpack_require__(190)) + " data-v-694555a8><span data-v-694555a8>Item Record</span></div></a> " + ((_vm$productInfo$carbo = _vm.productInfo.carbon) !== null && _vm$productInfo$carbo !== void 0 && _vm$productInfo$carbo.length ? "<div class=\"flex btn-nav\" data-v-694555a8><img" + _vm._ssrAttr("src", __webpack_require__(235)) + " data-v-694555a8> <span data-v-694555a8>Carbon Footprint</span></div>" : "<!---->") + "</div>")]);
};
var staticRenderFns = [];

// CONCATENATED MODULE: ./components/Project.vue?vue&type=template&id=694555a8&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/Project.vue?vue&type=script&lang=js
/* harmony default export */ var Projectvue_type_script_lang_js = ({
  props: {
    productInfo: {
      type: Object,
      default: () => {
        return {};
      }
    }
  },
  data() {
    return {
      domainList: [/\@promocollection/, /\@primepac/, /\@pangea/, /\@phonelocker/, /\@phoenixexhibit/],
      defaultURL: 'https://zfrmz.com/2IuJGuGLCRBROyJXZetQ',
      recordData: null
    };
  },
  computed: {
    isLogin() {
      var _this$$store$state$us;
      return !!((_this$$store$state$us = this.$store.state.userInfo) !== null && _this$$store$state$us !== void 0 && _this$$store$state$us.email);
    },
    userInfo() {
      return this.$store.state.userInfo || {};
    },
    btnShow() {
      return this.isLogin && /@promocollection(.com.au|.uk)/.test(this.userInfo.email);
    },
    shouldButtonRecordDisabled() {
      var _this$productInfo$rec, _this$productInfo$rec2, _this$recordData, _this$recordData$reco;
      if (this.productInfo.record && (_this$productInfo$rec = this.productInfo.record) !== null && _this$productInfo$rec !== void 0 && (_this$productInfo$rec2 = _this$productInfo$rec.record_reason) !== null && _this$productInfo$rec2 !== void 0 && _this$productInfo$rec2.length) {
        return false;
      }
      return !((_this$recordData = this.recordData) !== null && _this$recordData !== void 0 && (_this$recordData$reco = _this$recordData.record_reason) !== null && _this$recordData$reco !== void 0 && _this$recordData$reco.length);
    }
  },
  watch: {
    isLogin: {
      handler(newVal, oldVal) {
        if (newVal && newVal !== oldVal) {
          this.$axios.get(`/uk-api/uk/goods/detail?product_code=${this.productInfo.product_code}`).then(res => {
            if (res.code === 1) {
              this.recordData = res.result.record;
            }
          });
        }
      }
    }
  },
  mounted() {
    this.generateLink();
  },
  methods: {
    generateLink() {
      const target = document.getElementById('quickEnqriryLink');
      const config = {
        name: this.userInfo.contacts,
        phone: this.userInfo.phone,
        email: this.userInfo.email,
        company: this.userInfo.company,
        product: `${this.productInfo.alias_name || this.productInfo.product_name} & ${this.productInfo.product_code}`
      };
      let query = '';
      for (const key in config) {
        if (config[key]) {
          query += `&${key}=${encodeURIComponent(config[key])}`;
        }
      }
      query = query.slice(1);
      target.href = this.defaultURL + '?' + query;
    },
    handleAdd() {
      this.$emit('handleAdd');
    },
    openZoho() {
      document.querySelector('#zsiq_float').click();
    },
    toProductBuilder() {
      if (!this.$utils.checkLogin()) return;
      this.$emit('save-selected-data');
      setTimeout(() => {
        location.href = location.origin + `/product-builder/${this.$route.params.code}`;
      }, 0);
    },
    openTicket() {
      this.$emit('handleOpenTicket');
    },
    openFootprint() {
      this.$emit('handleOpenFootprint');
    }
  }
});
// CONCATENATED MODULE: ./components/Project.vue?vue&type=script&lang=js
 /* harmony default export */ var components_Projectvue_type_script_lang_js = (Projectvue_type_script_lang_js); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);

// CONCATENATED MODULE: ./components/Project.vue



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

}

/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  components_Projectvue_type_script_lang_js,
  render,
  staticRenderFns,
  false,
  injectStyles,
  "694555a8",
  "62568dad"
  
)

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

/***/ })

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