s-platform-landing-section 0.1.34 → 0.1.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -21,6 +21,7 @@ require('slick-carousel/slick/slick.css');
21
21
  require('slick-carousel/slick/slick-theme.css');
22
22
  var ai = require('react-icons/ai');
23
23
  var go = require('react-icons/go');
24
+ var gr = require('react-icons/gr');
24
25
  var ri = require('react-icons/ri');
25
26
  var hi = require('react-icons/hi');
26
27
  var gi = require('react-icons/gi');
@@ -1216,11 +1217,10 @@ var Hero2 = function Hero2(props) {
1216
1217
  className: "w-full h-auto object-cover min-h-[22vh] max-h-[100vh]"
1217
1218
  }), /*#__PURE__*/React__default.createElement("div", {
1218
1219
  className: "absolute inset-y-0 right-[1%] md:right-[8%] w-[58%] md:w-1/2 flex flex-col gap-2 md:gap-4 xl:gap-6 justify-center items-start px-4 pt-4 pb-2 md:px-8 md:pt-8 md:pb-6 xl:p-8"
1219
- }, /*#__PURE__*/React__default.createElement("img", {
1220
+ }, shopConfig !== null && shopConfig !== void 0 && shopConfig.logoUrl ? /*#__PURE__*/React__default.createElement("img", {
1220
1221
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
1221
- alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName,
1222
1222
  className: "h-6 w-6 sm:h-10 sm:w-10 md:h-12 md:w-12 lg:w-14 lg:h-14 xl:h-20 xl:w-20"
1223
- }), /*#__PURE__*/React__default.createElement("div", {
1223
+ }) : null, /*#__PURE__*/React__default.createElement("div", {
1224
1224
  className: "font-medium line-clamp-1 ",
1225
1225
  style: {
1226
1226
  fontSize: "clamp(1.25rem, 4vw, 3.5rem)",
@@ -7816,8 +7816,6 @@ var ProductController = function ProductController(props) {
7816
7816
  setLoading(true);
7817
7817
  var _temp = _catch(function () {
7818
7818
  var filterParams = _extends({}, defaultParams, params);
7819
- console.log("filterParams params", params);
7820
- console.log("filterParams", filterParams);
7821
7819
  return Promise.resolve(getProductListApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId, filterParams)).then(function (res) {
7822
7820
  var _res$data, _res$data$status;
7823
7821
  if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$status = _res$data.status) === null || _res$data$status === void 0 ? void 0 : _res$data$status.code) == 200) {
@@ -8161,33 +8159,34 @@ var ProductPrice = function ProductPrice(props) {
8161
8159
  }
8162
8160
  };
8163
8161
  return /*#__PURE__*/React__default.createElement("div", {
8164
- className: className
8162
+ className: "flex gap-4 flex-wrap " + className
8165
8163
  }, /*#__PURE__*/React__default.createElement("span", {
8166
- className: "text-primary font-semibold mr-4 " + priceClassName,
8164
+ className: "text-primary font-semibold " + priceClassName,
8167
8165
  style: style
8168
8166
  }, displayPrice), displayPriceBeforeDiscount !== displayPrice && displayPriceBeforeDiscount != null ? /*#__PURE__*/React__default.createElement("span", {
8169
8167
  className: "text-gray3 line-through " + priceBeforeDiscountClassName + " "
8170
- }, "200,000\u0111") : null);
8168
+ }, displayPriceBeforeDiscount) : null);
8171
8169
  };
8172
8170
 
8173
8171
  var ProductItem1 = function ProductItem1(props) {
8172
+ var _product$productInfo, _product$productInfo2;
8174
8173
  var product = props.product;
8175
8174
  return /*#__PURE__*/React__default.createElement("div", {
8176
8175
  className: "flex"
8177
8176
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
8178
- product: product,
8177
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
8179
8178
  className: "!w-20 rounded-lg"
8180
8179
  }), /*#__PURE__*/React__default.createElement("div", {
8181
8180
  className: "ml-4 border-b border-stroke flex-1"
8182
8181
  }, /*#__PURE__*/React__default.createElement("div", {
8183
8182
  className: "text-lg"
8184
- }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement("div", {
8183
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement("div", {
8185
8184
  className: "flex mt-2"
8186
8185
  }, /*#__PURE__*/React__default.createElement("div", {
8187
8186
  className: "flex-1 text-gray3"
8188
- }, getDurationValue(product === null || product === void 0 ? void 0 : product.attributes)), /*#__PURE__*/React__default.createElement(ProductPrice, {
8189
- product: product
8190
- }))));
8187
+ }, getDurationValue(product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.attributes)), product !== null && product !== void 0 && product.isShowProductPriceOnLanding ? /*#__PURE__*/React__default.createElement(ProductPrice, {
8188
+ product: product === null || product === void 0 ? void 0 : product.productInfo
8189
+ }) : null)));
8191
8190
  };
8192
8191
 
8193
8192
  var Dash = function Dash(props) {
@@ -8295,7 +8294,7 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
8295
8294
  Link: Link,
8296
8295
  href: getLinkServiceDetail(product === null || product === void 0 ? void 0 : product.productInfo)
8297
8296
  }, /*#__PURE__*/React__default.createElement(ProductItem1, {
8298
- product: product === null || product === void 0 ? void 0 : product.productInfo
8297
+ product: product
8299
8298
  }));
8300
8299
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, {
8301
8300
  text: "d\u1ECBch v\u1EE5"
@@ -8350,10 +8349,12 @@ var TreatmentsList6 = function TreatmentsList6(props) {
8350
8349
  return /*#__PURE__*/React__default.createElement(TreatmentItem, {
8351
8350
  Link: Link,
8352
8351
  shopConfigStyle: shopConfigStyle,
8353
- product: product === null || product === void 0 ? void 0 : product.productInfo,
8352
+ product: product,
8354
8353
  key: "htrhr-" + idx
8355
8354
  });
8356
- })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
8355
+ })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, {
8356
+ text: "d\u1ECBch v\u1EE5"
8357
+ }), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
8357
8358
  label: "Xem thêm",
8358
8359
  onClick: handleGetMoreProducts,
8359
8360
  className: "mx-auto " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass),
