s-platform-landing-section 0.1.18 → 0.1.20

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-theme.css');
21
21
  var ai = require('react-icons/ai');
22
22
  var go = require('react-icons/go');
23
23
  var ri = require('react-icons/ri');
24
+ var gi = require('react-icons/gi');
24
25
 
25
26
  var Button = function Button(props) {
26
27
  var _props$label = props.label,
@@ -111,18 +112,19 @@ var getDurationValue = function getDurationValue(attributes) {
111
112
  return durationAtt ? ((durationAtt === null || durationAtt === void 0 ? void 0 : (_durationAtt$value = durationAtt.value) === null || _durationAtt$value === void 0 ? void 0 : _durationAtt$value[0]) || "0") + " p" : "";
112
113
  };
113
114
  var genProductSlug = function genProductSlug(productName, id) {
115
+ var _slug, _slug2, _slug3, _slug4, _slug5, _slug6, _slug7, _slug8, _slug9, _slug10, _slug11;
114
116
  var slug = productName === null || productName === void 0 ? void 0 : productName.toLowerCase();
115
- slug = slug.replace(/(à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ)/g, "a");
116
- slug = slug.replace(/(è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ)/g, "e");
117
- slug = slug.replace(/(ì|í|ị|ỉ|ĩ)/g, "i");
118
- slug = slug.replace(/(ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ)/g, "o");
119
- slug = slug.replace(/(ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ)/g, "u");
120
- slug = slug.replace(/(ỳ|ý|ỵ|ỷ|ỹ)/g, "y");
121
- slug = slug.replace(/(đ)/g, "d");
122
- slug = slug.replace(/([^0-9a-z-\s])/g, "");
123
- slug = slug.replace(/(\s+)/g, "-");
124
- slug = slug.replace(/^-+/g, "");
125
- slug = slug.replace(/-+$/g, "");
117
+ slug = (_slug = slug) === null || _slug === void 0 ? void 0 : _slug.replace(/(à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ)/g, "a");
118
+ slug = (_slug2 = slug) === null || _slug2 === void 0 ? void 0 : _slug2.replace(/(è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ)/g, "e");
119
+ slug = (_slug3 = slug) === null || _slug3 === void 0 ? void 0 : _slug3.replace(/(ì|í|ị|ỉ|ĩ)/g, "i");
120
+ slug = (_slug4 = slug) === null || _slug4 === void 0 ? void 0 : _slug4.replace(/(ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ)/g, "o");
121
+ slug = (_slug5 = slug) === null || _slug5 === void 0 ? void 0 : _slug5.replace(/(ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ)/g, "u");
122
+ slug = (_slug6 = slug) === null || _slug6 === void 0 ? void 0 : _slug6.replace(/(ỳ|ý|ỵ|ỷ|ỹ)/g, "y");
123
+ slug = (_slug7 = slug) === null || _slug7 === void 0 ? void 0 : _slug7.replace(/(đ)/g, "d");
124
+ slug = (_slug8 = slug) === null || _slug8 === void 0 ? void 0 : _slug8.replace(/([^0-9a-z-\s])/g, "");
125
+ slug = (_slug9 = slug) === null || _slug9 === void 0 ? void 0 : _slug9.replace(/(\s+)/g, "-");
126
+ slug = (_slug10 = slug) === null || _slug10 === void 0 ? void 0 : _slug10.replace(/^-+/g, "");
127
+ slug = (_slug11 = slug) === null || _slug11 === void 0 ? void 0 : _slug11.replace(/-+$/g, "");
126
128
  return slug + "-" + id;
127
129
  };
128
130
  var getLinkProductDetail = function getLinkProductDetail(product) {
@@ -133,6 +135,13 @@ var getLinkServiceDetail = function getLinkServiceDetail(product) {
133
135
  var slug = genProductSlug(product === null || product === void 0 ? void 0 : product.productName, product === null || product === void 0 ? void 0 : product.productId);
134
136
  return "/service/" + slug + "/" + (product === null || product === void 0 ? void 0 : product.shopId);
135
137
  };
138
+ var getLinkNewsDetail = function getLinkNewsDetail(news) {
139
+ var slug = genProductSlug(news === null || news === void 0 ? void 0 : news.title, news === null || news === void 0 ? void 0 : news.articleId);
140
+ return "/news_detail/" + slug + "/" + (news === null || news === void 0 ? void 0 : news.catId) + "/" + (news === null || news === void 0 ? void 0 : news.shopId);
141
+ };
142
+ var getLinkNewsByCategory = function getLinkNewsByCategory(news) {
143
+ return "/news_by_category/" + (news === null || news === void 0 ? void 0 : news.catId) + "/" + (news === null || news === void 0 ? void 0 : news.shopId);
144
+ };
136
145
  var LinkToPage = function LinkToPage(props) {
137
146
  var _props$Link = props.Link,
138
147
  Link = _props$Link === void 0 ? null : _props$Link,
@@ -339,9 +348,9 @@ var NavBar7 = function NavBar7(props) {
339
348
  }, /*#__PURE__*/React__default.createElement(Button, {
340
349
  label: "Đăng nhập",
341
350
  shopConfigStyle: shopConfigStyle
342
- })), /*#__PURE__*/React__default.createElement(LinkToPage, {
343
- Link: Link,
344
- href: "/account"
351
+ })), /*#__PURE__*/React__default.createElement("a", {
352
+ href: "https://sodofin.vn/account",
353
+ target: "_blank"
345
354
  }, /*#__PURE__*/React__default.createElement(Button, {
346
355
  label: "Đăng ký",
347
356
  shopConfigStyle: shopConfigStyle,
@@ -557,9 +566,9 @@ var NavBar1 = function NavBar1(props) {
557
566
  }, /*#__PURE__*/React__default.createElement(Button, {
558
567
  label: "Đăng nhập",
559
568
  shopConfigStyle: shopConfigStyle
560
- })), /*#__PURE__*/React__default.createElement(LinkToPage, {
561
- Link: Link,
562
- href: "/account"
569
+ })), /*#__PURE__*/React__default.createElement("a", {
570
+ href: "https://sodofin.vn/account",
571
+ target: "_blank"
563
572
  }, /*#__PURE__*/React__default.createElement(Button, {
564
573
  label: "Đăng ký",
565
574
  shopConfigStyle: shopConfigStyle,
@@ -875,12 +884,15 @@ var Hero1 = function Hero1(props) {
875
884
  }, /*#__PURE__*/React__default.createElement("div", {
876
885
  className: "w-[80%] md:w-2/3 xl:w-1/2 md:h-2/3 flex flex-col gap-2 md:gap-8 justify-center items-center bg-background opacity-90 absolute top-5 md:top-10 px-6 py-4 rounded-tr-[40px] rounded-bl-[40px] md:rounded-tr-[80px] md:rounded-bl-[80px]"
877
886
  }, /*#__PURE__*/React__default.createElement("div", {
878
- className: "text-xl text-center md:text-4xl lg:text-[40px] text-primary font-medium"
887
+ className: "text-xl text-center md:text-4xl lg:text-[40px] text-primary font-medium ",
888
+ style: {
889
+ lineHeight: "normal"
890
+ }
879
891
  }, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$2 = sectionData[0]) === null || _sectionData$2 === void 0 ? void 0 : _sectionData$2.title), /*#__PURE__*/React__default.createElement("div", {
880
892
  className: "text-center md:text-2xl lg:text-3xl font-medium"
881
893
  }, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$3 = sectionData[0]) === null || _sectionData$3 === void 0 ? void 0 : _sectionData$3.description), /*#__PURE__*/React__default.createElement(LinkToPage, {
882
894
  Link: Link,
883
- href: (sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$4 = sectionData[0]) === null || _sectionData$4 === void 0 ? void 0 : (_sectionData$4$button = _sectionData$4.buttons) === null || _sectionData$4$button === void 0 ? void 0 : (_sectionData$4$button2 = _sectionData$4$button[0]) === null || _sectionData$4$button2 === void 0 ? void 0 : _sectionData$4$button2.route) || (sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$5 = sectionData[0]) === null || _sectionData$5 === void 0 ? void 0 : (_sectionData$5$button = _sectionData$5.buttons) === null || _sectionData$5$button === void 0 ? void 0 : (_sectionData$5$button2 = _sectionData$5$button[0]) === null || _sectionData$5$button2 === void 0 ? void 0 : _sectionData$5$button2.link)
895
+ href: (sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$4 = sectionData[0]) === null || _sectionData$4 === void 0 ? void 0 : (_sectionData$4$button = _sectionData$4.buttons) === null || _sectionData$4$button === void 0 ? void 0 : (_sectionData$4$button2 = _sectionData$4$button[0]) === null || _sectionData$4$button2 === void 0 ? void 0 : _sectionData$4$button2.route) || (sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$5 = sectionData[0]) === null || _sectionData$5 === void 0 ? void 0 : (_sectionData$5$button = _sectionData$5.buttons) === null || _sectionData$5$button === void 0 ? void 0 : (_sectionData$5$button2 = _sectionData$5$button[0]) === null || _sectionData$5$button2 === void 0 ? void 0 : _sectionData$5$button2.link) || "#"
884
896
  }, /*#__PURE__*/React__default.createElement(Button, {
885
897
  label: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$6 = sectionData[0]) === null || _sectionData$6 === void 0 ? void 0 : (_sectionData$6$button = _sectionData$6.buttons) === null || _sectionData$6$button === void 0 ? void 0 : (_sectionData$6$button2 = _sectionData$6$button[0]) === null || _sectionData$6$button2 === void 0 ? void 0 : _sectionData$6$button2.label,
886
898
  shopConfigStyle: shopConfigStyle
@@ -914,7 +926,7 @@ var Hero2 = function Hero2(props) {
914
926
  className: "relative"
915
927
  }, /*#__PURE__*/React__default.createElement("img", {
916
928
  src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
917
- className: "w-full object-cover min-h-[25vh] md:min-h-[30vh] max-h-[100vh]"
929
+ className: "w-full object-cover min-h-[30vh] md:min-h-[50vh] max-h-[100vh]"
918
930
  }), /*#__PURE__*/React__default.createElement("div", {
919
931
  className: "absolute flex flex-col gap-1 md:gap-4 absolute w-1/2 lg:w-1/3 top-2 sm:top-[20%] xl:top-1/4 right-[2%] lg:right-[15%]"
920
932
  }, /*#__PURE__*/React__default.createElement("img", {
@@ -934,7 +946,7 @@ var Hero5 = function Hero5(props) {
934
946
  className: "relative"
935
947
  }, /*#__PURE__*/React__default.createElement("img", {
936
948
  src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
937
- className: "w-full min-h-[25vh] md:min-h-[30vh] max-h-[100vh]"
949
+ className: "w-full min-h-[30vh] md:min-h-[50vh] max-h-[100vh]"
938
950
  }), /*#__PURE__*/React__default.createElement("div", {
939
951
  className: "flex flex-col gap-2 md:gap-4 absolute top-5 md:top-[20%] w-1/2 lg:w-1/3 left-4 xl:left-20"
940
952
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -955,7 +967,7 @@ var Hero6 = function Hero6(props) {
955
967
  className: "relative"
956
968
  }, /*#__PURE__*/React__default.createElement("img", {
957
969
  src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
958
- className: "w-full h-auto min-h-[25vh md:min-h-[30vh] max-h-[100vh]"
970
+ className: "w-full h-auto min-h-[30vh] md:min-h-[50vh] max-h-[100vh]"
959
971
  }), /*#__PURE__*/React__default.createElement("div", {
960
972
  className: "absolute top-0 md:top-14 lg:top-20 w-full p-3 md:p-6 lg:p-12 z-10 flex flex-col gap-2 md:gap-4 lg:gap-6 items-center justify-center"
961
973
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -976,7 +988,9 @@ var Hero6 = function Hero6(props) {
976
988
  var Hero10 = function Hero10(props) {
977
989
  var _data$data, _data$data$, _data$data$$srcImages, _sectionData$, _sectionData$2, _sectionData$2$button;
978
990
  var shopConfigStyle = props.shopConfigStyle,
979
- data = props.data;
991
+ data = props.data,
992
+ _props$Link = props.Link,
993
+ Link = _props$Link === void 0 ? null : _props$Link;
980
994
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
981
995
  return /*#__PURE__*/React__default.createElement("div", {
982
996
  className: "relative w-full bg-cover bg-center bg-no-repeat ",
@@ -989,8 +1003,10 @@ var Hero10 = function Hero10(props) {
989
1003
  className: "relative w-full min-h-[540px] p-12 z-10 flex flex-col gap-6 items-center justify-center"
990
1004
  }, /*#__PURE__*/React__default.createElement("div", {
991
1005
  className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
992
- }, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.title), sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$2 = sectionData[0]) === null || _sectionData$2 === void 0 ? void 0 : (_sectionData$2$button = _sectionData$2.buttons) === null || _sectionData$2$button === void 0 ? void 0 : _sectionData$2$button.map(function (button) {
993
- return /*#__PURE__*/React__default.createElement("a", {
1006
+ }, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.title), sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$2 = sectionData[0]) === null || _sectionData$2 === void 0 ? void 0 : (_sectionData$2$button = _sectionData$2.buttons) === null || _sectionData$2$button === void 0 ? void 0 : _sectionData$2$button.map(function (button, index) {
1007
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
1008
+ Link: Link,
1009
+ key: "gdf-" + index,
994
1010
  href: (button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
995
1011
  }, /*#__PURE__*/React__default.createElement(Button, {
996
1012
  label: button === null || button === void 0 ? void 0 : button.label,
@@ -7357,7 +7373,7 @@ var Features3 = function Features3(props) {
7357
7373
  }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
7358
7374
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
7359
7375
  Link: Link,
7360
- href: (item === null || item === void 0 ? void 0 : item.link) || (item === null || item === void 0 ? void 0 : item.route)
7376
+ href: (item === null || item === void 0 ? void 0 : item.link) || (item === null || item === void 0 ? void 0 : item.route) || "#"
7361
7377
  }, /*#__PURE__*/React__default.createElement("div", {
7362
7378
  className: "grid grid-cols-2 p-3 rounded-lg font-semibold",
7363
7379
  key: "dfsdfj-" + index,
@@ -7852,12 +7868,14 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
7852
7868
  }));
7853
7869
  };
7854
7870
 
7855
- var NotFoundProduct = function NotFoundProduct() {
7871
+ var NotFoundProduct = function NotFoundProduct(props) {
7872
+ var _props$text = props.text,
7873
+ text = _props$text === void 0 ? "sản phẩm" : _props$text;
7856
7874
  return /*#__PURE__*/React__default.createElement("div", {
7857
7875
  className: "h-60 flex flex-col justify-center items-center text-xl text-gray3"
7858
7876
  }, /*#__PURE__*/React__default.createElement(fa.FaBoxOpen, {
7859
7877
  size: 80
7860
- }), /*#__PURE__*/React__default.createElement("div", null, "Kh\xF4ng c\xF3 s\u1EA3n ph\u1EA9m"));
7878
+ }), /*#__PURE__*/React__default.createElement("div", null, "Kh\xF4ng c\xF3 ", text));
7861
7879
  };
7862
7880
 
7863
7881
  var TreatmentsList6 = function TreatmentsList6(props) {
@@ -7922,28 +7940,34 @@ var ModalNotification = function ModalNotification(props) {
7922
7940
  var onClose = props.onClose,
7923
7941
  onCloseFormBooking = props.onCloseFormBooking,
7924
7942
  _props$isButtonClose = props.isButtonClose,
7925
- isButtonClose = _props$isButtonClose === void 0 ? true : _props$isButtonClose;
7943
+ isButtonClose = _props$isButtonClose === void 0 ? true : _props$isButtonClose,
7944
+ _props$className = props.className,
7945
+ className = _props$className === void 0 ? "" : _props$className,
7946
+ _props$style = props.style,
7947
+ style = _props$style === void 0 ? {} : _props$style,
7948
+ _props$buttonClassNam = props.buttonClassName,
7949
+ buttonClassName = _props$buttonClassNam === void 0 ? "" : _props$buttonClassNam;
7926
7950
  var handleClickOutside = function handleClickOutside(event) {
7927
- if (modalRef.current && !modalRef.current.contains(event.target)) {
7928
- if (onClose) onClose();
7929
- if (onCloseFormBooking && typeof onCloseFormBooking === 'function') {
7930
- onCloseFormBooking();
7931
- }
7951
+ event.stopPropagation();
7952
+ if (onClose) {
7953
+ onClose === null || onClose === void 0 ? void 0 : onClose();
7954
+ }
7955
+ if (onCloseFormBooking && typeof onCloseFormBooking === 'function') {
7956
+ onCloseFormBooking();
7932
7957
  }
7933
7958
  };
7934
- React.useEffect(function () {
7935
- document.addEventListener('click', handleClickOutside);
7936
- return function () {
7937
- document.removeEventListener('click', handleClickOutside);
7938
- };
7939
- }, []);
7940
7959
  return /*#__PURE__*/React__default.createElement("div", {
7941
- className: "fixed inset-0 bg-black flex items-center justify-center bg-opacity-50 z-50 "
7960
+ className: "fixed inset-0 bg-black flex items-center justify-center bg-opacity-50 z-50 ",
7961
+ onClick: handleClickOutside
7942
7962
  }, /*#__PURE__*/React__default.createElement("div", {
7943
- className: " flex items-center justify-center relative bg-red",
7963
+ className: "flex items-center justify-center relative " + className,
7964
+ onClick: function onClick(e) {
7965
+ return e.stopPropagation();
7966
+ },
7967
+ style: style,
7944
7968
  ref: modalRef
7945
7969
  }, props === null || props === void 0 ? void 0 : props.children, isButtonClose && /*#__PURE__*/React__default.createElement("button", {
7946
- className: "absolute top-4 right-4",
7970
+ className: "absolute top-4 right-4 " + buttonClassName,
7947
7971
  onClick: onClose
7948
7972
  }, /*#__PURE__*/React__default.createElement(rx.RxCross2, null))));
7949
7973
  };
@@ -8114,6 +8138,14 @@ var Select = React.forwardRef(function (props, ref) {
8114
8138
  setListOptions(options);
8115
8139
  if (!isMulti) setValue(defaultValue);
8116
8140
  }, [options]);
8141
+ React.useEffect(function () {
8142
+ var delayDebounceFn = setTimeout(function () {
8143
+ handleSearch === null || handleSearch === void 0 ? void 0 : handleSearch(inputSearch);
8144
+ }, 500);
8145
+ return function () {
8146
+ return clearTimeout(delayDebounceFn);
8147
+ };
8148
+ }, [inputSearch]);
8117
8149
  React.useEffect(function () {
8118
8150
  var _inputRef$current;
8119
8151
  inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
@@ -8190,11 +8222,9 @@ var Select = React.forwardRef(function (props, ref) {
8190
8222
  return true;
8191
8223
  }
8192
8224
  };
8193
- var handleSearch = function handleSearch(e) {
8194
- var searchValue = e.target.value;
8195
- setInputSearch(searchValue);
8225
+ var handleSearch = function handleSearch(searchValue) {
8196
8226
  if (handleSearchOption && typeof handleSearchOption === 'function') {
8197
- handleSearchOption(searchValue);
8227
+ handleSearchOption === null || handleSearchOption === void 0 ? void 0 : handleSearchOption(searchValue);
8198
8228
  } else {
8199
8229
  var listFilterOptions = options.filter(function (item) {
8200
8230
  var _item$label;
@@ -8282,7 +8312,7 @@ var Select = React.forwardRef(function (props, ref) {
8282
8312
  placeholder: "T\xECm ki\u1EBFm",
8283
8313
  value: inputSearch,
8284
8314
  onChange: function onChange(e) {
8285
- handleSearch(e);
8315
+ setInputSearch(e.target.value);
8286
8316
  }
8287
8317
  })) : null, /*#__PURE__*/React__default.createElement("div", null, (listOptions === null || listOptions === void 0 ? void 0 : listOptions.length) > 0 ? listOptions === null || listOptions === void 0 ? void 0 : listOptions.map(function (item, index) {
8288
8318
  return /*#__PURE__*/React__default.createElement("div", {
@@ -9077,9 +9107,10 @@ var TreatmentsList7 = function TreatmentsList7(props) {
9077
9107
  var renderItemSlide = function renderItemSlide(product, index) {
9078
9108
  var _product$productInfo, _product$productInfo2;
9079
9109
  return /*#__PURE__*/React__default.createElement("div", {
9080
- className: "w-full"
9110
+ className: "w-full",
9111
+ key: "shshf-" + index
9081
9112
  }, /*#__PURE__*/React__default.createElement("div", {
9082
- className: "grid grid-cols-1 md:grid-cols-2 gap-6 mt-12",
9113
+ className: "grid grid-cols-1 md:grid-cols-2 gap-6",
9083
9114
  key: index
9084
9115
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
9085
9116
  product: product === null || product === void 0 ? void 0 : product.productInfo,
@@ -9102,33 +9133,22 @@ var TreatmentsList7 = function TreatmentsList7(props) {
9102
9133
  }
9103
9134
  }))));
9104
9135
  };
9105
- function RenderArrow(props) {
9106
- var className = props.className,
9107
- style = props.style,
9108
- onClick = props.onClick;
9109
- return /*#__PURE__*/React__default.createElement("div", {
9110
- className: className,
9111
- style: _extends({}, style, {
9112
- display: "none"
9113
- }),
9114
- onClick: onClick
9115
- });
9116
- }
9117
9136
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
9118
9137
  className: "" + SECTION_DEFAULT_CLASS
9119
9138
  }, /*#__PURE__*/React__default.createElement(SectionTitle, {
9120
9139
  data: data,
9121
9140
  shopConfigStyle: shopConfigStyle
9122
- }), /*#__PURE__*/React__default.createElement(Slider, {
9123
- className: "center",
9141
+ }), /*#__PURE__*/React__default.createElement("div", {
9142
+ className: "mt-12 w-full"
9143
+ }, (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement(Slider, {
9124
9144
  infinite: true,
9125
9145
  slidesToShow: 1,
9146
+ slidesToScroll: 1,
9126
9147
  speed: 500,
9127
9148
  autoplay: true,
9128
9149
  autoplaySpeed: 4000,
9129
9150
  pauseOnHover: true,
9130
- nextArrow: /*#__PURE__*/React__default.createElement(RenderArrow, null),
9131
- prevArrow: /*#__PURE__*/React__default.createElement(RenderArrow, null),
9151
+ arrows: false,
9132
9152
  beforeChange: function beforeChange(oldIndex, newIndex) {
9133
9153
  return setCurrentSlide(newIndex);
9134
9154
  },
@@ -9142,6 +9162,8 @@ var TreatmentsList7 = function TreatmentsList7(props) {
9142
9162
  }
9143
9163
  }, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
9144
9164
  return renderItemSlide(product, index);
9165
+ })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, {
9166
+ text: "d\u1ECBch v\u1EE5"
9145
9167
  }))), /*#__PURE__*/React__default.createElement(Dash, {
9146
9168
  color: secondary
9147
9169
  }), isOpenModal ? /*#__PURE__*/React__default.createElement(ModalNotification, {
@@ -9619,11 +9641,14 @@ var ProductList7 = function ProductList7(props) {
9619
9641
  key: index,
9620
9642
  product: product === null || product === void 0 ? void 0 : product.productInfo
9621
9643
  });
9622
- })), /*#__PURE__*/React__default.createElement(Button, {
9644
+ })), (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
9645
+ href: "/products",
9646
+ Link: Link
9647
+ }, /*#__PURE__*/React__default.createElement(Button, {
9623
9648
  label: "Xem tất cả",
9624
9649
  shopConfigStyle: shopConfigStyle,
9625
9650
  className: "mt-12"
9626
- })), /*#__PURE__*/React__default.createElement(Dash, {
9651
+ })) : null), /*#__PURE__*/React__default.createElement(Dash, {
9627
9652
  color: secondary
9628
9653
  }));
9629
9654
  };
@@ -10671,7 +10696,7 @@ var BookingForm6 = function BookingForm6(props) {
10671
10696
  }), /*#__PURE__*/React__default.createElement("div", {
10672
10697
  className: "mt-12 grid grid-cols-1 gap-6 md:grid-cols-3 md:gap-12"
10673
10698
  }, /*#__PURE__*/React__default.createElement(LinkToPage, {
10674
- href: (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : _data$data$.route) || (data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.link)
10699
+ href: (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : _data$data$.route) || (data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.link) || "#"
10675
10700
  }, data !== null && data !== void 0 && (_data$data3 = data.data) !== null && _data$data3 !== void 0 && (_data$data3$ = _data$data3[0]) !== null && _data$data3$ !== void 0 && _data$data3$.svgImage ? /*#__PURE__*/React__default.createElement("div", {
10676
10701
  className: "text-primary w-full h-auto"
10677
10702
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10789,7 +10814,7 @@ var Banner3 = function Banner3(props) {
10789
10814
  }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
10790
10815
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
10791
10816
  Link: Link,
10792
- href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link),
10817
+ href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
10793
10818
  key: "djsd-" + index
10794
10819
  }, /*#__PURE__*/React__default.createElement("img", {
10795
10820
  src: item === null || item === void 0 ? void 0 : item.srcImage,
@@ -11069,7 +11094,7 @@ var Footer1 = function Footer1(props) {
11069
11094
  })) === null || _shopConfigStyle$navB2 === void 0 ? void 0 : _shopConfigStyle$navB2.map(function (route, index) {
11070
11095
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
11071
11096
  Link: Link,
11072
- href: route === null || route === void 0 ? void 0 : route.route,
11097
+ href: (route === null || route === void 0 ? void 0 : route.route) || "#",
11073
11098
  key: "dfjg-" + index
11074
11099
  }, /*#__PURE__*/React__default.createElement("div", null, route === null || route === void 0 ? void 0 : route.label));
11075
11100
  }))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
@@ -11183,7 +11208,9 @@ var Footer7 = function Footer7(props) {
11183
11208
  }, /*#__PURE__*/React__default.createElement("div", {
11184
11209
  className: "mb-4 font-semibold text-md md:text-lg"
11185
11210
  }, "Th\xF4ng tin li\xEAn h\u1EC7"), shopAddressList === null || shopAddressList === void 0 ? void 0 : shopAddressList.map(function (item, index) {
11186
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", null, "C\u01A1 s\u1EDF ", index + 1), /*#__PURE__*/React__default.createElement("div", {
11211
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
11212
+ key: "dlkhg-" + index
11213
+ }, /*#__PURE__*/React__default.createElement("div", null, "C\u01A1 s\u1EDF ", index + 1), /*#__PURE__*/React__default.createElement("div", {
11187
11214
  className: "flex gap-1"
11188
11215
  }, /*#__PURE__*/React__default.createElement(io5.IoLocationOutline, {
11189
11216
  size: 24,
@@ -11208,7 +11235,7 @@ var Footer7 = function Footer7(props) {
11208
11235
  return e === null || e === void 0 ? void 0 : e.isShow;
11209
11236
  })) === null || _shopConfigStyle$navB2 === void 0 ? void 0 : _shopConfigStyle$navB2.map(function (route, index) {
11210
11237
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
11211
- href: route === null || route === void 0 ? void 0 : route.route,
11238
+ href: (route === null || route === void 0 ? void 0 : route.route) || "#",
11212
11239
  Link: Link,
11213
11240
  key: "fiddf-" + index
11214
11241
  }, /*#__PURE__*/React__default.createElement("div", null, route === null || route === void 0 ? void 0 : route.label));
@@ -11331,71 +11358,48 @@ var CustomerRating1 = function CustomerRating1(props) {
11331
11358
  var CustomerRating5 = function CustomerRating5(props) {
11332
11359
  var _props$data = props.data,
11333
11360
  data = _props$data === void 0 ? {} : _props$data;
11334
- var _useState = React.useState(0),
11335
- currentIndex = _useState[0],
11336
- setCurrentIndex = _useState[1];
11337
11361
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
11338
- var _useState2 = React.useState(0),
11339
- startX = _useState2[0],
11340
- setStartX = _useState2[1];
11341
- var _useState3 = React.useState(0),
11342
- endX = _useState3[0],
11343
- setEndX = _useState3[1];
11344
- var sliderRef = React.useRef();
11345
- var handleTouchStart = function handleTouchStart(e) {
11346
- var touchStart = e.touches[0].clientX;
11347
- setStartX(touchStart);
11348
- };
11349
- var handleTouchMove = function handleTouchMove(e) {
11350
- var touchMove = e.touches[0].clientX;
11351
- setEndX(touchMove);
11352
- };
11353
- var handleTouchEnd = function handleTouchEnd() {
11354
- var diff = startX - endX;
11355
- var threshold = sliderRef.current.offsetWidth / 3;
11356
- if (diff > threshold && currentIndex < sectionData.length - 1) {
11357
- setCurrentIndex(currentIndex + 1);
11358
- } else if (diff < -threshold && currentIndex > 0) {
11359
- setCurrentIndex(currentIndex - 1);
11360
- }
11361
- };
11362
+ var _useState = React.useState(0),
11363
+ currentSlide = _useState[0],
11364
+ setCurrentSlide = _useState[1];
11362
11365
  return /*#__PURE__*/React__default.createElement("div", {
11363
11366
  className: SECTION_CLASS + " mx-0 md:mx-4 xl:mx-20 rounded-xl pb-6 relative"
11364
11367
  }, /*#__PURE__*/React__default.createElement("div", {
11365
11368
  className: "absolute mt-16 inset-0 bg-bgSecondary [clip-path:polygon(0%_0%,_100%_30%,_100%_100%,_0%_100%)] z-0 rounded-3xl"
11366
11369
  }), /*#__PURE__*/React__default.createElement("div", {
11367
- className: "w-full relative z-10 border border-textHeading rounded-3xl flex overflow-hidden",
11368
- ref: sliderRef,
11369
- onTouchStart: handleTouchStart,
11370
- onTouchMove: handleTouchMove,
11371
- onTouchEnd: handleTouchEnd
11372
- }, /*#__PURE__*/React__default.createElement("div", {
11373
- className: "flex justify-start transition-transform duration-300",
11374
- style: {
11375
- transform: "translateX(-" + currentIndex * 100 + "%)"
11370
+ className: "w-full relative z-10 border border-textHeading rounded-3xl"
11371
+ }, /*#__PURE__*/React__default.createElement(Slider, {
11372
+ infinite: true,
11373
+ slidesToShow: 1,
11374
+ slidesToScroll: 1,
11375
+ speed: 500,
11376
+ autoplay: true,
11377
+ autoplaySpeed: 4000,
11378
+ pauseOnHover: true,
11379
+ arrows: false,
11380
+ beforeChange: function beforeChange(oldIndex, newIndex) {
11381
+ return setCurrentSlide(newIndex);
11382
+ },
11383
+ dots: true,
11384
+ customPaging: function customPaging(i) {
11385
+ return i === currentSlide ? /*#__PURE__*/React__default.createElement("div", {
11386
+ className: "w-4 h-1 rounded-full bg-primary mt-4"
11387
+ }) : /*#__PURE__*/React__default.createElement("div", {
11388
+ className: "w-4 h-1 rounded-full bg-gray-300 mt-4"
11389
+ });
11376
11390
  }
11377
11391
  }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
11378
11392
  return /*#__PURE__*/React__default.createElement("div", {
11379
- className: "flex flex-col px-2 py-2 md:px-6 lg:px-12 md:py-6 items-center md:flex-row gap-6 md:gap-12 min-w-full overflow-hidden",
11393
+ className: "p-6 !flex !flex-col md:!flex-row gap-4 xl:gap-6",
11380
11394
  key: "lpky-" + index
11381
11395
  }, /*#__PURE__*/React__default.createElement("img", {
11382
11396
  src: item === null || item === void 0 ? void 0 : item.avatar,
11383
- className: "w-80 h-96 object-cover rounded-3xl"
11397
+ className: "w-full md:w-80 h-96 object-cover rounded-3xl"
11384
11398
  }), /*#__PURE__*/React__default.createElement("div", {
11385
- className: "flex flex-col items-center md:items-start gap-6 justify-center"
11399
+ className: "flex flex-col items-center md:items-start gap-4 lg:gap-6 justify-center"
11386
11400
  }, /*#__PURE__*/React__default.createElement("div", {
11387
11401
  className: "text-4xl font-semibold"
11388
- }, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.content), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.description)));
11389
- })), /*#__PURE__*/React__default.createElement("div", {
11390
- className: "absolute bottom-2 md:bottom-20 lg:bottom-[30%] left-1/2 md:left-2/3 xl:left-1/2 transform -translate-x-1/2 flex gap-2"
11391
- }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (_, index) {
11392
- return /*#__PURE__*/React__default.createElement("div", {
11393
- key: "dot-" + index,
11394
- onClick: function onClick() {
11395
- setCurrentIndex(index);
11396
- },
11397
- className: (currentIndex === index ? "w-6 bg-primary" : "w-3 bg-gray4") + " h-3 rounded-full hover:opacity-80 cursor-pointer "
11398
- });
11402
+ }, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.content), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.description, " ")));
11399
11403
  }))));
11400
11404
  };
11401
11405
 
@@ -11676,6 +11680,7 @@ var Breadcrumb1 = function Breadcrumb1(props) {
11676
11680
  label: "Trang chủ",
11677
11681
  route: "/"
11678
11682
  });
11683
+ console.log(items);
11679
11684
  setItems(items);
11680
11685
  };
11681
11686
  return /*#__PURE__*/React__default.createElement("div", {
@@ -11688,7 +11693,7 @@ var Breadcrumb1 = function Breadcrumb1(props) {
11688
11693
  className: "text-gray4"
11689
11694
  }, "/") : null, item !== null && item !== void 0 && item.route ? /*#__PURE__*/React__default.createElement(LinkToPage, {
11690
11695
  Link: Link,
11691
- href: item === null || item === void 0 ? void 0 : item.route,
11696
+ href: (item === null || item === void 0 ? void 0 : item.route) || "#",
11692
11697
  style: {
11693
11698
  color: textHeading
11694
11699
  }
@@ -12674,7 +12679,7 @@ var SearchBar2 = function SearchBar2(props) {
12674
12679
  backgroundSize: "cover"
12675
12680
  }
12676
12681
  }, /*#__PURE__*/React__default.createElement("div", {
12677
- className: "w-[100vw] md:w-[50vw] py-6 mx-auto px-6 flex flex-col h-full gap-4"
12682
+ className: "w-full md:w-1/2 py-6 mx-auto px-6 flex flex-col h-full gap-4"
12678
12683
  }, /*#__PURE__*/React__default.createElement(Input, {
12679
12684
  icons: /*#__PURE__*/React__default.createElement(io5.IoSearchOutline, {
12680
12685
  className: "text-gray3"
@@ -12727,13 +12732,14 @@ var SearchBar5 = function SearchBar5(props) {
12727
12732
  }, data !== null && data !== void 0 && (_data$data2 = data.data) !== null && _data$data2 !== void 0 && _data$data2.title ? /*#__PURE__*/React__default.createElement("div", {
12728
12733
  className: "text-xl font-semibold md:text-3xl lg:text-4xl text-textButton text-center"
12729
12734
  }, 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", {
12730
- className: "text-center"
12735
+ className: "text-center text-textButton"
12731
12736
  }, data === null || data === void 0 ? void 0 : (_data$data5 = data.data) === null || _data$data5 === void 0 ? void 0 : _data$data5.description) : null, /*#__PURE__*/React__default.createElement(Input, {
12732
12737
  onChange: setValue,
12733
12738
  icons: /*#__PURE__*/React__default.createElement(io5.IoSearchOutline, {
12734
12739
  className: "text-gray3 ps-1 text-xl md:text-2xl"
12735
12740
  }),
12736
- className: "w-full bg-bgSecondary w-full md:w-[50vw] lg:w-[35vw] mb-2 md:h-12",
12741
+ wrapClassName: "w-full sm:w-[60%] md:w-[50%] lg:w-[40%]",
12742
+ className: "w-full bg-bgSecondary mb-2 md:h-12",
12737
12743
  style: {
12738
12744
  borderRadius: "32px"
12739
12745
  },
@@ -12754,8 +12760,7 @@ var SearchBar5 = function SearchBar5(props) {
12754
12760
 
12755
12761
  var SearchBar6 = function SearchBar6(props) {
12756
12762
  var _data$data, _data$data2, _data$data3, _data$data4, _data$data5;
12757
- var shopConfigStyle = props.shopConfigStyle,
12758
- _props$Link = props.Link,
12763
+ var _props$Link = props.Link,
12759
12764
  Link = _props$Link === void 0 ? null : _props$Link,
12760
12765
  data = props.data;
12761
12766
  var _useState = React.useState(""),
@@ -12771,14 +12776,15 @@ var SearchBar6 = function SearchBar6(props) {
12771
12776
  }, data !== null && data !== void 0 && (_data$data2 = data.data) !== null && _data$data2 !== void 0 && _data$data2.title ? /*#__PURE__*/React__default.createElement("div", {
12772
12777
  className: "text-lg font-semibold text-textBody md:text-2xl lg:text-3xl text-center"
12773
12778
  }, 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", {
12774
- className: "text-center"
12779
+ className: "text-center text-textBody"
12775
12780
  }, data === null || data === void 0 ? void 0 : (_data$data5 = data.data) === null || _data$data5 === void 0 ? void 0 : _data$data5.description) : null, /*#__PURE__*/React__default.createElement("div", {
12776
- className: "flex gap-2 md:gap-4 lg:gap-6 mb-2 md:mb-0"
12781
+ className: "flex gap-2 md:gap-4 lg:gap-6 mb-2 md:mb-0 w-full md:w-[70%] h-10 lg:h-12 lg:w-1/2"
12777
12782
  }, /*#__PURE__*/React__default.createElement(Input, {
12778
12783
  icons: /*#__PURE__*/React__default.createElement(io5.IoSearchOutline, {
12779
12784
  className: "text-gray3"
12780
12785
  }),
12781
- className: "w-full h-full md:h-12 w-full md:w-[70vw] bg-background lg:w-[50vw]",
12786
+ className: "w-full h-full",
12787
+ wrapClassName: " w-full h-full",
12782
12788
  inputClassName: "w-full",
12783
12789
  placeholder: data !== null && data !== void 0 && data.sectionTitle ? data === null || data === void 0 ? void 0 : data.sectionTitle : "Tìm kiếm sản phẩm",
12784
12790
  onChange: setValue
@@ -12787,12 +12793,10 @@ var SearchBar6 = function SearchBar6(props) {
12787
12793
  href: genLinkSearch(value)
12788
12794
  }, /*#__PURE__*/React__default.createElement(Button, {
12789
12795
  label: "T\xECm ki\u1EBFm",
12790
- className: "whitespace-nowrap h-full",
12791
- shopConfigStyle: shopConfigStyle
12796
+ className: "whitespace-nowrap h-full"
12792
12797
  })) : /*#__PURE__*/React__default.createElement(Button, {
12793
12798
  label: "T\xECm ki\u1EBFm",
12794
- className: "whitespace-nowrap ",
12795
- shopConfigStyle: shopConfigStyle
12799
+ className: "whitespace-nowrap "
12796
12800
  }))));
12797
12801
  };
12798
12802
 
@@ -12806,12 +12810,12 @@ var ShopHighlights2 = function ShopHighlights2(props) {
12806
12810
  }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
12807
12811
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
12808
12812
  Link: Link,
12809
- href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link)
12813
+ href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
12810
12814
  }, /*#__PURE__*/React__default.createElement("div", {
12811
12815
  className: "flex flex-col items-center text-center lg:px-3 gap-3",
12812
12816
  key: "kdf-" + index
12813
12817
  }, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
12814
- className: "w-12 text-primary w-16 h-16 rounded-full",
12818
+ className: "bg-primary p-3 text-textButton w-16 h-16 rounded-full",
12815
12819
  dangerouslySetInnerHTML: {
12816
12820
  __html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
12817
12821
  }
@@ -12834,13 +12838,13 @@ var ShopHighlights5 = function ShopHighlights5(props) {
12834
12838
  className: SECTION_CLASS + " grid md:grid-cols-3 py-6 gap-4 lg:gap-6 bg-bgSecondary"
12835
12839
  }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
12836
12840
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
12837
- href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link),
12841
+ href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
12838
12842
  Link: Link
12839
12843
  }, /*#__PURE__*/React__default.createElement("div", {
12840
12844
  className: "flex flex-col items-center text-center md:px-3 lg:px-6 gap-3",
12841
12845
  key: "kdf-" + index
12842
12846
  }, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
12843
- className: "w-16 h-16 rounded-full text-primary ",
12847
+ className: "w-16 h-16 rounded-full bg-primary p-3 text-textButton ",
12844
12848
  dangerouslySetInnerHTML: {
12845
12849
  __html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
12846
12850
  }
@@ -12868,7 +12872,7 @@ var ShopHighlights6 = function ShopHighlights6(props) {
12868
12872
  className: "flex flex-col items-center text-center md:px-3 lg:px-6 gap-3",
12869
12873
  key: "kdf-" + index
12870
12874
  }, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
12871
- className: "text-primary w-16 h-16 rounded-full",
12875
+ className: "text-primary w-16 h-16 p-3 text-textButton rounded-full",
12872
12876
  dangerouslySetInnerHTML: {
12873
12877
  __html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
12874
12878
  }
@@ -12880,7 +12884,7 @@ var ShopHighlights6 = function ShopHighlights6(props) {
12880
12884
  className: " w-44 h-0.5 rounded-full bg-primary"
12881
12885
  }), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.description), /*#__PURE__*/React__default.createElement(LinkToPage, {
12882
12886
  Link: Link,
12883
- href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link)
12887
+ href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
12884
12888
  }, /*#__PURE__*/React__default.createElement(Button, {
12885
12889
  shopConfigStyle: shopConfigStyle,
12886
12890
  label: item === null || item === void 0 ? void 0 : item.title
@@ -12908,10 +12912,9 @@ var ShopHighlights7 = function ShopHighlights7(props) {
12908
12912
  }), /*#__PURE__*/React__default.createElement("div", {
12909
12913
  className: "mt-6 grid grid-cols-3 gap-4 md:gap-8"
12910
12914
  }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
12911
- var _item, _item2;
12912
12915
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
12913
12916
  Link: Link,
12914
- href: ((_item = item) === null || _item === void 0 ? void 0 : _item.route) || ((_item2 = item) === null || _item2 === void 0 ? void 0 : _item2.link),
12917
+ href: (it === null || it === void 0 ? void 0 : it.route) || (it === null || it === void 0 ? void 0 : it.link) || "#",
12915
12918
  key: index,
12916
12919
  className: "pt-6 col-span-3 md:col-span-1"
12917
12920
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -12921,7 +12924,7 @@ var ShopHighlights7 = function ShopHighlights7(props) {
12921
12924
  }), /*#__PURE__*/React__default.createElement("div", {
12922
12925
  className: "absolute w-24 h-16 rounded-2xl -right-2 -top-2 z-0 bg-secondary"
12923
12926
  }), it !== null && it !== void 0 && it.svgImage ? /*#__PURE__*/React__default.createElement("div", {
12924
- className: "w-12 text-primary h-16 w-16 z-20 m-auto"
12927
+ className: "w-12 text-textButton h-16 w-16 z-20 m-auto"
12925
12928
  }, /*#__PURE__*/React__default.createElement("div", {
12926
12929
  dangerouslySetInnerHTML: {
12927
12930
  __html: configSvg(it === null || it === void 0 ? void 0 : it.svgImage)
@@ -12969,6 +12972,484 @@ var VideoFull1 = function VideoFull1(props) {
12969
12972
  })) : null);
12970
12973
  };
12971
12974
 
12975
+ var getAllArticleNewsApi = function getAllArticleNewsApi(shopId, appId, landingShopConfigId, params) {
12976
+ if (params === void 0) {
12977
+ params = {};
12978
+ }
12979
+ return api({
12980
+ method: "get",
12981
+ url: "/landing/news/article/get-all-filter",
12982
+ params: _extends({
12983
+ shopId: shopId,
12984
+ appId: appId,
12985
+ landingShopConfigId: landingShopConfigId
12986
+ }, params)
12987
+ });
12988
+ };
12989
+ var getNewsDetailApi = function getNewsDetailApi(articleId, shopId, landingShopConfigId) {
12990
+ return api({
12991
+ method: "get",
12992
+ url: "/landing/news/article/" + articleId,
12993
+ params: {
12994
+ shopId: shopId,
12995
+ landingShopConfigId: landingShopConfigId,
12996
+ articleId: articleId
12997
+ }
12998
+ });
12999
+ };
13000
+
13001
+ var NewsController = function NewsController(props) {
13002
+ var shopConfig = props.shopConfig,
13003
+ params = props.params;
13004
+ var _useState = React.useState(false),
13005
+ loading = _useState[0],
13006
+ setLoading = _useState[1];
13007
+ var _useState2 = React.useState([]),
13008
+ newsArticles = _useState2[0],
13009
+ setNewsArticles = _useState2[1];
13010
+ var _useState3 = React.useState(),
13011
+ setPage = _useState3[1];
13012
+ React.useEffect(function () {
13013
+ if (shopConfig !== null && shopConfig !== void 0 && shopConfig.shopId && shopConfig !== null && shopConfig !== void 0 && shopConfig.landingShopConfigId) {
13014
+ getAllArticleNews();
13015
+ } else {
13016
+ setNewsArticles([]);
13017
+ setPage(null);
13018
+ }
13019
+ }, [shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingShopConfigId, params]);
13020
+ var getAllArticleNews = function getAllArticleNews() {
13021
+ try {
13022
+ setLoading(true);
13023
+ var _temp = _catch(function () {
13024
+ var defaultParams = {
13025
+ page: 0,
13026
+ size: 10,
13027
+ active: true
13028
+ };
13029
+ var filterParams = _extends({}, defaultParams, params);
13030
+ return Promise.resolve(getAllArticleNewsApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.appId, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingShopConfigId, filterParams)).then(function (response) {
13031
+ var _response$data, _response$data$status;
13032
+ if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$status = _response$data.status) === null || _response$data$status === void 0 ? void 0 : _response$data$status.code) == 200) {
13033
+ var _response$data2, _response$data2$data, _response$data3, _response$data3$data;
13034
+ setNewsArticles(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$data = _response$data2.data) === null || _response$data2$data === void 0 ? void 0 : _response$data2$data.content);
13035
+ setPage(response === null || response === void 0 ? void 0 : (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : (_response$data3$data = _response$data3.data) === null || _response$data3$data === void 0 ? void 0 : _response$data3$data.totalElements);
13036
+ }
13037
+ setLoading(false);
13038
+ });
13039
+ }, function (error) {
13040
+ console.log(error);
13041
+ setLoading(false);
13042
+ });
13043
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
13044
+ } catch (e) {
13045
+ return Promise.reject(e);
13046
+ }
13047
+ };
13048
+ return {
13049
+ newsArticles: newsArticles,
13050
+ loading: loading
13051
+ };
13052
+ };
13053
+
13054
+ var DefaultImage$1 = function DefaultImage(props) {
13055
+ var _props$className = props.className,
13056
+ className = _props$className === void 0 ? "" : _props$className;
13057
+ return /*#__PURE__*/React__default.createElement("div", {
13058
+ className: "flex justify-center items-center max-w-full h-full aspect-video rounded-lg " + className,
13059
+ style: {
13060
+ backgroundColor: "#FAFAFA"
13061
+ }
13062
+ }, /*#__PURE__*/React__default.createElement(SvgImageGallery, {
13063
+ width: "25%",
13064
+ height: "25%",
13065
+ fill: "#D9D9D9"
13066
+ }));
13067
+ };
13068
+ var NewsImage = function NewsImage(props) {
13069
+ var _props$size2 = props.size,
13070
+ size = _props$size2 === void 0 ? 0 : _props$size2,
13071
+ _props$className2 = props.className,
13072
+ className = _props$className2 === void 0 ? "" : _props$className2,
13073
+ news = props.news;
13074
+ var _useState = React.useState(""),
13075
+ src = _useState[0],
13076
+ setSrc = _useState[1];
13077
+ React.useEffect(function () {
13078
+ getNewsImage();
13079
+ }, [news]);
13080
+ var getNewsImage = function getNewsImage() {
13081
+ var src = news === null || news === void 0 ? void 0 : news.thumbnail;
13082
+ setSrc(src);
13083
+ };
13084
+ return src ? /*#__PURE__*/React__default.createElement("img", {
13085
+ src: src,
13086
+ className: "h-full rounded-lg max-w-full aspect-video " + className,
13087
+ style: size ? {
13088
+ width: size,
13089
+ height: size
13090
+ } : null
13091
+ }) : /*#__PURE__*/React__default.createElement(DefaultImage$1, {
13092
+ className: className,
13093
+ size: size
13094
+ });
13095
+ };
13096
+
13097
+ var NewsHighlight1 = function NewsHighlight1(props) {
13098
+ var _newsArticles$, _newsArticles$2, _newsArticles$3, _newsArticles$slice;
13099
+ var _props$SectionTitle = props.SectionTitle,
13100
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
13101
+ _props$shopConfigStyl = props.shopConfigStyle,
13102
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
13103
+ _props$Link = props.Link,
13104
+ Link = _props$Link === void 0 ? null : _props$Link,
13105
+ data = props.data;
13106
+ var _useState = React.useState({
13107
+ tags: "HIGHLIGHT",
13108
+ page: 0,
13109
+ size: 6,
13110
+ sort: "timeUpdate,DESC"
13111
+ }),
13112
+ params = _useState[0];
13113
+ var _NewsController = NewsController(_extends({}, props, {
13114
+ params: params
13115
+ })),
13116
+ _NewsController$newsA = _NewsController.newsArticles,
13117
+ newsArticles = _NewsController$newsA === void 0 ? [] : _NewsController$newsA;
13118
+ return /*#__PURE__*/React__default.createElement("div", {
13119
+ className: "" + SECTION_CLASS
13120
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
13121
+ data: data,
13122
+ shopConfigStyle: shopConfigStyle
13123
+ }), /*#__PURE__*/React__default.createElement("div", {
13124
+ className: "mt-12 mb-6 grid grid-cols-1 md:grid-cols-2 gap-6 "
13125
+ }, /*#__PURE__*/React__default.createElement(LinkToPage, {
13126
+ href: getLinkNewsDetail(newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[0]),
13127
+ Link: Link
13128
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(NewsImage, {
13129
+ news: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[0]
13130
+ }), /*#__PURE__*/React__default.createElement("div", {
13131
+ className: "pt-3 font-medium text-lg"
13132
+ }, newsArticles === null || newsArticles === void 0 ? void 0 : (_newsArticles$ = newsArticles[0]) === null || _newsArticles$ === void 0 ? void 0 : _newsArticles$.title))), /*#__PURE__*/React__default.createElement("div", {
13133
+ className: "flex flex-col gap-6"
13134
+ }, /*#__PURE__*/React__default.createElement(LinkToPage, {
13135
+ className: "grid grid-cols-1 md:grid-cols-2 gap-4 ",
13136
+ href: getLinkNewsDetail(newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[1]),
13137
+ Link: Link
13138
+ }, /*#__PURE__*/React__default.createElement(NewsImage, {
13139
+ news: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[1]
13140
+ }), /*#__PURE__*/React__default.createElement("div", {
13141
+ className: "font-medium text-lg"
13142
+ }, 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, {
13143
+ className: "grid grid-cols-1 md:grid-cols-2 gap-4",
13144
+ href: getLinkNewsDetail(newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[2]),
13145
+ Link: Link
13146
+ }, /*#__PURE__*/React__default.createElement(NewsImage, {
13147
+ news: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[2]
13148
+ }), /*#__PURE__*/React__default.createElement("div", {
13149
+ className: "font-medium text-lg"
13150
+ }, 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", {
13151
+ className: "grid grid-cols-1 md:grid-cols-3 gap-6 mt-6 "
13152
+ }, 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) {
13153
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
13154
+ href: getLinkNewsDetail(item),
13155
+ Link: Link,
13156
+ key: "kdjf-" + index
13157
+ }, /*#__PURE__*/React__default.createElement("div", {
13158
+ className: "jgdfg-" + index
13159
+ }, /*#__PURE__*/React__default.createElement(NewsImage, {
13160
+ news: item
13161
+ }), /*#__PURE__*/React__default.createElement("div", {
13162
+ className: "font-medium text-lg py-2"
13163
+ }, item === null || item === void 0 ? void 0 : item.title)));
13164
+ })));
13165
+ };
13166
+
13167
+ var relativeTime = createCommonjsModule(function (module, exports) {
13168
+ !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)};}}));
13169
+ });
13170
+
13171
+ var vi = createCommonjsModule(function (module, exports) {
13172
+ !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),_}));
13173
+ });
13174
+
13175
+ var getAllNewsCategoriesApi = function getAllNewsCategoriesApi(shopId, landingShopConfigId, appId) {
13176
+ if (appId === void 0) {
13177
+ appId = "SSPA";
13178
+ }
13179
+ return api({
13180
+ method: "get",
13181
+ url: "/landing/news/category/get-all",
13182
+ params: {
13183
+ shopId: shopId,
13184
+ landingShopConfigId: landingShopConfigId,
13185
+ appId: appId,
13186
+ active: true
13187
+ }
13188
+ });
13189
+ };
13190
+
13191
+ var NewsCategoryController = function NewsCategoryController(props) {
13192
+ var params = props.params,
13193
+ shopConfig = props.shopConfig;
13194
+ var _useState = React.useState([]),
13195
+ newsCategories = _useState[0],
13196
+ setNewsCategories = _useState[1];
13197
+ React.useEffect(function () {
13198
+ if (shopConfig !== null && shopConfig !== void 0 && shopConfig.shopId && shopConfig !== null && shopConfig !== void 0 && shopConfig.landingShopConfigId) getAllNewsCategories();
13199
+ }, [shopConfig, params]);
13200
+ var getAllNewsCategories = function getAllNewsCategories() {
13201
+ try {
13202
+ var _temp = _catch(function () {
13203
+ return Promise.resolve(getAllNewsCategoriesApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingShopConfigId, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.appId)).then(function (res) {
13204
+ var _res$data, _res$data$status;
13205
+ 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) {
13206
+ var _res$data2;
13207
+ setNewsCategories(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
13208
+ }
13209
+ });
13210
+ }, function (error) {
13211
+ console.log(error);
13212
+ });
13213
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
13214
+ } catch (e) {
13215
+ return Promise.reject(e);
13216
+ }
13217
+ };
13218
+ return {
13219
+ newsCategories: newsCategories
13220
+ };
13221
+ };
13222
+
13223
+ dayjs_min.extend(relativeTime);
13224
+ dayjs_min.locale("vi");
13225
+ var News1 = function News1(props) {
13226
+ var _newsArticles$slice;
13227
+ var _props$shopConfigStyl = props.shopConfigStyle,
13228
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
13229
+ _props$Link = props.Link,
13230
+ Link = _props$Link === void 0 ? null : _props$Link,
13231
+ _props$catId = props.catId,
13232
+ catId = _props$catId === void 0 ? "" : _props$catId;
13233
+ var _useState = React.useState({
13234
+ page: 0,
13235
+ sort: "timeUpdate,DESC",
13236
+ size: 10,
13237
+ catId: catId
13238
+ }),
13239
+ params = _useState[0],
13240
+ setParams = _useState[1];
13241
+ var _useState2 = React.useState({}),
13242
+ categorySelected = _useState2[0],
13243
+ setCategorySelected = _useState2[1];
13244
+ var _useState3 = React.useState(true),
13245
+ isSeeMore = _useState3[0],
13246
+ setIsSeeMore = _useState3[1];
13247
+ var _NewsController = NewsController(_extends({}, props, {
13248
+ params: params
13249
+ })),
13250
+ _NewsController$newsA = _NewsController.newsArticles,
13251
+ newsArticles = _NewsController$newsA === void 0 ? [] : _NewsController$newsA,
13252
+ loading = _NewsController.loading;
13253
+ var _NewsCategoryControll = NewsCategoryController(props),
13254
+ _NewsCategoryControll2 = _NewsCategoryControll.newsCategories,
13255
+ newsCategories = _NewsCategoryControll2 === void 0 ? [] : _NewsCategoryControll2;
13256
+ var handleSeeMoreNews = function handleSeeMoreNews() {
13257
+ setIsSeeMore(false);
13258
+ setParams(function (prev) {
13259
+ return _extends({}, prev, {
13260
+ size: (prev === null || prev === void 0 ? void 0 : prev.size) + 4
13261
+ });
13262
+ });
13263
+ };
13264
+ React.useEffect(function () {
13265
+ if ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) > 0 && params !== null && params !== void 0 && params.catId) {
13266
+ var category = newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.find(function (item) {
13267
+ return (item === null || item === void 0 ? void 0 : item.catId) == catId;
13268
+ });
13269
+ setCategorySelected(category);
13270
+ }
13271
+ }, [params === null || params === void 0 ? void 0 : params.catId, newsCategories]);
13272
+ return /*#__PURE__*/React__default.createElement("div", {
13273
+ className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-3 gap-6"
13274
+ }, /*#__PURE__*/React__default.createElement("div", {
13275
+ className: "md:col-span-2 flex flex-col gap-8"
13276
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
13277
+ className: "px-6 py-3 text-textButton text-lg rounded-t-lg bg-primary w-max"
13278
+ }, params !== null && params !== void 0 && params.catId ? categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catName : "Tin mới"), /*#__PURE__*/React__default.createElement("div", {
13279
+ className: "w-full border border-primary"
13280
+ })), loading & isSeeMore ? /*#__PURE__*/React__default.createElement("div", {
13281
+ className: "w-full h-80 flex justify-center items-center"
13282
+ }, /*#__PURE__*/React__default.createElement(Loading, null)) : /*#__PURE__*/React__default.createElement("div", {
13283
+ className: "flex flex-col gap-8"
13284
+ }, (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) {
13285
+ var _dayjs;
13286
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
13287
+ href: getLinkNewsDetail(item),
13288
+ Link: Link,
13289
+ key: "kghf-" + index
13290
+ }, /*#__PURE__*/React__default.createElement("div", {
13291
+ className: "grid grid-cols-2 gap-2 md:gap-4 cursor-pointer",
13292
+ key: "djfsdf-" + index
13293
+ }, /*#__PURE__*/React__default.createElement(NewsImage, {
13294
+ news: item
13295
+ }), /*#__PURE__*/React__default.createElement("div", {
13296
+ className: "flex flex-col gap-2 md:gap-3 pb-4"
13297
+ }, /*#__PURE__*/React__default.createElement("div", {
13298
+ className: "font-medium text-lg md:text-xl line-clamp-2"
13299
+ }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
13300
+ className: "line-clamp-3 font-normal min-h-6 md:min-h-20 text-gray3"
13301
+ }, item === null || item === void 0 ? void 0 : item.shortDescription), /*#__PURE__*/React__default.createElement("div", {
13302
+ className: " text-gray3"
13303
+ }, (_dayjs = dayjs_min(item === null || item === void 0 ? void 0 : item.timeUpdate)) === null || _dayjs === void 0 ? void 0 : _dayjs.fromNow()))));
13304
+ }) : /*#__PURE__*/React__default.createElement("div", {
13305
+ className: "w-full h-64 flex flex-col justify-center items-center text-gray3"
13306
+ }, /*#__PURE__*/React__default.createElement(gi.GiNewspaper, {
13307
+ size: 80
13308
+ }), " 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, {
13309
+ label: "Xem th\xEAm",
13310
+ shopConfigStyle: shopConfigStyle,
13311
+ onClick: handleSeeMoreNews,
13312
+ className: "w-max mx-auto"
13313
+ }) : null)), /*#__PURE__*/React__default.createElement("div", {
13314
+ className: "sticky top-20 self-start"
13315
+ }, /*#__PURE__*/React__default.createElement("div", {
13316
+ className: "px-6 py-3 bg-primary rounded-t-lg text-lg text-textButton text-center"
13317
+ }, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
13318
+ className: "rounded-b-lg bg-bgSecondary"
13319
+ }, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {
13320
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
13321
+ href: getLinkNewsByCategory(item),
13322
+ Link: Link,
13323
+ key: "fjhnfg-" + index
13324
+ }, /*#__PURE__*/React__default.createElement("div", {
13325
+ className: "px-6 py-3 hover:bg-gray-100 hover:text-primary cursor-pointer",
13326
+ key: "sdjfdh-" + index
13327
+ }, item === null || item === void 0 ? void 0 : item.catName));
13328
+ }))));
13329
+ };
13330
+
13331
+ var NewsDetailController = function NewsDetailController(props) {
13332
+ var shopConfig = props.shopConfig,
13333
+ _props$articleId = props.articleId,
13334
+ articleId = _props$articleId === void 0 ? 0 : _props$articleId;
13335
+ var _useState = React.useState(),
13336
+ article = _useState[0],
13337
+ setArticle = _useState[1];
13338
+ React.useEffect(function () {
13339
+ if (articleId) {
13340
+ getProductDetail();
13341
+ }
13342
+ }, [articleId]);
13343
+ var getProductDetail = function getProductDetail() {
13344
+ try {
13345
+ var _temp = _catch(function () {
13346
+ return Promise.resolve(getNewsDetailApi(articleId, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingShopConfigId)).then(function (res) {
13347
+ var _res$data, _res$data$status;
13348
+ 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) {
13349
+ var _res$data2;
13350
+ setArticle(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
13351
+ }
13352
+ });
13353
+ }, function (e) {
13354
+ console.log(e);
13355
+ });
13356
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
13357
+ } catch (e) {
13358
+ return Promise.reject(e);
13359
+ }
13360
+ };
13361
+ return {
13362
+ article: article
13363
+ };
13364
+ };
13365
+
13366
+ dayjs_min.extend(relativeTime);
13367
+ dayjs_min.locale("vi");
13368
+ var NewsDetail1 = function NewsDetail1(props) {
13369
+ var shopConfigStyle = props.shopConfigStyle,
13370
+ _props$catId = props.catId,
13371
+ catId = _props$catId === void 0 ? 0 : _props$catId,
13372
+ _props$Link = props.Link,
13373
+ Link = _props$Link === void 0 ? null : _props$Link;
13374
+ var _useState = React.useState({
13375
+ catId: catId,
13376
+ szie: 10
13377
+ }),
13378
+ params = _useState[0],
13379
+ setParams = _useState[1];
13380
+ var _NewsDetailController = NewsDetailController(props),
13381
+ _NewsDetailController2 = _NewsDetailController.article,
13382
+ article = _NewsDetailController2 === void 0 ? {} : _NewsDetailController2;
13383
+ var _NewsCategoryControll = NewsCategoryController(props),
13384
+ _NewsCategoryControll2 = _NewsCategoryControll.newsCategories,
13385
+ newsCategories = _NewsCategoryControll2 === void 0 ? [] : _NewsCategoryControll2;
13386
+ var _NewsController = NewsController(_extends({}, props, {
13387
+ params: params
13388
+ })),
13389
+ _NewsController$newsA = _NewsController.newsArticles,
13390
+ newsArticles = _NewsController$newsA === void 0 ? [] : _NewsController$newsA;
13391
+ var handleSeeMore = function handleSeeMore() {
13392
+ setParams(function (prev) {
13393
+ return _extends({}, prev, {
13394
+ size: (prev === null || prev === void 0 ? void 0 : prev.size) + 4
13395
+ });
13396
+ });
13397
+ };
13398
+ return /*#__PURE__*/React__default.createElement("div", {
13399
+ className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-3 mt-0 md:mt-0 gap-6"
13400
+ }, /*#__PURE__*/React__default.createElement("div", {
13401
+ className: "md:col-span-2 flex flex-col gap-4"
13402
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
13403
+ className: "text-2xl font-medium"
13404
+ }, article === null || article === void 0 ? void 0 : article.title), /*#__PURE__*/React__default.createElement("div", {
13405
+ className: "flex items-center gap-2 text-gray3 mt-2"
13406
+ }, /*#__PURE__*/React__default.createElement(go.GoClock, null), dayjs_min(article === null || article === void 0 ? void 0 : article.timeUpdate).fromNow())), /*#__PURE__*/React__default.createElement("div", {
13407
+ className: "text-gray2"
13408
+ }, article === null || article === void 0 ? void 0 : article.shortDescription), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(NewsImage, {
13409
+ news: article
13410
+ })), /*#__PURE__*/React__default.createElement("div", {
13411
+ dangerouslySetInnerHTML: {
13412
+ __html: article === null || article === void 0 ? void 0 : article.content
13413
+ }
13414
+ }), /*#__PURE__*/React__default.createElement("div", {
13415
+ className: "mt-6"
13416
+ }, /*#__PURE__*/React__default.createElement("div", {
13417
+ className: "font-medium text-2xl mb-4"
13418
+ }, "Tin c\xF9ng chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
13419
+ className: "grid grid-cols-1 md:grid-cols-2 gap-6"
13420
+ }, newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles.map(function (item, index) {
13421
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
13422
+ href: getLinkNewsDetail(item),
13423
+ Link: Link,
13424
+ key: "kghf-" + index
13425
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(NewsImage, {
13426
+ news: item
13427
+ }), /*#__PURE__*/React__default.createElement("div", {
13428
+ className: "font-medium text-lg line-clamp-2"
13429
+ }, item === null || item === void 0 ? void 0 : item.title)));
13430
+ })), (newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement("div", {
13431
+ className: "flex justify-center mt-4 w-full"
13432
+ }, /*#__PURE__*/React__default.createElement(Button, {
13433
+ label: "Xem thêm",
13434
+ onClick: handleSeeMore,
13435
+ shopConfigStyle: shopConfigStyle
13436
+ })) : null)), /*#__PURE__*/React__default.createElement("div", {
13437
+ className: "sticky top-20 self-start"
13438
+ }, /*#__PURE__*/React__default.createElement("div", {
13439
+ className: "px-6 py-3 bg-primary rounded-t-lg text-lg text-textButton text-center"
13440
+ }, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
13441
+ className: "rounded-b-lg bg-bgSecondary"
13442
+ }, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {
13443
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
13444
+ href: getLinkNewsByCategory(item),
13445
+ Link: Link
13446
+ }, /*#__PURE__*/React__default.createElement("div", {
13447
+ className: "px-6 py-3 hover:bg-gray-100 hover:text-primary cursor-pointer",
13448
+ key: "sdjfdh-" + index
13449
+ }, item === null || item === void 0 ? void 0 : item.catName));
13450
+ }))));
13451
+ };
13452
+
12972
13453
  exports.About1 = About1;
12973
13454
  exports.About5 = About5;
12974
13455
  exports.Address1 = Address1;
@@ -13008,6 +13489,9 @@ exports.Links1 = Links1;
13008
13489
  exports.ModalNotification = ModalNotification;
13009
13490
  exports.NavBar1 = NavBar1;
13010
13491
  exports.NavBar7 = NavBar7;
13492
+ exports.News1 = News1;
13493
+ exports.NewsDetail1 = NewsDetail1;
13494
+ exports.NewsHighlight1 = NewsHighlight1;
13011
13495
  exports.PageTitle1 = PageTitle1;
13012
13496
  exports.Partner1 = Partner1;
13013
13497
  exports.ProductCategory2 = ProductCategory2;