@@ -8579,7 +8580,7 @@ var Select = React.forwardRef(function (props, ref) {
8579
8580
  React.useEffect(function () {
8580
8581
  var delayDebounceFn = setTimeout(function () {
8581
8582
  handleSearch === null || handleSearch === void 0 ? void 0 : handleSearch(inputSearch);
8582
- }, 500);
8583
+ }, 600);
8583
8584
  return function () {
8584
8585
  return clearTimeout(delayDebounceFn);
8585
8586
  };
@@ -8710,7 +8711,7 @@ var Select = React.forwardRef(function (props, ref) {
8710
8711
  }, label ? /*#__PURE__*/React__default.createElement("div", {
8711
8712
  className: "mb-1 " + labelClassName
8712
8713
  }, label, " ", labelRequired) : null, /*#__PURE__*/React__default.createElement("div", {
8713
- className: "flex flex-col gap-2 rounded-lg w-full bg-white " + (disabled ? "!bg-gray6" : "") + " border " + className
8714
+ className: "flex flex-col gap-2 rounded-lg w-full bg-white " + (disabled ? "!bg-gray6" : "") + " border border-stroke " + className
8714
8715
  }, /*#__PURE__*/React__default.createElement("button", {
8715
8716
  className: " w-full h-10 bg-transparent flex justify-between items-center px-3 py-2 " + selectClassName,
8716
8717
  onClick: handleToggleSelect,
@@ -9536,8 +9537,8 @@ var TreatmentsList7 = function TreatmentsList7(props) {
9536
9537
  params: params
9537
9538
  })),
9538
9539
  _ProductController$pr = _ProductController.products,
9539
- products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
9540
- console.log("treatment1:", products);
9540
+ products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
9541
+ loading = _ProductController.loading;
9541
9542
  var handleOpenModalBooking = function handleOpenModalBooking(event, data) {
9542
9543
  try {
9543
9544
  var _data$productInfo, _data$productInfo2;
@@ -9594,7 +9595,9 @@ var TreatmentsList7 = function TreatmentsList7(props) {
9594
9595
  shopConfigStyle: shopConfigStyle
9595
9596
  }), /*#__PURE__*/React__default.createElement("div", {
9596
9597
  className: "mt-12 w-full"
9597
- }, (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement(Slider, {
9598
+ }, loading ? /*#__PURE__*/React__default.createElement("div", {
9599
+ className: "flex justify-center h-20 items-center"
9600
+ }, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement(Slider, {
9598
9601
  infinite: (products === null || products === void 0 ? void 0 : products.length) > 1 ? true : false,
9599
9602
  slidesToShow: 1,
9600
9603
  slidesToScroll: 1,
@@ -9792,7 +9795,7 @@ var ServiceDetail1 = function ServiceDetail1(props) {
9792
9795
  }
9793
9796
  }), /*#__PURE__*/React__default.createElement("p", {
9794
9797
  className: "text-lg mt-12 text-xl pb-1 pt-6 border-t border-stroke"
9795
- }, "M\xF4 t\u1EA3 s\u1EA3n ph\u1EA9m"), product !== null && product !== void 0 && product.description ? /*#__PURE__*/React__default.createElement("div", {
9798
+ }, "M\xF4 t\u1EA3 d\u1ECBch v\u1EE5"), product !== null && product !== void 0 && product.description ? /*#__PURE__*/React__default.createElement("div", {
9796
9799
  className: "h-max"
9797
9800
  }, /*#__PURE__*/React__default.createElement("div", {
9798
9801
  ref: descriptionRef,
@@ -9927,7 +9930,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
9927
9930
  }
9928
9931
  }), /*#__PURE__*/React__default.createElement("p", {
9929
9932
  className: "text-lg mt-12 text-xl pb-1 pt-6 border-t border-stroke"
9930
- }, "M\xF4 t\u1EA3 s\u1EA3n ph\u1EA9m"), product !== null && product !== void 0 && product.description ? /*#__PURE__*/React__default.createElement("div", {
9933
+ }, "M\xF4 t\u1EA3 d\u1ECBch v\u1EE5"), product !== null && product !== void 0 && product.description ? /*#__PURE__*/React__default.createElement("div", {
9931
9934
  className: "h-max"
9932
9935
  }, /*#__PURE__*/React__default.createElement("div", {
9933
9936
  ref: descriptionRef,
@@ -9963,6 +9966,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
9963
9966
  };
9964
9967
 
9965
9968
  var ProductItem2 = function ProductItem2(props) {
9969
+ var _product$productInfo;
9966
9970
  var product = props.product,
9967
9971
  _props$Link = props.Link,
9968
9972
  Link = _props$Link === void 0 ? null : _props$Link,
@@ -9970,27 +9974,29 @@ var ProductItem2 = function ProductItem2(props) {
9970
9974
  className = _props$className === void 0 ? "" : _props$className;
9971
9975
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
9972
9976
  Link: Link,
9973
- href: getLinkProductDetail(product)
9977
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
9974
9978
  }, /*#__PURE__*/React__default.createElement("div", {
9975
9979
  className: "text-center relative group " + className
9976
9980
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
9977
- product: product,
9981
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
9978
9982
  className: "max-w-[240px] rounded-full mx-auto !object-cover"
9979
- }), /*#__PURE__*/React__default.createElement(ProductPrice, {
9980
- product: product,
9981
- className: "text-lg mt-4"
9982
9983
  }), /*#__PURE__*/React__default.createElement("div", {
9984
+ className: "flex justify-center"
9985
+ }, /*#__PURE__*/React__default.createElement(ProductPrice, {
9986
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
9987
+ className: "text-lg mt-4 " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
9988
+ })), /*#__PURE__*/React__default.createElement("div", {
9983
9989
  className: "text-lg mt-2"
9984
- }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement("div", {
9990
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement("div", {
9985
9991
  className: "absolute w-full h-full rounded-2xl top-0 left-0 opacity-0 group-hover:opacity-100 transition-opacity duration-300 bg-[rgba(0,0,0,0.5)] flex flex-col items-center justify-center gap-4"
9986
9992
  }, /*#__PURE__*/React__default.createElement(LinkToPage, {
9987
- href: getLinkProductDetail(product)
9993
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
9988
9994
  }, /*#__PURE__*/React__default.createElement(Button, {
9989
9995
  label: /*#__PURE__*/React__default.createElement("div", {
9990
9996
  className: "flex items-center gap-2"
9991
9997
  }, "Xem chi ti\u1EBFt ", /*#__PURE__*/React__default.createElement(fa.FaArrowRight, null))
9992
9998
  })), /*#__PURE__*/React__default.createElement(LinkToPage, {
9993
- href: getLinkProductDetail(product)
9999
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
9994
10000
  }, /*#__PURE__*/React__default.createElement(Button, {
9995
10001
  label: /*#__PURE__*/React__default.createElement("div", {
9996
10002
  className: "flex items-center gap-2"
@@ -10000,7 +10006,7 @@ var ProductItem2 = function ProductItem2(props) {
10000
10006
  type: "outline",
10001
10007
  className: "!border-white !text-white hover:!border-gray5"
10002
10008
  })), /*#__PURE__*/React__default.createElement(LinkToPage, {
10003
- href: getLinkProductDetail(product)
10009
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10004
10010
  }, /*#__PURE__*/React__default.createElement(Button, {
10005
10011
  label: /*#__PURE__*/React__default.createElement("div", {
10006
10012
  className: "flex items-center gap-2"
@@ -10011,6 +10017,7 @@ var ProductItem2 = function ProductItem2(props) {
10011
10017
  };
10012
10018
 
10013
10019
  var ProductItem3 = function ProductItem3(props) {
10020
+ var _product$productInfo;
10014
10021
  var product = props.product,
10015
10022
  _props$Link = props.Link,
10016
10023
  Link = _props$Link === void 0 ? null : _props$Link,
@@ -10018,23 +10025,24 @@ var ProductItem3 = function ProductItem3(props) {
10018
10025
  className = _props$className === void 0 ? "" : _props$className;
10019
10026
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
10020
10027
  Link: Link,
10021
- href: getLinkProductDetail(product)
10028
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10022
10029
  }, /*#__PURE__*/React__default.createElement("div", {
10023
10030
  className: "w-full border border-stroke rounded-2xl " + className
10024
10031
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10025
- product: product,
10032
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10026
10033
  className: "w-full h-48 md:h-60 xl:h-[304px] rounded-t-2xl"
10027
10034
  }), /*#__PURE__*/React__default.createElement("div", {
10028
10035
  className: "p-4 flex flex-col gap-2 md:gap-4 items-start"
10029
10036
  }, /*#__PURE__*/React__default.createElement("div", {
10030
10037
  className: "line-clamp-1 w-full overflow-hidden text-ellipsis"
10031
- }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10032
- product: product,
10033
- className: "text-lg text-start"
10038
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10039
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10040
+ className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10034
10041
  }))));
10035
10042
  };
10036
10043
 
10037
10044
  var ProductItem4 = function ProductItem4(props) {
10045
+ var _product$productInfo;
10038
10046
  var _props$shopConfigStyl = props.shopConfigStyle,
10039
10047
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
10040
10048
  product = props.product,
@@ -10044,17 +10052,17 @@ var ProductItem4 = function ProductItem4(props) {
10044
10052
  className = _props$className === void 0 ? "" : _props$className;
10045
10053
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
10046
10054
  Link: Link,
10047
- href: getLinkProductDetail(product)
10055
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10048
10056
  }, /*#__PURE__*/React__default.createElement("div", {
10049
10057
  className: "w-full border border-stroke flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
10050
10058
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10051
- product: product,
10059
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10052
10060
  className: "w-full h-40 sm:h-56 lg:h-60 xl:h-64 bg-cover bg-no-repeat rounded-2xl"
10053
10061
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10054
10062
  className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis text-lg"
10055
- }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10056
- product: product,
10057
- className: "text-lg text-start mt-2"
10063
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10064
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10065
+ className: "text-lg text-start mt-2 " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10058
10066
  })), /*#__PURE__*/React__default.createElement("div", {
10059
10067
  className: "flex pt-2 md:pt-4 gap-2 md:gap-4 border-t items-center"
10060
10068
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10069,6 +10077,7 @@ var ProductItem4 = function ProductItem4(props) {
10069
10077
  };
10070
10078
 
10071
10079
  var ProductItem5 = function ProductItem5(props) {
10080
+ var _product$productInfo;
10072
10081
  var product = props.product,
10073
10082
  _props$Link = props.Link,
10074
10083
  Link = _props$Link === void 0 ? null : _props$Link,
@@ -10078,17 +10087,17 @@ var ProductItem5 = function ProductItem5(props) {
10078
10087
  className = _props$className === void 0 ? "" : _props$className;
10079
10088
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
10080
10089
  Link: Link,
10081
- href: getLinkProductDetail(product)
10090
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10082
10091
  }, /*#__PURE__*/React__default.createElement("div", {
10083
10092
  className: "w-full flex flex-col gap-4 rounded-2xl p-1 " + className
10084
10093
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10085
- product: product,
10094
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10086
10095
  className: "w-full w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
10087
10096
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10088
10097
  className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis mb-2"
10089
- }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10090
- product: product,
10091
- className: "text-lg text-start"
10098
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10099
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10100
+ className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10092
10101
  })), /*#__PURE__*/React__default.createElement("div", {
10093
10102
  className: "flex gap-2 md:gap-4 "
10094
10103
  }, /*#__PURE__*/React__default.createElement(ai.AiOutlineShoppingCart, {
@@ -10101,6 +10110,7 @@ var ProductItem5 = function ProductItem5(props) {
10101
10110
  };
10102
10111
 
10103
10112
  var ProductItem6 = function ProductItem6(props) {
10113
+ var _product$productInfo;
10104
10114
  var product = props.product,
10105
10115
  _props$shopConfigStyl = props.shopConfigStyle,
10106
10116
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
@@ -10110,17 +10120,17 @@ var ProductItem6 = function ProductItem6(props) {
10110
10120
  className = _props$className === void 0 ? "" : _props$className;
10111
10121
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
10112
10122
  Link: Link,
10113
- href: getLinkProductDetail(product)
10123
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10114
10124
  }, /*#__PURE__*/React__default.createElement("div", {
10115
10125
  className: "w-full border border-stroke flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
10116
10126
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10117
- product: product,
10127
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10118
10128
  className: "w-full h-48 md:h-60 xl:h-72 rounded-2xl"
10119
10129
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10120
10130
  className: "text start line-clamp-1 w-full overflow-hidden text-ellipsis"
10121
- }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10122
- product: product,
10123
- className: "text-lg text-start"
10131
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10132
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10133
+ className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10124
10134
  })), /*#__PURE__*/React__default.createElement("div", {
10125
10135
  className: "flex pt-4 gap-2 md:gap-4 border-t items-center"
10126
10136
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10133,32 +10143,36 @@ var ProductItem6 = function ProductItem6(props) {
10133
10143
  };
10134
10144
 
10135
10145
  var ProductItem7 = function ProductItem7(props) {
10146
+ var _product$productInfo, _product$productInfo2, _product$productInfo3, _product$productInfo4, _product$productInfo5, _product$productInfo6;
10136
10147
  var product = props.product,
10137
10148
  _props$Link = props.Link,
10138
10149
  Link = _props$Link === void 0 ? null : _props$Link,
10139
10150
  _props$className = props.className,
10140
- className = _props$className === void 0 ? "" : _props$className;
10151
+ className = _props$className === void 0 ? "" : _props$className,
10152
+ _props$classNamePrice = props.classNamePrice,
10153
+ classNamePrice = _props$classNamePrice === void 0 ? "text-lg" : _props$classNamePrice;
10141
10154
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
10142
10155
  Link: Link,
10143
- href: getLinkProductDetail(product)
10156
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10144
10157
  }, /*#__PURE__*/React__default.createElement("div", {
10145
10158
  className: "w-full bg-bgSecondary relative rounded-2xl " + className
10146
10159
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10147
- product: product,
10160
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10148
10161
  className: "w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-t-2xl"
10149
10162
  }), /*#__PURE__*/React__default.createElement("div", {
10150
- className: "p-4 flex flex-col gap-4 items-start"
10163
+ className: "p-3 sm:p-4 flex flex-col gap-4 items-start"
10151
10164
  }, /*#__PURE__*/React__default.createElement("div", {
10152
10165
  className: "line-clamp-1 w-full overflow-hidden text-ellipsis"
10153
- }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10154
- product: product,
10155
- className: "text-lg text-start"
10156
- })), product !== null && product !== void 0 && product.priceBeforeDiscount && (product === null || product === void 0 ? void 0 : product.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : product.price) ? /*#__PURE__*/React__default.createElement("div", {
10166
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10167
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10168
+ className: "text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "") + " " + classNamePrice
10169
+ })), product !== null && product !== void 0 && product.isShowProductPriceOnLanding && product !== null && product !== void 0 && (_product$productInfo2 = product.productInfo) !== null && _product$productInfo2 !== void 0 && _product$productInfo2.priceBeforeDiscount && (product === null || product === void 0 ? void 0 : (_product$productInfo3 = product.productInfo) === null || _product$productInfo3 === void 0 ? void 0 : _product$productInfo3.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.price) ? /*#__PURE__*/React__default.createElement("div", {
10157
10170
  className: "absolute top-5 left-0 font-semibold px-3 py-1 bg-danger text-textButton rounded-r-2xl shadow-lg v-max"
10158
- }, 1 - 100 * (product === null || product === void 0 ? void 0 : product.price) / (product === null || product === void 0 ? void 0 : product.priceBeforeDiscount)) : null));
10171
+ }, 1 - 100 * (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.price) / (product === null || product === void 0 ? void 0 : (_product$productInfo6 = product.productInfo) === null || _product$productInfo6 === void 0 ? void 0 : _product$productInfo6.priceBeforeDiscount)) : null));
10159
10172
  };
10160
10173
 
10161
10174
  var ProductItem8 = function ProductItem8(props) {
10175
+ var _product$productInfo;
10162
10176
  var product = props.product,
10163
10177
  _props$Link = props.Link,
10164
10178
  Link = _props$Link === void 0 ? null : _props$Link,
@@ -10168,20 +10182,21 @@ var ProductItem8 = function ProductItem8(props) {
10168
10182
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
10169
10183
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
10170
10184
  Link: Link,
10171
- href: getLinkProductDetail(product)
10185
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10172
10186
  }, /*#__PURE__*/React__default.createElement("div", {
10173
10187
  className: "text-center rounded relative group " + className
10174
10188
  }, /*#__PURE__*/React__default.createElement("div", {
10175
10189
  className: "relative "
10176
10190
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10177
- product: product,
10191
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10178
10192
  className: "min-h-[360px] md:min-h-[400px] xl:min-h-[440px] !object-cover !rounded"
10179
10193
  }), /*#__PURE__*/React__default.createElement("div", {
10180
10194
  className: "absolute bottom-0 rounded-b pb-6 px-4 bg-gradient-to-t from-black/50 to-transparent flex flex-col items-center h-1/2 gap-2 w-full justify-end "
10181
10195
  }, /*#__PURE__*/React__default.createElement("div", {
10182
10196
  className: "text-lg text-textButton"
10183
- }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10184
- product: product,
10197
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10198
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10199
+ className: !(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "",
10185
10200
  priceClassName: "text-textButton !font-normal",
10186
10201
  priceBeforeDiscountClassName: "text-textButton !font-normal"
10187
10202
  }), /*#__PURE__*/React__default.createElement(Button, {
@@ -10192,6 +10207,7 @@ var ProductItem8 = function ProductItem8(props) {
10192
10207
  };
10193
10208
 
10194
10209
  var TreatmentItem1 = function TreatmentItem1(props) {
10210
+ var _product$productInfo;
10195
10211
  var product = props.product,
10196
10212
  _props$Link = props.Link,
10197
10213
  Link = _props$Link === void 0 ? null : _props$Link,
@@ -10199,17 +10215,17 @@ var TreatmentItem1 = function TreatmentItem1(props) {
10199
10215
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
10200
10216
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
10201
10217
  Link: Link,
10202
- href: getLinkServiceDetail(product)
10218
+ href: getLinkServiceDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10203
10219
  }, /*#__PURE__*/React__default.createElement("div", {
10204
10220
  className: "w-full flex flex-col gap-4 rounded-2xl p-1"
10205
10221
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10206
- product: product,
10222
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10207
10223
  className: "w-full w-full h-[189px] md:h-[238px] xl:h-[304px] rounded-2xl"
10208
10224
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10209
10225
  className: "line-clamp-1 mb-2 font-medium text-lg"
10210
- }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10211
- product: product,
10212
- className: "text-lg text-start"
10226
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10227
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10228
+ className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10213
10229
  })), /*#__PURE__*/React__default.createElement("div", {
10214
10230
  className: "flex flex-col md:flex-row gap-2 md:items-center md:gap-6 "
10215
10231
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10257,7 +10273,7 @@ var ProductList7 = function ProductList7(props) {
10257
10273
  Link: Link,
10258
10274
  shopConfigStyle: shopConfigStyle,
10259
10275
  key: index,
10260
- product: product === null || product === void 0 ? void 0 : product.productInfo
10276
+ product: product
10261
10277
  });
10262
10278
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), (products === null || products === void 0 ? void 0 : products.length) > 4 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
10263
10279
  href: "/san-pham",
@@ -10384,9 +10400,10 @@ var Products2 = function Products2(props) {
10384
10400
  className: "px-2 lg:px-3",
10385
10401
  key: "dfg-" + index
10386
10402
  }, /*#__PURE__*/React__default.createElement(ProductItem, {
10387
- product: product === null || product === void 0 ? void 0 : product.productInfo,
10403
+ product: product,
10388
10404
  Link: Link,
10389
- shopConfigStyle: shopConfigStyle
10405
+ shopConfigStyle: shopConfigStyle,
10406
+ classNamePrice: "text-base md:text-lg"
10390
10407
  }));
10391
10408
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null)), /*#__PURE__*/React__default.createElement("div", {
10392
10409
  className: "absolute left-0 top-1/2 w-full flex justify-between px-2 md:px-4 lg:px-6"
@@ -10496,9 +10513,7 @@ var Products3 = function Products3(props) {
10496
10513
  loading = _ProductController.loading,
10497
10514
  page = _ProductController.page;
10498
10515
  var _CategoryController = CategoryController(_extends({}, props, {
10499
- params: {
10500
- type: "0"
10501
- }
10516
+ types: "0"
10502
10517
  })),
10503
10518
  categories = _CategoryController.categories;
10504
10519
  React.useEffect(function () {
@@ -10564,7 +10579,7 @@ var Products3 = function Products3(props) {
10564
10579
  Link: Link,
10565
10580
  key: index,
10566
10581
  shopConfigStyle: shopConfigStyle,
10567
- product: product === null || product === void 0 ? void 0 : product.productInfo
10582
+ product: product
10568
10583
  });
10569
10584
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), (page === null || page === void 0 ? void 0 : page.total_pages) > 1 ? /*#__PURE__*/React__default.createElement(Pagination, _extends({
10570
10585
  className: "mt-12"
@@ -10587,7 +10602,9 @@ var Products9 = function Products9(props) {
10587
10602
  }),
10588
10603
  params = _useState[0],
10589
10604
  setParams = _useState[1];
10590
- var _CategoryController = CategoryController(_extends({}, props)),
10605
+ var _CategoryController = CategoryController(_extends({}, props, {
10606
+ types: "0"
10607
+ })),
10591
10608
  _CategoryController$c = _CategoryController.categories,
10592
10609
  categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
10593
10610
  var _ProductController = ProductController(_extends({}, props, {
@@ -10611,9 +10628,8 @@ var Products9 = function Products9(props) {
10611
10628
  acc[categoryName].push(product);
10612
10629
  return acc;
10613
10630
  }, {});
10614
- console.log(groupedProducts);
10615
10631
  return /*#__PURE__*/React__default.createElement("div", {
10616
- className: SECTION_CLASS + " flex flex-col gap-4 mt-0 md:gap-6 "
10632
+ className: SECTION_CLASS + " flex flex-col gap-4 md:!my-6 md:gap-6 "
10617
10633
  }, /*#__PURE__*/React__default.createElement(CarouselItem, {
10618
10634
  data: categories,
10619
10635
  onClick: handleChooseCategory
@@ -10640,7 +10656,7 @@ var Products9 = function Products9(props) {
10640
10656
  return /*#__PURE__*/React__default.createElement(ProductItem, {
10641
10657
  Link: Link,
10642
10658
  shopConfigStyle: shopConfigStyle,
10643
- product: product === null || product === void 0 ? void 0 : product.productInfo,
10659
+ product: product,
10644
10660
  key: product === null || product === void 0 ? void 0 : product.landingShopProductId
10645
10661
  });
10646
10662
  }) : null));
@@ -10661,7 +10677,9 @@ var Products10 = function Products10(props) {
10661
10677
  ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem,
10662
10678
  _props$Link = props.Link,
10663
10679
  Link = _props$Link === void 0 ? null : _props$Link;
10664
- var _CategoryController = CategoryController(props),
10680
+ var _CategoryController = CategoryController(_extends({}, props, {
10681
+ types: "0"
10682
+ })),
10665
10683
  _CategoryController$c = _CategoryController.categories,
10666
10684
  categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
10667
10685
  var _ProductController = ProductController(_extends({}, props, {
@@ -10692,7 +10710,7 @@ var Products10 = function Products10(props) {
10692
10710
  Link: Link,
10693
10711
  className: "border-0 bg-bgSecondary",
10694
10712
  shopConfigStyle: shopConfigStyle,
10695
- product: product === null || product === void 0 ? void 0 : product.productInfo,
10713
+ product: product,
10696
10714
  key: "zjk-" + idx
10697
10715
  });
10698
10716
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
@@ -10741,7 +10759,7 @@ var Products11 = function Products11(props) {
10741
10759
  filterItem = _useState5[0],
10742
10760
  setFilterItem = _useState5[1];
10743
10761
  var _CategoryController = CategoryController(_extends({}, props, {
10744
- params: params
10762
+ types: "0"
10745
10763
  })),
10746
10764
  _CategoryController$c = _CategoryController.categories,
10747
10765
  categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
@@ -10813,10 +10831,10 @@ var Products11 = function Products11(props) {
10813
10831
  }
10814
10832
  };
10815
10833
  return /*#__PURE__*/React__default.createElement("div", {
10816
- className: SECTION_CLASS + " grid grid-cols-1 !mt-0 md:grid-cols-4 gap-6"
10834
+ className: SECTION_CLASS + " grid grid-cols-1 !my-6 !md:my-6 md:grid-cols-4 gap-6"
10817
10835
  }, /*#__PURE__*/React__default.createElement("div", {
10818
10836
  className: "md:sticky top-0 self-start"
10819
- }, /*#__PURE__*/React__default.createElement("div", {
10837
+ }, (categories === null || categories === void 0 ? void 0 : categories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
10820
10838
  className: " flex flex-col gap-2 rounded-3xl bg-bgSecondary p-4 max-h-96 overflow-y-auto"
10821
10839
  }, categories === null || categories === void 0 ? void 0 : categories.map(function (item, index) {
10822
10840
  return /*#__PURE__*/React__default.createElement("div", {
@@ -10826,10 +10844,10 @@ var Products11 = function Products11(props) {
10826
10844
  handleChooseCategory(item);
10827
10845
  }
10828
10846
  }, item === null || item === void 0 ? void 0 : item.cateName);
10829
- }))), /*#__PURE__*/React__default.createElement("div", {
10847
+ })) : null), /*#__PURE__*/React__default.createElement("div", {
10830
10848
  className: "md:col-span-3 flex flex-col gap-6"
10831
10849
  }, /*#__PURE__*/React__default.createElement("div", {
10832
- className: "flex gap-4"
10850
+ className: "flex gap-4 flex-wrap"
10833
10851
  }, listFilter === null || listFilter === void 0 ? void 0 : listFilter.map(function (item, index) {
10834
10852
  return /*#__PURE__*/React__default.createElement("div", {
10835
10853
  key: "kgkf-" + index,
@@ -10850,11 +10868,11 @@ var Products11 = function Products11(props) {
10850
10868
  }, /*#__PURE__*/React__default.createElement(ProductItem, {
10851
10869
  Link: Link,
10852
10870
  shopConfigStyle: shopConfigStyle,
10853
- product: product === null || product === void 0 ? void 0 : product.productInfo,
10871
+ product: product,
10854
10872
  key: product === null || product === void 0 ? void 0 : product.landingShopProductId
10855
10873
  }));
10856
10874
  }) : /*#__PURE__*/React__default.createElement("div", {
10857
- className: "md:col-span-2 lg:col-span-3 mt-20 m-auto"
10875
+ className: "col-span-2 lg:col-span-3 mt-20 m-auto"
10858
10876
  }, /*#__PURE__*/React__default.createElement(NotFoundProduct, null)))), /*#__PURE__*/React__default.createElement("div", {
10859
10877
  className: "w-full m-auto"
10860
10878
  }, (page === null || page === void 0 ? void 0 : page.total_pages) > 1 ? /*#__PURE__*/React__default.createElement(Pagination, {
@@ -10867,22 +10885,23 @@ var Products11 = function Products11(props) {
10867
10885
  };
10868
10886
 
10869
10887
  var ProductItem9 = function ProductItem9(props) {
10888
+ var _product$productInfo;
10870
10889
  var product = props.product;
10871
10890
  return /*#__PURE__*/React__default.createElement("div", {
10872
10891
  className: "flex border-b border-stroke items-center py-4"
10873
10892
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10874
- product: product,
10893
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10875
10894
  className: "!w-24 rounded-lg"
10876
10895
  }), /*#__PURE__*/React__default.createElement("div", {
10877
10896
  className: "ml-4 flex-1"
10878
10897
  }, /*#__PURE__*/React__default.createElement("div", {
10879
10898
  className: "text-xl"
10880
- }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement("div", {
10899
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), product !== null && product !== void 0 && product.isShowProductPriceOnLanding ? /*#__PURE__*/React__default.createElement("div", {
10881
10900
  className: "mt-2"
10882
10901
  }, /*#__PURE__*/React__default.createElement(ProductPrice, {
10883
- product: product,
10902
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10884
10903
  priceClassName: "!font-normal text-lg"
10885
- }))));
10904
+ })) : null));
10886
10905
  };
10887
10906
 
10888
10907
  var Products12 = function Products12(props) {
@@ -10935,7 +10954,7 @@ var Products12 = function Products12(props) {
10935
10954
  Link: Link,
10936
10955
  href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10937
10956
  }, /*#__PURE__*/React__default.createElement(ProductItem9, {
10938
- product: product === null || product === void 0 ? void 0 : product.productInfo
10957
+ product: product
10939
10958
  }));
10940
10959
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null)));
10941
10960
  };
@@ -10955,7 +10974,9 @@ var ProductCategory2 = function ProductCategory2(props) {
10955
10974
  }),
10956
10975
  params = _useState[0],
10957
10976
  setParams = _useState[1];
10958
- var _CategoryController = CategoryController(_extends({}, props)),
10977
+ var _CategoryController = CategoryController(_extends({}, props, {
10978
+ types: "0"
10979
+ })),
10959
10980
  _CategoryController$c = _CategoryController.categories,
10960
10981
  categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
10961
10982
  var _ProductController = ProductController(_extends({}, props, {
@@ -10996,7 +11017,7 @@ var ProductCategory2 = function ProductCategory2(props) {
10996
11017
  return /*#__PURE__*/React__default.createElement(ProductItem, {
10997
11018
  Link: Link,
10998
11019
  shopConfigStyle: shopConfigStyle,
10999
- product: product === null || product === void 0 ? void 0 : product.productInfo,
11020
+ product: product,
11000
11021
  key: "zjk-" + idx
11001
11022
  });
11002
11023
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
@@ -11034,7 +11055,7 @@ var ProductSale2 = function ProductSale2(props) {
11034
11055
  }, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
11035
11056
  return /*#__PURE__*/React__default.createElement(ProductItem, {
11036
11057
  key: index,
11037
- product: product === null || product === void 0 ? void 0 : product.productInfo
11058
+ product: product
11038
11059
  });
11039
11060
  })), /*#__PURE__*/React__default.createElement(Button, {
11040
11061
  label: "Xem tất cả",
@@ -11099,7 +11120,9 @@ var ProductSearch1 = function ProductSearch1(props) {
11099
11120
  });
11100
11121
  }, [keywordValue]);
11101
11122
  React.useEffect(function () {
11102
- if ((products === null || products === void 0 ? void 0 : products.length) > 0) setProductsFilter(products);
11123
+ if ((products === null || products === void 0 ? void 0 : products.length) > 0) setProductsFilter(products);else {
11124
+ setProductsFilter([]);
11125
+ }
11103
11126
  }, [products]);
11104
11127
  var handleGetMoreProducts = function handleGetMoreProducts() {
11105
11128
  setIsGetMore(false);
@@ -11149,7 +11172,7 @@ var ProductSearch1 = function ProductSearch1(props) {
11149
11172
  }, productsFilter === null || productsFilter === void 0 ? void 0 : (_productsFilter$slice = productsFilter.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _productsFilter$slice === void 0 ? void 0 : _productsFilter$slice.map(function (product, idx) {
11150
11173
  return /*#__PURE__*/React__default.createElement(ProductItem, {
11151
11174
  Link: Link,
11152
- product: product === null || product === void 0 ? void 0 : product.productInfo,
11175
+ product: product,
11153
11176
  key: "htrhr-" + idx
11154
11177
  });
11155
11178
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
@@ -11205,7 +11228,7 @@ var ProductHot1 = function ProductHot1(props) {
11205
11228
  return /*#__PURE__*/React__default.createElement(ProductItem, {
11206
11229
  Link: Link,
11207
11230
  shopConfigStyle: shopConfigStyle,
11208
- product: product === null || product === void 0 ? void 0 : product.productInfo,
11231
+ product: product,
11209
11232
  key: "zjk-" + idx
11210
11233
  });
11211
11234
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
@@ -11254,7 +11277,7 @@ var ProductHot3 = function ProductHot3(props) {
11254
11277
  Link: Link,
11255
11278
  shopConfigStyle: shopConfigStyle,
11256
11279
  key: "htjtr-" + index,
11257
- product: product === null || product === void 0 ? void 0 : product.productInfo
11280
+ product: product
11258
11281
  });
11259
11282
  }))), /*#__PURE__*/React__default.createElement(Dash, {
11260
11283
  color: secondary
@@ -11296,7 +11319,7 @@ var ProductsTop1 = function ProductsTop1(props) {
11296
11319
  Link: Link,
11297
11320
  className: "border-0",
11298
11321
  shopConfigStyle: shopConfigStyle,
11299
- product: product === null || product === void 0 ? void 0 : product.productInfo,
11322
+ product: product,
11300
11323
  key: "htrhr-" + idx
11301
11324
  });
11302
11325
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
@@ -11346,7 +11369,7 @@ var ProductList5 = function ProductList5(props) {
11346
11369
  return /*#__PURE__*/React__default.createElement(ProductItem, {
11347
11370
  Link: Link,
11348
11371
  shopConfigStyle: shopConfigStyle,
11349
- product: product === null || product === void 0 ? void 0 : product.productInfo,
11372
+ product: product,
11350
11373
  key: "htrhr-" + idx
11351
11374
  });
11352
11375
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
@@ -11401,7 +11424,7 @@ var ProductHighlight1 = function ProductHighlight1(props) {
11401
11424
  }, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, idx) {
11402
11425
  return /*#__PURE__*/React__default.createElement(ProductItem, {
11403
11426
  Link: Link,
11404
- product: product === null || product === void 0 ? void 0 : product.productInfo,
11427
+ product: product,
11405
11428
  shopConfigStyle: shopConfigStyle,
11406
11429
  key: "zjk-" + idx
11407
11430
  });
@@ -12625,7 +12648,7 @@ var dataFake = [{
12625
12648
  title: "Đa dạng thanh toán",
12626
12649
  data: [{
12627
12650
  svgImage: "",
12628
- srcImage: /*#__PURE__*/React__default.createElement(fa6.FaArrowsRotate, null),
12651
+ srcImage: /*#__PURE__*/React__default.createElement(gr.GrPowerCycle, null),
12629
12652
  label: "Chuyển khoản",
12630
12653
  link: ""
12631
12654
  }, {
@@ -12662,7 +12685,7 @@ var dataFake = [{
12662
12685
  label: "Chính sách bảo hành",
12663
12686
  link: ""
12664
12687
  }, {
12665
- srcImage: /*#__PURE__*/React__default.createElement(fa6.FaArrowsRotate, null),
12688
+ srcImage: /*#__PURE__*/React__default.createElement(gr.GrPowerCycle, null),
12666
12689
  svgImage: "",
12667
12690
  label: "Chính sách đổi trả",
12668
12691
  link: ""
@@ -12899,7 +12922,6 @@ var Footer7 = function Footer7(props) {
12899
12922
  textButton = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
12900
12923
  _shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
12901
12924
  bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
12902
- console.log("Footer7 shopConfig", shopConfig);
12903
12925
  var _useState = React.useState([]),
12904
12926
  shopAddressList = _useState[0],
12905
12927
  setShopAddressList = _useState[1];
@@ -13038,10 +13060,11 @@ var RatingStar = function RatingStar(props) {
13038
13060
  _props$className = props.className,
13039
13061
  className = _props$className === void 0 ? "" : _props$className;
13040
13062
  var res = [];
13041
- for (var i = 1; i < star; i++) {
13063
+ for (var i = 1; i <= star; i++) {
13042
13064
  res.push(/*#__PURE__*/React__default.createElement(fa6.FaStar, {
13043
13065
  color: "#E2B93B"
13044
13066
  }));
13067
+ if (i > 5) break;
13045
13068
  }
13046
13069
  var decimalPart = star % 1;
13047
13070
  if (decimalPart && decimalPart >= 0.5) {
@@ -13592,7 +13615,7 @@ var About1 = function About1(props) {
13592
13615
  _props$SectionTitle = props.SectionTitle,
13593
13616
  SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
13594
13617
  return /*#__PURE__*/React__default.createElement("div", {
13595
- className: SECTION_CLASS + " flex flex-col gap-4"
13618
+ className: SECTION_CLASS + " flex flex-col gap-6"
13596
13619
  }, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement(SectionTitle, {
13597
13620
  data: data,
13598
13621
  shopConfigStyle: shopConfigStyle
@@ -13612,13 +13635,14 @@ var About5 = function About5(props) {
13612
13635
  SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
13613
13636
  data = props.data;
13614
13637
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
13615
- console.log("About5 sectionData", sectionData);
13616
13638
  return /*#__PURE__*/React__default.createElement("div", {
13617
13639
  className: SECTION_DEFAULT_CLASS + " "
13618
- }, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement(SectionTitle, {
13640
+ }, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement("div", {
13641
+ className: "mb-6"
13642
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
13619
13643
  data: data,
13620
13644
  shopConfigStyle: shopConfigStyle
13621
- }) : null, /*#__PURE__*/React__default.createElement("div", {
13645
+ })) : null, /*#__PURE__*/React__default.createElement("div", {
13622
13646
  className: "grid grid-cols-1 lg:grid-cols-2 gap-12 mt-4 md:mt-6"
13623
13647
  }, /*#__PURE__*/React__default.createElement("img", {
13624
13648
  src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage,
@@ -13636,25 +13660,28 @@ var About5 = function About5(props) {
13636
13660
 
13637
13661
  var About6 = function About6(props) {
13638
13662
  var _sectionData$, _sectionData$2;
13639
- var shopConfig = props.shopConfig,
13640
- data = props.data;
13663
+ var shopConfigStyle = props.shopConfigStyle,
13664
+ shopConfig = props.shopConfig,
13665
+ data = props.data,
13666
+ _props$SectionTitle = props.SectionTitle,
13667
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
13641
13668
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
13642
- console.log("About5 sectionData", sectionData);
13643
13669
  return /*#__PURE__*/React__default.createElement("div", {
13644
13670
  className: SECTION_DEFAULT_CLASS + " mt-0"
13645
- }, /*#__PURE__*/React__default.createElement("h2", {
13646
- className: "text-2xl md:text-4xl text-textHeading font-semibold mb-6 lg:mb-8"
13647
- }, data === null || data === void 0 ? void 0 : data.sectionTitle) , /*#__PURE__*/React__default.createElement("div", {
13648
- className: "grid grid-cols-1 lg:grid-cols-5 gap-6 lg:gap-10"
13671
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
13672
+ data: data,
13673
+ shopConfigStyle: shopConfigStyle
13674
+ }), /*#__PURE__*/React__default.createElement("div", {
13675
+ className: "grid grid-cols-1 lg:grid-cols-5 gap-6 lg:gap-10 " + (data !== null && data !== void 0 && data.sectionTitle ? "mt-6" : "mt-0")
13649
13676
  }, /*#__PURE__*/React__default.createElement("img", {
13650
13677
  src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage,
13651
13678
  className: "w-full h-auto object-cover lg:hidden block rounded-xl"
13652
- }), /*#__PURE__*/React__default.createElement("div", {
13679
+ }), shopConfig !== null && shopConfig !== void 0 && shopConfig.shopAbout ? /*#__PURE__*/React__default.createElement("div", {
13653
13680
  className: "ck-content text-wrap lg:col-span-3 bg-bgSecondary p-4 lg:p-6 rounded-2xl",
13654
13681
  dangerouslySetInnerHTML: {
13655
13682
  __html: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopAbout
13656
13683
  }
13657
- }), /*#__PURE__*/React__default.createElement("img", {
13684
+ }) : null, /*#__PURE__*/React__default.createElement("img", {
13658
13685
  src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$2 = sectionData[0]) === null || _sectionData$2 === void 0 ? void 0 : _sectionData$2.srcImage,
13659
13686
  className: "w-full h-auto object-cover lg:col-span-2 lg:block hidden rounded-xl"
13660
13687
  })));
@@ -14474,7 +14501,7 @@ var SearchProduct1 = function SearchProduct1(props) {
14474
14501
  } else {
14475
14502
  var delayDebounceFn = setTimeout(function () {
14476
14503
  handleSearch(valueSearch);
14477
- }, 500);
14504
+ }, 600);
14478
14505
  return function () {
14479
14506
  return clearTimeout(delayDebounceFn);
14480
14507
  };
@@ -14533,9 +14560,9 @@ var SearchProduct1 = function SearchProduct1(props) {
14533
14560
  className: "flex flex-col px-1 gap-2 border-b w-full"
14534
14561
  }, /*#__PURE__*/React__default.createElement("div", {
14535
14562
  className: "mt-1 text-lg font-medium\t"
14536
- }, item === null || item === void 0 ? void 0 : (_item$productInfo = item.productInfo) === null || _item$productInfo === void 0 ? void 0 : _item$productInfo.productName), /*#__PURE__*/React__default.createElement("div", {
14537
- className: " text-lg font-medium\t"
14538
- }, formatCurrency(item === null || item === void 0 ? void 0 : (_item$productInfo2 = item.productInfo) === null || _item$productInfo2 === void 0 ? void 0 : _item$productInfo2.price))));
14563
+ }, item === null || item === void 0 ? void 0 : (_item$productInfo = item.productInfo) === null || _item$productInfo === void 0 ? void 0 : _item$productInfo.productName), item !== null && item !== void 0 && item.isShowProductPriceOnLanding ? /*#__PURE__*/React__default.createElement("div", {
14564
+ className: " text-lg font-medium"
14565
+ }, formatCurrency(item === null || item === void 0 ? void 0 : (_item$productInfo2 = item.productInfo) === null || _item$productInfo2 === void 0 ? void 0 : _item$productInfo2.price)) : null));
14539
14566
  })) : /*#__PURE__*/React__default.createElement("div", {
14540
14567
  className: "text-center"
14541
14568
  }, data === null || data === void 0 ? void 0 : data.sectionDescription));
@@ -14564,7 +14591,7 @@ var SearchBar2 = function SearchBar2(props) {
14564
14591
  } else {
14565
14592
  var delayDebounceFn = setTimeout(function () {
14566
14593
  handleSearch(valueSearch);
14567
- }, 500);
14594
+ }, 600);
14568
14595
  return function () {
14569
14596
  return clearTimeout(delayDebounceFn);
14570
14597
  };
@@ -14626,9 +14653,9 @@ var SearchBar2 = function SearchBar2(props) {
14626
14653
  className: "flex flex-col px-1 gap-2 border-b w-full"
14627
14654
  }, /*#__PURE__*/React__default.createElement("div", {
14628
14655
  className: "mt-1 text-lg font-medium\t"
14629
- }, item === null || item === void 0 ? void 0 : (_item$productInfo = item.productInfo) === null || _item$productInfo === void 0 ? void 0 : _item$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
14656
+ }, item === null || item === void 0 ? void 0 : (_item$productInfo = item.productInfo) === null || _item$productInfo === void 0 ? void 0 : _item$productInfo.productName), item !== null && item !== void 0 && item.isShowProductPriceOnLanding ? /*#__PURE__*/React__default.createElement(ProductPrice, {
14630
14657
  product: item === null || item === void 0 ? void 0 : item.productInfo
14631
- })));
14658
+ }) : null));
14632
14659
  })) : null)));
14633
14660
  };
14634
14661
 
@@ -14659,7 +14686,7 @@ var SearchBar5 = function SearchBar5(props) {
14659
14686
  }, /*#__PURE__*/React__default.createElement("div", {
14660
14687
  className: "absolute inset-0 bg-black/45 rounded-xl md:rounded-3xl"
14661
14688
  }), /*#__PURE__*/React__default.createElement("div", {
14662
- className: "flex flex-col relative gap-2 md:gap-4 items-center justify-center"
14689
+ className: "flex flex-col relative gap-2 md:gap-4 items-center justify-center w-full sm:min-w-2/3 lg:min-w-1/2"
14663
14690
  }, data !== null && data !== void 0 && (_data$data2 = data.data) !== null && _data$data2 !== void 0 && _data$data2.title ? /*#__PURE__*/React__default.createElement("div", {
14664
14691
  className: "text-lg font-semibold md:text-3xl lg:text-4xl text-textButton text-center"
14665
14692
  }, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : _data$data3.title) : null, data !== null && data !== void 0 && (_data$data4 = data.data) !== null && _data$data4 !== void 0 && _data$data4.description ? /*#__PURE__*/React__default.createElement("div", {
@@ -14669,7 +14696,7 @@ var SearchBar5 = function SearchBar5(props) {
14669
14696
  icons: /*#__PURE__*/React__default.createElement(io5.IoSearchOutline, {
14670
14697
  className: "text-gray3 ps-1 text-xl md:text-2xl"
14671
14698
  }),
14672
- wrapClassName: "w-full md:w-[80%] ",
14699
+ wrapClassName: "w-[90%] sm:w-1/2 lg:w-[40%] ",
14673
14700
  className: "w-full bg-bgSecondary mb-2 md:h-12",
14674
14701
  onKeyDown: function onKeyDown(e) {
14675
14702
  handleSearch(e);
@@ -15044,7 +15071,7 @@ var DefaultImage$1 = function DefaultImage(props) {
15044
15071
  var _props$className = props.className,
15045
15072
  className = _props$className === void 0 ? "" : _props$className;
15046
15073
  return /*#__PURE__*/React__default.createElement("div", {
15047
- className: "flex justify-center items-center max-w-full h-full aspect-video rounded-lg " + className,
15074
+ className: "flex justify-center items-center w-full h-full aspect-video object-cover rounded-lg " + className,
15048
15075
  style: {
15049
15076
  backgroundColor: "#FAFAFA"
15050
15077
  }
@@ -15072,7 +15099,7 @@ var NewsImage = function NewsImage(props) {
15072
15099
  };
15073
15100
  return src ? /*#__PURE__*/React__default.createElement("img", {
15074
15101
  src: src,
15075
- className: "h-full rounded-lg max-w-full aspect-video " + className,
15102
+ className: "h-full rounded-lg w-full aspect-video object-cover " + className,
15076
15103
  style: size ? {
15077
15104
  width: size,
15078
15105
  height: size
@@ -15083,8 +15110,56 @@ var NewsImage = function NewsImage(props) {
15083
15110
  });
15084
15111
  };
15085
15112
 
15113
+ var NewsItem2 = function NewsItem2(_ref) {
15114
+ var newsArticle = _ref.newsArticle;
15115
+ return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(NewsImage, {
15116
+ news: newsArticle
15117
+ }), /*#__PURE__*/React__default.createElement("div", {
15118
+ className: "pt-3 font-medium text-lg line-clamp-3",
15119
+ style: {
15120
+ lineHeight: 1.6
15121
+ }
15122
+ }, newsArticle === null || newsArticle === void 0 ? void 0 : newsArticle.title));
15123
+ };
15124
+
15125
+ var relativeTime = createCommonjsModule(function (module, exports) {
15126
+ !function(r,e){module.exports=e();}(commonjsGlobal,(function(){return function(r,e,t){r=r||{};var n=e.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(""+p)),a="string"==typeof v?v.replace("%d",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return "function"==typeof M?M(a):M.replace("%s",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)};}}));
15127
+ });
15128
+
15129
+ var vi = createCommonjsModule(function (module, exports) {
15130
+ !function(t,n){module.exports=n(dayjs_min);}(commonjsGlobal,(function(t){function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var h=n(t),_={name:"vi",weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),weekStart:1,weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),ordinal:function(t){return t},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"}};return h.default.locale(_,null,!0),_}));
15131
+ });
15132
+
15133
+ dayjs_min.extend(relativeTime);
15134
+ dayjs_min.locale("vi");
15135
+ var NewsItem1 = function NewsItem1(_ref) {
15136
+ var _dayjs;
15137
+ var newsArticle = _ref.newsArticle,
15138
+ _ref$isHidden = _ref.isHidden,
15139
+ isHidden = _ref$isHidden === void 0 ? false : _ref$isHidden;
15140
+ return /*#__PURE__*/React__default.createElement("div", {
15141
+ className: "grid grid-cols-1 md:grid-cols-2 gap-4 "
15142
+ }, /*#__PURE__*/React__default.createElement(NewsImage, {
15143
+ news: newsArticle
15144
+ }), /*#__PURE__*/React__default.createElement("div", {
15145
+ className: "flex flex-col gap-4 md:gap-3 pb-4"
15146
+ }, /*#__PURE__*/React__default.createElement("div", {
15147
+ className: "font-medium text-lg line-clamp-3 md:line-clamp-2 lg:line-clamp-3",
15148
+ style: {
15149
+ lineHeight: 1.6
15150
+ }
15151
+ }, newsArticle === null || newsArticle === void 0 ? void 0 : newsArticle.title), !isHidden ? /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
15152
+ className: "line-clamp-4 md:line-clamp-3 lg:line-clamp-4 font-normal min-h-6 md:min-h-20 text-gray3",
15153
+ style: {
15154
+ lineHeight: 1.6
15155
+ }
15156
+ }, newsArticle === null || newsArticle === void 0 ? void 0 : newsArticle.shortDescription), /*#__PURE__*/React__default.createElement("div", {
15157
+ className: "text-gray3 mt-4"
15158
+ }, (_dayjs = dayjs_min(newsArticle === null || newsArticle === void 0 ? void 0 : newsArticle.timeUpdate)) === null || _dayjs === void 0 ? void 0 : _dayjs.fromNow())) : null));
15159
+ };
15160
+
15086
15161
  var NewsHighlight1 = function NewsHighlight1(props) {
15087
- var _newsArticles$, _newsArticles$2, _newsArticles$3, _newsArticles$slice;
15162
+ var _newsArticles$slice;
15088
15163
  var _props$SectionTitle = props.SectionTitle,
15089
15164
  SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
15090
15165
  _props$shopConfigStyl = props.shopConfigStyle,
@@ -15109,34 +15184,34 @@ var NewsHighlight1 = function NewsHighlight1(props) {
15109
15184
  }, /*#__PURE__*/React__default.createElement(SectionTitle, {
15110
15185
  data: data,
15111
15186
  shopConfigStyle: shopConfigStyle
15112
- }), /*#__PURE__*/React__default.createElement("div", {
15187
+ }), (newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
15113
15188
  className: "mt-12 mb-6 grid grid-cols-1 md:grid-cols-2 gap-6 "
15114
15189
  }, /*#__PURE__*/React__default.createElement(LinkToPage, {
15115
15190
  href: getLinkNewsDetail(newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[0]),
15116
15191
  Link: Link
15117
- }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(NewsImage, {
15118
- news: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[0]
15119
- }), /*#__PURE__*/React__default.createElement("div", {
15120
- className: "pt-3 font-medium text-lg"
15121
- }, newsArticles === null || newsArticles === void 0 ? void 0 : (_newsArticles$ = newsArticles[0]) === null || _newsArticles$ === void 0 ? void 0 : _newsArticles$.title))), /*#__PURE__*/React__default.createElement("div", {
15192
+ }, /*#__PURE__*/React__default.createElement(NewsItem2, {
15193
+ newsArticle: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[0]
15194
+ })), /*#__PURE__*/React__default.createElement("div", {
15122
15195
  className: "flex flex-col gap-6"
15123
- }, /*#__PURE__*/React__default.createElement(LinkToPage, {
15124
- className: "grid grid-cols-1 md:grid-cols-2 gap-4 ",
15196
+ }, newsArticles !== null && newsArticles !== void 0 && newsArticles[1] ? /*#__PURE__*/React__default.createElement(LinkToPage, {
15125
15197
  href: getLinkNewsDetail(newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[1]),
15126
15198
  Link: Link
15127
- }, /*#__PURE__*/React__default.createElement(NewsImage, {
15128
- news: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[1]
15129
- }), /*#__PURE__*/React__default.createElement("div", {
15130
- className: "font-medium text-lg"
15131
- }, newsArticles === null || newsArticles === void 0 ? void 0 : (_newsArticles$2 = newsArticles[1]) === null || _newsArticles$2 === void 0 ? void 0 : _newsArticles$2.title)), /*#__PURE__*/React__default.createElement(LinkToPage, {
15132
- className: "grid grid-cols-1 md:grid-cols-2 gap-4",
15199
+ }, newsArticles !== null && newsArticles !== void 0 && newsArticles[2] ? /*#__PURE__*/React__default.createElement(NewsItem1, {
15200
+ newsArticle: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[1],
15201
+ isHidden: true
15202
+ }) : /*#__PURE__*/React__default.createElement(NewsItem2, {
15203
+ newsArticle: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[1]
15204
+ })) : null, newsArticles !== null && newsArticles !== void 0 && newsArticles[2] ? /*#__PURE__*/React__default.createElement(LinkToPage, {
15133
15205
  href: getLinkNewsDetail(newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[2]),
15134
15206
  Link: Link
15135
- }, /*#__PURE__*/React__default.createElement(NewsImage, {
15136
- news: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[2]
15137
- }), /*#__PURE__*/React__default.createElement("div", {
15138
- className: "font-medium text-lg"
15139
- }, newsArticles === null || newsArticles === void 0 ? void 0 : (_newsArticles$3 = newsArticles[2]) === null || _newsArticles$3 === void 0 ? void 0 : _newsArticles$3.title)))), /*#__PURE__*/React__default.createElement("div", {
15207
+ }, /*#__PURE__*/React__default.createElement(NewsItem1, {
15208
+ newsArticle: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[2],
15209
+ isHidden: true
15210
+ })) : null)) : /*#__PURE__*/React__default.createElement("div", {
15211
+ className: "w-full h-64 flex flex-col justify-center items-center text-gray3"
15212
+ }, /*#__PURE__*/React__default.createElement(gi.GiNewspaper, {
15213
+ size: 80
15214
+ }), " Kh\xF4ng c\xF3 tin t\u1EE9c n\xE0o"), /*#__PURE__*/React__default.createElement("div", {
15140
15215
  className: "grid grid-cols-1 md:grid-cols-3 gap-6 mt-6 "
15141
15216
  }, newsArticles === null || newsArticles === void 0 ? void 0 : (_newsArticles$slice = newsArticles.slice(3, 6)) === null || _newsArticles$slice === void 0 ? void 0 : _newsArticles$slice.map(function (item, index) {
15142
15217
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
@@ -15145,22 +15220,12 @@ var NewsHighlight1 = function NewsHighlight1(props) {
15145
15220
  key: "kdjf-" + index
15146
15221
  }, /*#__PURE__*/React__default.createElement("div", {
15147
15222
  className: "jgdfg-" + index
15148
- }, /*#__PURE__*/React__default.createElement(NewsImage, {
15149
- news: item
15150
- }), /*#__PURE__*/React__default.createElement("div", {
15151
- className: "font-medium text-lg py-2"
15152
- }, item === null || item === void 0 ? void 0 : item.title)));
15223
+ }, /*#__PURE__*/React__default.createElement(NewsItem2, {
15224
+ newsArticle: item
15225
+ })));
15153
15226
  })));
15154
15227
  };
15155
15228
 
15156
- var relativeTime = createCommonjsModule(function (module, exports) {
15157
- !function(r,e){module.exports=e();}(commonjsGlobal,(function(){return function(r,e,t){r=r||{};var n=e.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(""+p)),a="string"==typeof v?v.replace("%d",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return "function"==typeof M?M(a):M.replace("%s",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)};}}));
15158
- });
15159
-
15160
- var vi = createCommonjsModule(function (module, exports) {
15161
- !function(t,n){module.exports=n(dayjs_min);}(commonjsGlobal,(function(t){function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var h=n(t),_={name:"vi",weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),weekStart:1,weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),ordinal:function(t){return t},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"}};return h.default.locale(_,null,!0),_}));
15162
- });
15163
-
15164
15229
  var getAllNewsCategoriesApi = function getAllNewsCategoriesApi(shopId, landingShopConfigId, appId) {
15165
15230
  if (appId === void 0) {
15166
15231
  appId = "SSPA";
@@ -15271,10 +15336,10 @@ var News1 = function News1(props) {
15271
15336
  });
15272
15337
  }
15273
15338
  }, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
15274
- className: "rounded-b-lg bg-bgSecondary"
15339
+ className: "rounded-b-lg bg-bgSecondary overflow-y-auto scroll-container max-h-[700px]"
15275
15340
  }, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {
15276
15341
  return /*#__PURE__*/React__default.createElement("div", {
15277
- className: "px-6 py-3 hover:bg-gray-100 hover:text-primary cursor-pointer",
15342
+ className: "px-6 hover:bg-gray-100 hover:text-primary cursor-pointer " + ((item === null || item === void 0 ? void 0 : item.catId) === (categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catId) ? "bg-gray-100 text-primary" : "") + " ",
15278
15343
  key: "sdjfdh-" + index,
15279
15344
  onClick: function onClick() {
15280
15345
  setCategorySelected(item);
@@ -15284,39 +15349,33 @@ var News1 = function News1(props) {
15284
15349
  });
15285
15350
  });
15286
15351
  }
15287
- }, item === null || item === void 0 ? void 0 : item.catName);
15352
+ }, /*#__PURE__*/React__default.createElement("div", {
15353
+ className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
15354
+ }, /*#__PURE__*/React__default.createElement("div", {
15355
+ className: "line-clamp-3"
15356
+ }, item === null || item === void 0 ? void 0 : item.catName)));
15288
15357
  }))), /*#__PURE__*/React__default.createElement("div", {
15289
15358
  className: "md:col-span-2 flex flex-col gap-8"
15290
15359
  }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
15291
- className: "px-6 py-3 text-textButton text-lg rounded-t-lg bg-primary w-max"
15292
- }, params !== null && params !== void 0 && params.catId ? categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catName : "Tin mới"), /*#__PURE__*/React__default.createElement("div", {
15360
+ className: "px-6 py-3 text-textButton text-lg rounded-t-lg bg-primary w-max max-w-full"
15361
+ }, /*#__PURE__*/React__default.createElement("div", {
15362
+ className: "line-clamp-1"
15363
+ }, params !== null && params !== void 0 && params.catId ? categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catName : "Tin mới")), /*#__PURE__*/React__default.createElement("div", {
15293
15364
  className: "w-full border border-primary"
15294
15365
  })), loading & isSeeMore ? /*#__PURE__*/React__default.createElement("div", {
15295
15366
  className: "w-full h-80 flex justify-center items-center"
15296
15367
  }, /*#__PURE__*/React__default.createElement(Loading, null)) : /*#__PURE__*/React__default.createElement("div", {
15297
15368
  className: "flex flex-col gap-8"
15298
15369
  }, (newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles.length) > 0 ? newsArticles === null || newsArticles === void 0 ? void 0 : (_newsArticles$slice = newsArticles.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _newsArticles$slice === void 0 ? void 0 : _newsArticles$slice.map(function (item, index) {
15299
- var _dayjs;
15300
15370
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
15301
15371
  href: getLinkNewsDetail(item),
15302
15372
  Link: Link,
15303
15373
  key: "kghf-" + index
15304
- }, /*#__PURE__*/React__default.createElement("div", {
15305
- className: "grid grid-cols-2 gap-2 md:gap-4 cursor-pointer",
15306
- key: "djfsdf-" + index
15307
- }, /*#__PURE__*/React__default.createElement(NewsImage, {
15308
- news: item
15309
- }), /*#__PURE__*/React__default.createElement("div", {
15310
- className: "flex flex-col gap-2 md:gap-3 pb-4"
15311
- }, /*#__PURE__*/React__default.createElement("div", {
15312
- className: "font-medium text-lg md:text-xl line-clamp-2"
15313
- }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
15314
- className: "line-clamp-3 font-normal min-h-6 md:min-h-20 text-gray3"
15315
- }, item === null || item === void 0 ? void 0 : item.shortDescription), /*#__PURE__*/React__default.createElement("div", {
15316
- className: " text-gray3"
15317
- }, (_dayjs = dayjs_min(item === null || item === void 0 ? void 0 : item.timeUpdate)) === null || _dayjs === void 0 ? void 0 : _dayjs.fromNow()))));
15374
+ }, /*#__PURE__*/React__default.createElement(NewsItem1, {
15375
+ newsArticle: item
15376
+ }));
15318
15377
  }) : /*#__PURE__*/React__default.createElement("div", {
15319
- className: "w-full h-64 flex flex-col justify-center items-center text-gray3"
15378
+ className: "w-full h-64 flex flex-col justify-center items-center text-gray3 "
15320
15379
  }, /*#__PURE__*/React__default.createElement(gi.GiNewspaper, {
15321
15380
  size: 80
15322
15381
  }), " Kh\xF4ng c\xF3 tin t\u1EE9c n\xE0o"), (newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
@@ -15336,10 +15395,10 @@ var News1 = function News1(props) {
15336
15395
  });
15337
15396
  }
15338
15397
  }, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
15339
- className: "rounded-b-lg bg-bgSecondary"
15398
+ className: "rounded-b-lg bg-bgSecondary overflow-y-auto scroll-container max-h-[700px]"
15340
15399
  }, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {
15341
15400
  return /*#__PURE__*/React__default.createElement("div", {
15342
- className: "px-6 py-3 hover:bg-gray-100 hover:text-primary cursor-pointer",
15401
+ className: "px-4 hover:bg-gray-100 hover:text-primary cursor-pointer " + ((item === null || item === void 0 ? void 0 : item.catId) === (categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catId) ? "bg-gray-100 text-primary" : "") + " ",
15343
15402
  key: "sdjfdh-" + index,
15344
15403
  onClick: function onClick() {
15345
15404
  setCategorySelected(item);
@@ -15349,7 +15408,11 @@ var News1 = function News1(props) {
15349
15408
  });
15350
15409
  });
15351
15410
  }
15352
- }, item === null || item === void 0 ? void 0 : item.catName);
15411
+ }, /*#__PURE__*/React__default.createElement("div", {
15412
+ className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
15413
+ }, /*#__PURE__*/React__default.createElement("div", {
15414
+ className: "line-clamp-3"
15415
+ }, item === null || item === void 0 ? void 0 : item.catName)));
15353
15416
  }))));
15354
15417
  };
15355
15418
 
@@ -15398,7 +15461,7 @@ var NewsDetail1 = function NewsDetail1(props) {
15398
15461
  Link = _props$Link === void 0 ? null : _props$Link;
15399
15462
  var _useState = React.useState({
15400
15463
  catId: catId,
15401
- szie: 10
15464
+ size: 10
15402
15465
  }),
15403
15466
  params = _useState[0],
15404
15467
  setParams = _useState[1];
@@ -15436,10 +15499,10 @@ var NewsDetail1 = function NewsDetail1(props) {
15436
15499
  dangerouslySetInnerHTML: {
15437
15500
  __html: article === null || article === void 0 ? void 0 : article.content
15438
15501
  }
15439
- }), /*#__PURE__*/React__default.createElement("div", {
15502
+ }), (newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
15440
15503
  className: "top-6 block md:hidden"
15441
15504
  }, /*#__PURE__*/React__default.createElement("div", {
15442
- className: "px-6 py-3 bg-primary rounded-t-lg text-lg text-textButton text-center"
15505
+ className: "px-6 bg-primary rounded-t-lg text-lg text-textButton text-center"
15443
15506
  }, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
15444
15507
  className: "rounded-b-lg bg-bgSecondary"
15445
15508
  }, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {
@@ -15447,10 +15510,14 @@ var NewsDetail1 = function NewsDetail1(props) {
15447
15510
  href: getLinkNewsByCategory(item),
15448
15511
  Link: Link
15449
15512
  }, /*#__PURE__*/React__default.createElement("div", {
15450
- className: "px-6 py-3 hover:bg-gray-100 hover:text-primary cursor-pointer",
15513
+ className: "px-4 hover:bg-gray-100 hover:text-primary cursor-pointer",
15451
15514
  key: "sdjfdh-" + index
15452
- }, item === null || item === void 0 ? void 0 : item.catName));
15453
- }))), /*#__PURE__*/React__default.createElement("div", {
15515
+ }, /*#__PURE__*/React__default.createElement("div", {
15516
+ className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
15517
+ }, /*#__PURE__*/React__default.createElement("div", {
15518
+ className: "line-clamp-3"
15519
+ }, item === null || item === void 0 ? void 0 : item.catName))));
15520
+ }))) : null, (newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
15454
15521
  className: "mt-6"
15455
15522
  }, /*#__PURE__*/React__default.createElement("div", {
15456
15523
  className: "font-medium text-2xl mb-4"
@@ -15461,19 +15528,17 @@ var NewsDetail1 = function NewsDetail1(props) {
15461
15528
  href: getLinkNewsDetail(item),
15462
15529
  Link: Link,
15463
15530
  key: "kghf-" + index
15464
- }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(NewsImage, {
15465
- news: item
15466
- }), /*#__PURE__*/React__default.createElement("div", {
15467
- className: "font-medium text-lg line-clamp-2"
15468
- }, item === null || item === void 0 ? void 0 : item.title)));
15531
+ }, /*#__PURE__*/React__default.createElement(NewsItem2, {
15532
+ newsArticle: item
15533
+ }));
15469
15534
  })), (newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement("div", {
15470
15535
  className: "flex justify-center mt-4 w-full"
15471
15536
  }, /*#__PURE__*/React__default.createElement(Button, {
15472
15537
  label: "Xem thêm",
15473
15538
  onClick: handleSeeMore,
15474
15539
  shopConfigStyle: shopConfigStyle
15475
- })) : null)), /*#__PURE__*/React__default.createElement("div", {
15476
- className: "sticky top-20 self-start hidden md:block"
15540
+ })) : null) : null), (newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
15541
+ className: "sticky top-20 self-start hidden md:block overflow-y-auto scroll-container max-h-[700px]"
15477
15542
  }, /*#__PURE__*/React__default.createElement("div", {
15478
15543
  className: "px-6 py-3 bg-primary rounded-t-lg text-lg text-textButton text-center"
15479
15544
  }, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
@@ -15483,10 +15548,14 @@ var NewsDetail1 = function NewsDetail1(props) {
15483
15548
  href: getLinkNewsByCategory(item),
15484
15549
  Link: Link
15485
15550
  }, /*#__PURE__*/React__default.createElement("div", {
15486
- className: "px-6 py-3 hover:bg-gray-100 hover:text-primary cursor-pointer",
15551
+ className: "px-4 hover:bg-gray-100 hover:text-primary cursor-pointer",
15487
15552
  key: "sdjfdh-" + index
15488
- }, item === null || item === void 0 ? void 0 : item.catName));
15489
- }))));
15553
+ }, /*#__PURE__*/React__default.createElement("div", {
15554
+ className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
15555
+ }, /*#__PURE__*/React__default.createElement("div", {
15556
+ className: "line-clamp-3"
15557
+ }, item === null || item === void 0 ? void 0 : item.catName))));
15558
+ }))) : null);
15490
15559
  };
15491
15560
 
15492
15561
  exports.About1 = About1;