s-platform-landing-section 0.1.18 → 0.1.19

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.
@@ -16,8 +16,9 @@ import Slider from 'react-slick';
16
16
  import 'slick-carousel/slick/slick.css';
17
17
  import 'slick-carousel/slick/slick-theme.css';
18
18
  import { AiOutlineShoppingCart } from 'react-icons/ai';
19
- import { GoCreditCard } from 'react-icons/go';
19
+ import { GoCreditCard, GoClock } from 'react-icons/go';
20
20
  import { RiDeleteBin7Line } from 'react-icons/ri';
21
+ import { GiNewspaper } from 'react-icons/gi';
21
22
 
22
23
  var Button = function Button(props) {
23
24
  var _props$label = props.label,
@@ -108,18 +109,19 @@ var getDurationValue = function getDurationValue(attributes) {
108
109
  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" : "";
109
110
  };
110
111
  var genProductSlug = function genProductSlug(productName, id) {
112
+ var _slug, _slug2, _slug3, _slug4, _slug5, _slug6, _slug7, _slug8, _slug9, _slug10, _slug11;
111
113
  var slug = productName === null || productName === void 0 ? void 0 : productName.toLowerCase();
112
- slug = slug.replace(/(à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ)/g, "a");
113
- slug = slug.replace(/(è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ)/g, "e");
114
- slug = slug.replace(/(ì|í|ị|ỉ|ĩ)/g, "i");
115
- slug = slug.replace(/(ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ)/g, "o");
116
- slug = slug.replace(/(ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ)/g, "u");
117
- slug = slug.replace(/(ỳ|ý|ỵ|ỷ|ỹ)/g, "y");
118
- slug = slug.replace(/(đ)/g, "d");
119
- slug = slug.replace(/([^0-9a-z-\s])/g, "");
120
- slug = slug.replace(/(\s+)/g, "-");
121
- slug = slug.replace(/^-+/g, "");
122
- slug = slug.replace(/-+$/g, "");
114
+ slug = (_slug = slug) === null || _slug === void 0 ? void 0 : _slug.replace(/(à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ)/g, "a");
115
+ slug = (_slug2 = slug) === null || _slug2 === void 0 ? void 0 : _slug2.replace(/(è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ)/g, "e");
116
+ slug = (_slug3 = slug) === null || _slug3 === void 0 ? void 0 : _slug3.replace(/(ì|í|ị|ỉ|ĩ)/g, "i");
117
+ slug = (_slug4 = slug) === null || _slug4 === void 0 ? void 0 : _slug4.replace(/(ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ)/g, "o");
118
+ slug = (_slug5 = slug) === null || _slug5 === void 0 ? void 0 : _slug5.replace(/(ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ)/g, "u");
119
+ slug = (_slug6 = slug) === null || _slug6 === void 0 ? void 0 : _slug6.replace(/(ỳ|ý|ỵ|ỷ|ỹ)/g, "y");
120
+ slug = (_slug7 = slug) === null || _slug7 === void 0 ? void 0 : _slug7.replace(/(đ)/g, "d");
121
+ slug = (_slug8 = slug) === null || _slug8 === void 0 ? void 0 : _slug8.replace(/([^0-9a-z-\s])/g, "");
122
+ slug = (_slug9 = slug) === null || _slug9 === void 0 ? void 0 : _slug9.replace(/(\s+)/g, "-");
123
+ slug = (_slug10 = slug) === null || _slug10 === void 0 ? void 0 : _slug10.replace(/^-+/g, "");
124
+ slug = (_slug11 = slug) === null || _slug11 === void 0 ? void 0 : _slug11.replace(/-+$/g, "");
123
125
  return slug + "-" + id;
124
126
  };
125
127
  var getLinkProductDetail = function getLinkProductDetail(product) {
@@ -130,6 +132,13 @@ var getLinkServiceDetail = function getLinkServiceDetail(product) {
130
132
  var slug = genProductSlug(product === null || product === void 0 ? void 0 : product.productName, product === null || product === void 0 ? void 0 : product.productId);
131
133
  return "/service/" + slug + "/" + (product === null || product === void 0 ? void 0 : product.shopId);
132
134
  };
135
+ var getLinkNewsDetail = function getLinkNewsDetail(news) {
136
+ var slug = genProductSlug(news === null || news === void 0 ? void 0 : news.title, news === null || news === void 0 ? void 0 : news.articleId);
137
+ return "/news_detail/" + slug + "/" + (news === null || news === void 0 ? void 0 : news.catId) + "/" + (news === null || news === void 0 ? void 0 : news.shopId);
138
+ };
139
+ var getLinkNewsByCategory = function getLinkNewsByCategory(news) {
140
+ return "/news_by_category/" + (news === null || news === void 0 ? void 0 : news.catId) + "/" + (news === null || news === void 0 ? void 0 : news.shopId);
141
+ };
133
142
  var LinkToPage = function LinkToPage(props) {
134
143
  var _props$Link = props.Link,
135
144
  Link = _props$Link === void 0 ? null : _props$Link,
@@ -872,12 +881,15 @@ var Hero1 = function Hero1(props) {
872
881
  }, /*#__PURE__*/React__default.createElement("div", {
873
882
  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]"
874
883
  }, /*#__PURE__*/React__default.createElement("div", {
875
- className: "text-xl text-center md:text-4xl lg:text-[40px] text-primary font-medium"
884
+ className: "text-xl text-center md:text-4xl lg:text-[40px] text-primary font-medium ",
885
+ style: {
886
+ lineHeight: "normal"
887
+ }
876
888
  }, 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", {
877
889
  className: "text-center md:text-2xl lg:text-3xl font-medium"
878
890
  }, 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, {
879
891
  Link: Link,
880
- 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)
892
+ 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) || "#"
881
893
  }, /*#__PURE__*/React__default.createElement(Button, {
882
894
  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,
883
895
  shopConfigStyle: shopConfigStyle
@@ -911,7 +923,7 @@ var Hero2 = function Hero2(props) {
911
923
  className: "relative"
912
924
  }, /*#__PURE__*/React__default.createElement("img", {
913
925
  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],
914
- className: "w-full object-cover min-h-[25vh] md:min-h-[30vh] max-h-[100vh]"
926
+ className: "w-full object-cover min-h-[30vh] md:min-h-[50vh] max-h-[100vh]"
915
927
  }), /*#__PURE__*/React__default.createElement("div", {
916
928
  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%]"
917
929
  }, /*#__PURE__*/React__default.createElement("img", {
@@ -931,7 +943,7 @@ var Hero5 = function Hero5(props) {
931
943
  className: "relative"
932
944
  }, /*#__PURE__*/React__default.createElement("img", {
933
945
  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],
934
- className: "w-full min-h-[25vh] md:min-h-[30vh] max-h-[100vh]"
946
+ className: "w-full min-h-[30vh] md:min-h-[50vh] max-h-[100vh]"
935
947
  }), /*#__PURE__*/React__default.createElement("div", {
936
948
  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"
937
949
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -952,7 +964,7 @@ var Hero6 = function Hero6(props) {
952
964
  className: "relative"
953
965
  }, /*#__PURE__*/React__default.createElement("img", {
954
966
  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],
955
- className: "w-full h-auto min-h-[25vh md:min-h-[30vh] max-h-[100vh]"
967
+ className: "w-full h-auto min-h-[30vh] md:min-h-[50vh] max-h-[100vh]"
956
968
  }), /*#__PURE__*/React__default.createElement("div", {
957
969
  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"
958
970
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -973,7 +985,9 @@ var Hero6 = function Hero6(props) {
973
985
  var Hero10 = function Hero10(props) {
974
986
  var _data$data, _data$data$, _data$data$$srcImages, _sectionData$, _sectionData$2, _sectionData$2$button;
975
987
  var shopConfigStyle = props.shopConfigStyle,
976
- data = props.data;
988
+ data = props.data,
989
+ _props$Link = props.Link,
990
+ Link = _props$Link === void 0 ? null : _props$Link;
977
991
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
978
992
  return /*#__PURE__*/React__default.createElement("div", {
979
993
  className: "relative w-full bg-cover bg-center bg-no-repeat ",
@@ -986,8 +1000,10 @@ var Hero10 = function Hero10(props) {
986
1000
  className: "relative w-full min-h-[540px] p-12 z-10 flex flex-col gap-6 items-center justify-center"
987
1001
  }, /*#__PURE__*/React__default.createElement("div", {
988
1002
  className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
989
- }, 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) {
990
- return /*#__PURE__*/React__default.createElement("a", {
1003
+ }, 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) {
1004
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
1005
+ Link: Link,
1006
+ key: "gdf-" + index,
991
1007
  href: (button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
992
1008
  }, /*#__PURE__*/React__default.createElement(Button, {
993
1009
  label: button === null || button === void 0 ? void 0 : button.label,
@@ -7354,7 +7370,7 @@ var Features3 = function Features3(props) {
7354
7370
  }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
7355
7371
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
7356
7372
  Link: Link,
7357
- href: (item === null || item === void 0 ? void 0 : item.link) || (item === null || item === void 0 ? void 0 : item.route)
7373
+ href: (item === null || item === void 0 ? void 0 : item.link) || (item === null || item === void 0 ? void 0 : item.route) || "#"
7358
7374
  }, /*#__PURE__*/React__default.createElement("div", {
7359
7375
  className: "grid grid-cols-2 p-3 rounded-lg font-semibold",
7360
7376
  key: "dfsdfj-" + index,
@@ -7849,12 +7865,14 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
7849
7865
  }));
7850
7866
  };
7851
7867
 
7852
- var NotFoundProduct = function NotFoundProduct() {
7868
+ var NotFoundProduct = function NotFoundProduct(props) {
7869
+ var _props$text = props.text,
7870
+ text = _props$text === void 0 ? "sản phẩm" : _props$text;
7853
7871
  return /*#__PURE__*/React__default.createElement("div", {
7854
7872
  className: "h-60 flex flex-col justify-center items-center text-xl text-gray3"
7855
7873
  }, /*#__PURE__*/React__default.createElement(FaBoxOpen, {
7856
7874
  size: 80
7857
- }), /*#__PURE__*/React__default.createElement("div", null, "Kh\xF4ng c\xF3 s\u1EA3n ph\u1EA9m"));
7875
+ }), /*#__PURE__*/React__default.createElement("div", null, "Kh\xF4ng c\xF3 ", text));
7858
7876
  };
7859
7877
 
7860
7878
  var TreatmentsList6 = function TreatmentsList6(props) {
@@ -7919,28 +7937,34 @@ var ModalNotification = function ModalNotification(props) {
7919
7937
  var onClose = props.onClose,
7920
7938
  onCloseFormBooking = props.onCloseFormBooking,
7921
7939
  _props$isButtonClose = props.isButtonClose,
7922
- isButtonClose = _props$isButtonClose === void 0 ? true : _props$isButtonClose;
7940
+ isButtonClose = _props$isButtonClose === void 0 ? true : _props$isButtonClose,
7941
+ _props$className = props.className,
7942
+ className = _props$className === void 0 ? "" : _props$className,
7943
+ _props$style = props.style,
7944
+ style = _props$style === void 0 ? {} : _props$style,
7945
+ _props$buttonClassNam = props.buttonClassName,
7946
+ buttonClassName = _props$buttonClassNam === void 0 ? "" : _props$buttonClassNam;
7923
7947
  var handleClickOutside = function handleClickOutside(event) {
7924
- if (modalRef.current && !modalRef.current.contains(event.target)) {
7925
- if (onClose) onClose();
7926
- if (onCloseFormBooking && typeof onCloseFormBooking === 'function') {
7927
- onCloseFormBooking();
7928
- }
7948
+ event.stopPropagation();
7949
+ if (onClose) {
7950
+ onClose === null || onClose === void 0 ? void 0 : onClose();
7951
+ }
7952
+ if (onCloseFormBooking && typeof onCloseFormBooking === 'function') {
7953
+ onCloseFormBooking();
7929
7954
  }
7930
7955
  };
7931
- useEffect(function () {
7932
- document.addEventListener('click', handleClickOutside);
7933
- return function () {
7934
- document.removeEventListener('click', handleClickOutside);
7935
- };
7936
- }, []);
7937
7956
  return /*#__PURE__*/React__default.createElement("div", {
7938
- className: "fixed inset-0 bg-black flex items-center justify-center bg-opacity-50 z-50 "
7957
+ className: "fixed inset-0 bg-black flex items-center justify-center bg-opacity-50 z-50 ",
7958
+ onClick: handleClickOutside
7939
7959
  }, /*#__PURE__*/React__default.createElement("div", {
7940
- className: " flex items-center justify-center relative bg-red",
7960
+ className: "flex items-center justify-center relative " + className,
7961
+ onClick: function onClick(e) {
7962
+ return e.stopPropagation();
7963
+ },
7964
+ style: style,
7941
7965
  ref: modalRef
7942
7966
  }, props === null || props === void 0 ? void 0 : props.children, isButtonClose && /*#__PURE__*/React__default.createElement("button", {
7943
- className: "absolute top-4 right-4",
7967
+ className: "absolute top-4 right-4 " + buttonClassName,
7944
7968
  onClick: onClose
7945
7969
  }, /*#__PURE__*/React__default.createElement(RxCross2, null))));
7946
7970
  };
@@ -8111,6 +8135,14 @@ var Select = forwardRef(function (props, ref) {
8111
8135
  setListOptions(options);
8112
8136
  if (!isMulti) setValue(defaultValue);
8113
8137
  }, [options]);
8138
+ useEffect(function () {
8139
+ var delayDebounceFn = setTimeout(function () {
8140
+ handleSearch === null || handleSearch === void 0 ? void 0 : handleSearch(inputSearch);
8141
+ }, 500);
8142
+ return function () {
8143
+ return clearTimeout(delayDebounceFn);
8144
+ };
8145
+ }, [inputSearch]);
8114
8146
  useEffect(function () {
8115
8147
  var _inputRef$current;
8116
8148
  inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
@@ -8187,11 +8219,9 @@ var Select = forwardRef(function (props, ref) {
8187
8219
  return true;
8188
8220
  }
8189
8221
  };
8190
- var handleSearch = function handleSearch(e) {
8191
- var searchValue = e.target.value;
8192
- setInputSearch(searchValue);
8222
+ var handleSearch = function handleSearch(searchValue) {
8193
8223
  if (handleSearchOption && typeof handleSearchOption === 'function') {
8194
- handleSearchOption(searchValue);
8224
+ handleSearchOption === null || handleSearchOption === void 0 ? void 0 : handleSearchOption(searchValue);
8195
8225
  } else {
8196
8226
  var listFilterOptions = options.filter(function (item) {
8197
8227
  var _item$label;
@@ -8279,7 +8309,7 @@ var Select = forwardRef(function (props, ref) {
8279
8309
  placeholder: "T\xECm ki\u1EBFm",
8280
8310
  value: inputSearch,
8281
8311
  onChange: function onChange(e) {
8282
- handleSearch(e);
8312
+ setInputSearch(e.target.value);
8283
8313
  }
8284
8314
  })) : 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) {
8285
8315
  return /*#__PURE__*/React__default.createElement("div", {
@@ -9074,9 +9104,10 @@ var TreatmentsList7 = function TreatmentsList7(props) {
9074
9104
  var renderItemSlide = function renderItemSlide(product, index) {
9075
9105
  var _product$productInfo, _product$productInfo2;
9076
9106
  return /*#__PURE__*/React__default.createElement("div", {
9077
- className: "w-full"
9107
+ className: "w-full",
9108
+ key: "shshf-" + index
9078
9109
  }, /*#__PURE__*/React__default.createElement("div", {
9079
- className: "grid grid-cols-1 md:grid-cols-2 gap-6 mt-12",
9110
+ className: "grid grid-cols-1 md:grid-cols-2 gap-6",
9080
9111
  key: index
9081
9112
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
9082
9113
  product: product === null || product === void 0 ? void 0 : product.productInfo,
@@ -9099,33 +9130,22 @@ var TreatmentsList7 = function TreatmentsList7(props) {
9099
9130
  }
9100
9131
  }))));
9101
9132
  };
9102
- function RenderArrow(props) {
9103
- var className = props.className,
9104
- style = props.style,
9105
- onClick = props.onClick;
9106
- return /*#__PURE__*/React__default.createElement("div", {
9107
- className: className,
9108
- style: _extends({}, style, {
9109
- display: "none"
9110
- }),
9111
- onClick: onClick
9112
- });
9113
- }
9114
9133
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
9115
9134
  className: "" + SECTION_DEFAULT_CLASS
9116
9135
  }, /*#__PURE__*/React__default.createElement(SectionTitle, {
9117
9136
  data: data,
9118
9137
  shopConfigStyle: shopConfigStyle
9119
- }), /*#__PURE__*/React__default.createElement(Slider, {
9120
- className: "center",
9138
+ }), /*#__PURE__*/React__default.createElement("div", {
9139
+ className: "mt-12 w-full"
9140
+ }, (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement(Slider, {
9121
9141
  infinite: true,
9122
9142
  slidesToShow: 1,
9143
+ slidesToScroll: 1,
9123
9144
  speed: 500,
9124
9145
  autoplay: true,
9125
9146
  autoplaySpeed: 4000,
9126
9147
  pauseOnHover: true,
9127
- nextArrow: /*#__PURE__*/React__default.createElement(RenderArrow, null),
9128
- prevArrow: /*#__PURE__*/React__default.createElement(RenderArrow, null),
9148
+ arrows: false,
9129
9149
  beforeChange: function beforeChange(oldIndex, newIndex) {
9130
9150
  return setCurrentSlide(newIndex);
9131
9151
  },
@@ -9139,6 +9159,8 @@ var TreatmentsList7 = function TreatmentsList7(props) {
9139
9159
  }
9140
9160
  }, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
9141
9161
  return renderItemSlide(product, index);
9162
+ })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, {
9163
+ text: "d\u1ECBch v\u1EE5"
9142
9164
  }))), /*#__PURE__*/React__default.createElement(Dash, {
9143
9165
  color: secondary
9144
9166
  }), isOpenModal ? /*#__PURE__*/React__default.createElement(ModalNotification, {
@@ -10668,7 +10690,7 @@ var BookingForm6 = function BookingForm6(props) {
10668
10690
  }), /*#__PURE__*/React__default.createElement("div", {
10669
10691
  className: "mt-12 grid grid-cols-1 gap-6 md:grid-cols-3 md:gap-12"
10670
10692
  }, /*#__PURE__*/React__default.createElement(LinkToPage, {
10671
- 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)
10693
+ 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) || "#"
10672
10694
  }, 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", {
10673
10695
  className: "text-primary w-full h-auto"
10674
10696
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10786,7 +10808,7 @@ var Banner3 = function Banner3(props) {
10786
10808
  }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
10787
10809
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
10788
10810
  Link: Link,
10789
- href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link),
10811
+ href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
10790
10812
  key: "djsd-" + index
10791
10813
  }, /*#__PURE__*/React__default.createElement("img", {
10792
10814
  src: item === null || item === void 0 ? void 0 : item.srcImage,
@@ -11066,7 +11088,7 @@ var Footer1 = function Footer1(props) {
11066
11088
  })) === null || _shopConfigStyle$navB2 === void 0 ? void 0 : _shopConfigStyle$navB2.map(function (route, index) {
11067
11089
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
11068
11090
  Link: Link,
11069
- href: route === null || route === void 0 ? void 0 : route.route,
11091
+ href: (route === null || route === void 0 ? void 0 : route.route) || "#",
11070
11092
  key: "dfjg-" + index
11071
11093
  }, /*#__PURE__*/React__default.createElement("div", null, route === null || route === void 0 ? void 0 : route.label));
11072
11094
  }))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
@@ -11180,7 +11202,9 @@ var Footer7 = function Footer7(props) {
11180
11202
  }, /*#__PURE__*/React__default.createElement("div", {
11181
11203
  className: "mb-4 font-semibold text-md md:text-lg"
11182
11204
  }, "Th\xF4ng tin li\xEAn h\u1EC7"), shopAddressList === null || shopAddressList === void 0 ? void 0 : shopAddressList.map(function (item, index) {
11183
- 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", {
11205
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
11206
+ key: "dlkhg-" + index
11207
+ }, /*#__PURE__*/React__default.createElement("div", null, "C\u01A1 s\u1EDF ", index + 1), /*#__PURE__*/React__default.createElement("div", {
11184
11208
  className: "flex gap-1"
11185
11209
  }, /*#__PURE__*/React__default.createElement(IoLocationOutline, {
11186
11210
  size: 24,
@@ -11205,7 +11229,7 @@ var Footer7 = function Footer7(props) {
11205
11229
  return e === null || e === void 0 ? void 0 : e.isShow;
11206
11230
  })) === null || _shopConfigStyle$navB2 === void 0 ? void 0 : _shopConfigStyle$navB2.map(function (route, index) {
11207
11231
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
11208
- href: route === null || route === void 0 ? void 0 : route.route,
11232
+ href: (route === null || route === void 0 ? void 0 : route.route) || "#",
11209
11233
  Link: Link,
11210
11234
  key: "fiddf-" + index
11211
11235
  }, /*#__PURE__*/React__default.createElement("div", null, route === null || route === void 0 ? void 0 : route.label));
@@ -11328,71 +11352,48 @@ var CustomerRating1 = function CustomerRating1(props) {
11328
11352
  var CustomerRating5 = function CustomerRating5(props) {
11329
11353
  var _props$data = props.data,
11330
11354
  data = _props$data === void 0 ? {} : _props$data;
11331
- var _useState = useState(0),
11332
- currentIndex = _useState[0],
11333
- setCurrentIndex = _useState[1];
11334
11355
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
11335
- var _useState2 = useState(0),
11336
- startX = _useState2[0],
11337
- setStartX = _useState2[1];
11338
- var _useState3 = useState(0),
11339
- endX = _useState3[0],
11340
- setEndX = _useState3[1];
11341
- var sliderRef = useRef();
11342
- var handleTouchStart = function handleTouchStart(e) {
11343
- var touchStart = e.touches[0].clientX;
11344
- setStartX(touchStart);
11345
- };
11346
- var handleTouchMove = function handleTouchMove(e) {
11347
- var touchMove = e.touches[0].clientX;
11348
- setEndX(touchMove);
11349
- };
11350
- var handleTouchEnd = function handleTouchEnd() {
11351
- var diff = startX - endX;
11352
- var threshold = sliderRef.current.offsetWidth / 3;
11353
- if (diff > threshold && currentIndex < sectionData.length - 1) {
11354
- setCurrentIndex(currentIndex + 1);
11355
- } else if (diff < -threshold && currentIndex > 0) {
11356
- setCurrentIndex(currentIndex - 1);
11357
- }
11358
- };
11356
+ var _useState = useState(0),
11357
+ currentSlide = _useState[0],
11358
+ setCurrentSlide = _useState[1];
11359
11359
  return /*#__PURE__*/React__default.createElement("div", {
11360
11360
  className: SECTION_CLASS + " mx-0 md:mx-4 xl:mx-20 rounded-xl pb-6 relative"
11361
11361
  }, /*#__PURE__*/React__default.createElement("div", {
11362
11362
  className: "absolute mt-16 inset-0 bg-bgSecondary [clip-path:polygon(0%_0%,_100%_30%,_100%_100%,_0%_100%)] z-0 rounded-3xl"
11363
11363
  }), /*#__PURE__*/React__default.createElement("div", {
11364
- className: "w-full relative z-10 border border-textHeading rounded-3xl flex overflow-hidden",
11365
- ref: sliderRef,
11366
- onTouchStart: handleTouchStart,
11367
- onTouchMove: handleTouchMove,
11368
- onTouchEnd: handleTouchEnd
11369
- }, /*#__PURE__*/React__default.createElement("div", {
11370
- className: "flex justify-start transition-transform duration-300",
11371
- style: {
11372
- transform: "translateX(-" + currentIndex * 100 + "%)"
11364
+ className: "w-full relative z-10 border border-textHeading rounded-3xl"
11365
+ }, /*#__PURE__*/React__default.createElement(Slider, {
11366
+ infinite: true,
11367
+ slidesToShow: 1,
11368
+ slidesToScroll: 1,
11369
+ speed: 500,
11370
+ autoplay: true,
11371
+ autoplaySpeed: 4000,
11372
+ pauseOnHover: true,
11373
+ arrows: false,
11374
+ beforeChange: function beforeChange(oldIndex, newIndex) {
11375
+ return setCurrentSlide(newIndex);
11376
+ },
11377
+ dots: true,
11378
+ customPaging: function customPaging(i) {
11379
+ return i === currentSlide ? /*#__PURE__*/React__default.createElement("div", {
11380
+ className: "w-4 h-1 rounded-full bg-primary mt-4"
11381
+ }) : /*#__PURE__*/React__default.createElement("div", {
11382
+ className: "w-4 h-1 rounded-full bg-gray-300 mt-4"
11383
+ });
11373
11384
  }
11374
11385
  }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
11375
11386
  return /*#__PURE__*/React__default.createElement("div", {
11376
- 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",
11387
+ className: "p-6 !flex !flex-col md:!flex-row gap-4 xl:gap-6",
11377
11388
  key: "lpky-" + index
11378
11389
  }, /*#__PURE__*/React__default.createElement("img", {
11379
11390
  src: item === null || item === void 0 ? void 0 : item.avatar,
11380
- className: "w-80 h-96 object-cover rounded-3xl"
11391
+ className: "w-full md:w-80 h-96 object-cover rounded-3xl"
11381
11392
  }), /*#__PURE__*/React__default.createElement("div", {
11382
- className: "flex flex-col items-center md:items-start gap-6 justify-center"
11393
+ className: "flex flex-col items-center md:items-start gap-4 lg:gap-6 justify-center"
11383
11394
  }, /*#__PURE__*/React__default.createElement("div", {
11384
11395
  className: "text-4xl font-semibold"
11385
- }, 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)));
11386
- })), /*#__PURE__*/React__default.createElement("div", {
11387
- 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"
11388
- }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (_, index) {
11389
- return /*#__PURE__*/React__default.createElement("div", {
11390
- key: "dot-" + index,
11391
- onClick: function onClick() {
11392
- setCurrentIndex(index);
11393
- },
11394
- className: (currentIndex === index ? "w-6 bg-primary" : "w-3 bg-gray4") + " h-3 rounded-full hover:opacity-80 cursor-pointer "
11395
- });
11396
+ }, 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, " ")));
11396
11397
  }))));
11397
11398
  };
11398
11399
 
@@ -11673,6 +11674,7 @@ var Breadcrumb1 = function Breadcrumb1(props) {
11673
11674
  label: "Trang chủ",
11674
11675
  route: "/"
11675
11676
  });
11677
+ console.log(items);
11676
11678
  setItems(items);
11677
11679
  };
11678
11680
  return /*#__PURE__*/React__default.createElement("div", {
@@ -11685,7 +11687,7 @@ var Breadcrumb1 = function Breadcrumb1(props) {
11685
11687
  className: "text-gray4"
11686
11688
  }, "/") : null, item !== null && item !== void 0 && item.route ? /*#__PURE__*/React__default.createElement(LinkToPage, {
11687
11689
  Link: Link,
11688
- href: item === null || item === void 0 ? void 0 : item.route,
11690
+ href: (item === null || item === void 0 ? void 0 : item.route) || "#",
11689
11691
  style: {
11690
11692
  color: textHeading
11691
11693
  }
@@ -12671,7 +12673,7 @@ var SearchBar2 = function SearchBar2(props) {
12671
12673
  backgroundSize: "cover"
12672
12674
  }
12673
12675
  }, /*#__PURE__*/React__default.createElement("div", {
12674
- className: "w-[100vw] md:w-[50vw] py-6 mx-auto px-6 flex flex-col h-full gap-4"
12676
+ className: "w-full md:w-1/2 py-6 mx-auto px-6 flex flex-col h-full gap-4"
12675
12677
  }, /*#__PURE__*/React__default.createElement(Input, {
12676
12678
  icons: /*#__PURE__*/React__default.createElement(IoSearchOutline, {
12677
12679
  className: "text-gray3"
@@ -12724,13 +12726,14 @@ var SearchBar5 = function SearchBar5(props) {
12724
12726
  }, data !== null && data !== void 0 && (_data$data2 = data.data) !== null && _data$data2 !== void 0 && _data$data2.title ? /*#__PURE__*/React__default.createElement("div", {
12725
12727
  className: "text-xl font-semibold md:text-3xl lg:text-4xl text-textButton text-center"
12726
12728
  }, 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", {
12727
- className: "text-center"
12729
+ className: "text-center text-textButton"
12728
12730
  }, 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, {
12729
12731
  onChange: setValue,
12730
12732
  icons: /*#__PURE__*/React__default.createElement(IoSearchOutline, {
12731
12733
  className: "text-gray3 ps-1 text-xl md:text-2xl"
12732
12734
  }),
12733
- className: "w-full bg-bgSecondary w-full md:w-[50vw] lg:w-[35vw] mb-2 md:h-12",
12735
+ wrapClassName: "w-full sm:w-[60%] md:w-[50%] lg:w-[40%]",
12736
+ className: "w-full bg-bgSecondary mb-2 md:h-12",
12734
12737
  style: {
12735
12738
  borderRadius: "32px"
12736
12739
  },
@@ -12751,8 +12754,7 @@ var SearchBar5 = function SearchBar5(props) {
12751
12754
 
12752
12755
  var SearchBar6 = function SearchBar6(props) {
12753
12756
  var _data$data, _data$data2, _data$data3, _data$data4, _data$data5;
12754
- var shopConfigStyle = props.shopConfigStyle,
12755
- _props$Link = props.Link,
12757
+ var _props$Link = props.Link,
12756
12758
  Link = _props$Link === void 0 ? null : _props$Link,
12757
12759
  data = props.data;
12758
12760
  var _useState = useState(""),
@@ -12768,14 +12770,15 @@ var SearchBar6 = function SearchBar6(props) {
12768
12770
  }, data !== null && data !== void 0 && (_data$data2 = data.data) !== null && _data$data2 !== void 0 && _data$data2.title ? /*#__PURE__*/React__default.createElement("div", {
12769
12771
  className: "text-lg font-semibold text-textBody md:text-2xl lg:text-3xl text-center"
12770
12772
  }, 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", {
12771
- className: "text-center"
12773
+ className: "text-center text-textBody"
12772
12774
  }, 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", {
12773
- className: "flex gap-2 md:gap-4 lg:gap-6 mb-2 md:mb-0"
12775
+ 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"
12774
12776
  }, /*#__PURE__*/React__default.createElement(Input, {
12775
12777
  icons: /*#__PURE__*/React__default.createElement(IoSearchOutline, {
12776
12778
  className: "text-gray3"
12777
12779
  }),
12778
- className: "w-full h-full md:h-12 w-full md:w-[70vw] bg-background lg:w-[50vw]",
12780
+ className: "w-full h-full",
12781
+ wrapClassName: " w-full h-full",
12779
12782
  inputClassName: "w-full",
12780
12783
  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",
12781
12784
  onChange: setValue
@@ -12784,12 +12787,10 @@ var SearchBar6 = function SearchBar6(props) {
12784
12787
  href: genLinkSearch(value)
12785
12788
  }, /*#__PURE__*/React__default.createElement(Button, {
12786
12789
  label: "T\xECm ki\u1EBFm",
12787
- className: "whitespace-nowrap h-full",
12788
- shopConfigStyle: shopConfigStyle
12790
+ className: "whitespace-nowrap h-full"
12789
12791
  })) : /*#__PURE__*/React__default.createElement(Button, {
12790
12792
  label: "T\xECm ki\u1EBFm",
12791
- className: "whitespace-nowrap ",
12792
- shopConfigStyle: shopConfigStyle
12793
+ className: "whitespace-nowrap "
12793
12794
  }))));
12794
12795
  };
12795
12796
 
@@ -12803,7 +12804,7 @@ var ShopHighlights2 = function ShopHighlights2(props) {
12803
12804
  }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
12804
12805
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
12805
12806
  Link: Link,
12806
- href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link)
12807
+ href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
12807
12808
  }, /*#__PURE__*/React__default.createElement("div", {
12808
12809
  className: "flex flex-col items-center text-center lg:px-3 gap-3",
12809
12810
  key: "kdf-" + index
@@ -12831,7 +12832,7 @@ var ShopHighlights5 = function ShopHighlights5(props) {
12831
12832
  className: SECTION_CLASS + " grid md:grid-cols-3 py-6 gap-4 lg:gap-6 bg-bgSecondary"
12832
12833
  }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
12833
12834
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
12834
- href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link),
12835
+ href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
12835
12836
  Link: Link
12836
12837
  }, /*#__PURE__*/React__default.createElement("div", {
12837
12838
  className: "flex flex-col items-center text-center md:px-3 lg:px-6 gap-3",
@@ -12877,7 +12878,7 @@ var ShopHighlights6 = function ShopHighlights6(props) {
12877
12878
  className: " w-44 h-0.5 rounded-full bg-primary"
12878
12879
  }), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.description), /*#__PURE__*/React__default.createElement(LinkToPage, {
12879
12880
  Link: Link,
12880
- href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link)
12881
+ href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
12881
12882
  }, /*#__PURE__*/React__default.createElement(Button, {
12882
12883
  shopConfigStyle: shopConfigStyle,
12883
12884
  label: item === null || item === void 0 ? void 0 : item.title
@@ -12905,10 +12906,9 @@ var ShopHighlights7 = function ShopHighlights7(props) {
12905
12906
  }), /*#__PURE__*/React__default.createElement("div", {
12906
12907
  className: "mt-6 grid grid-cols-3 gap-4 md:gap-8"
12907
12908
  }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
12908
- var _item, _item2;
12909
12909
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
12910
12910
  Link: Link,
12911
- href: ((_item = item) === null || _item === void 0 ? void 0 : _item.route) || ((_item2 = item) === null || _item2 === void 0 ? void 0 : _item2.link),
12911
+ href: (it === null || it === void 0 ? void 0 : it.route) || (it === null || it === void 0 ? void 0 : it.link) || "#",
12912
12912
  key: index,
12913
12913
  className: "pt-6 col-span-3 md:col-span-1"
12914
12914
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -12966,5 +12966,483 @@ var VideoFull1 = function VideoFull1(props) {
12966
12966
  })) : null);
12967
12967
  };
12968
12968
 
12969
- export { About1, About5, Address1, Banner1, Banner2, Banner3, Banner7, BannerFull1, BannerFull2, Booking1, BookingForm6, Breadcrumb1, Button, Carts1, Contact1, CustomerRating1, CustomerRating10, CustomerRating5, CustomerRating6, DateTimePicker, Employees1, Features2, Features3, Footer1, Footer7, Gallery1, Hero1, Hero10, Hero11 as Hero12, Hero13, Hero2, Hero5, Hero6, Input, InputPhoneNumber, Links1, ModalNotification, NavBar1, NavBar7, PageTitle1, Partner1, ProductCategory2, ProductDetail10, ProductHighlight1, ProductHot1, ProductHot3, ProductItem2, ProductItem3, ProductItem4, ProductItem5, ProductItem6, ProductItem7, ProductList5, ProductList7, ProductSale2, ProductSearch1, Products10, Products2, Products3, ProductsTop1, SearchBar2, SearchBar5, SearchBar6, SearchProduct1, SectionTitle1, SectionTitle2, SectionTitle3, Select$1 as Select, ServiceDetail1, ShopHighlights2, ShopHighlights5, ShopHighlights6, ShopHighlights7, TextArea, TreatmentDetail1, TreatmentItem1, TreatmentsCategory7, TreatmentsList6, TreatmentsList7, VideoFull1 };
12969
+ var getAllArticleNewsApi = function getAllArticleNewsApi(shopId, appId, landingShopConfigId, params) {
12970
+ if (params === void 0) {
12971
+ params = {};
12972
+ }
12973
+ return api({
12974
+ method: "get",
12975
+ url: "/landing/news/article/get-all-filter",
12976
+ params: _extends({
12977
+ shopId: shopId,
12978
+ appId: appId,
12979
+ landingShopConfigId: landingShopConfigId
12980
+ }, params)
12981
+ });
12982
+ };
12983
+ var getNewsDetailApi = function getNewsDetailApi(articleId, shopId, landingShopConfigId) {
12984
+ return api({
12985
+ method: "get",
12986
+ url: "/landing/news/article/" + articleId,
12987
+ params: {
12988
+ shopId: shopId,
12989
+ landingShopConfigId: landingShopConfigId,
12990
+ articleId: articleId
12991
+ }
12992
+ });
12993
+ };
12994
+
12995
+ var NewsController = function NewsController(props) {
12996
+ var shopConfig = props.shopConfig,
12997
+ params = props.params;
12998
+ var _useState = useState(false),
12999
+ loading = _useState[0],
13000
+ setLoading = _useState[1];
13001
+ var _useState2 = useState([]),
13002
+ newsArticles = _useState2[0],
13003
+ setNewsArticles = _useState2[1];
13004
+ var _useState3 = useState(),
13005
+ setPage = _useState3[1];
13006
+ useEffect(function () {
13007
+ if (shopConfig !== null && shopConfig !== void 0 && shopConfig.shopId && shopConfig !== null && shopConfig !== void 0 && shopConfig.landingShopConfigId) {
13008
+ getAllArticleNews();
13009
+ } else {
13010
+ setNewsArticles([]);
13011
+ setPage(null);
13012
+ }
13013
+ }, [shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingShopConfigId, params]);
13014
+ var getAllArticleNews = function getAllArticleNews() {
13015
+ try {
13016
+ setLoading(true);
13017
+ var _temp = _catch(function () {
13018
+ var defaultParams = {
13019
+ page: 0,
13020
+ size: 10,
13021
+ active: true
13022
+ };
13023
+ var filterParams = _extends({}, defaultParams, params);
13024
+ 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) {
13025
+ var _response$data, _response$data$status;
13026
+ 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) {
13027
+ var _response$data2, _response$data2$data, _response$data3, _response$data3$data;
13028
+ 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);
13029
+ 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);
13030
+ }
13031
+ setLoading(false);
13032
+ });
13033
+ }, function (error) {
13034
+ console.log(error);
13035
+ setLoading(false);
13036
+ });
13037
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
13038
+ } catch (e) {
13039
+ return Promise.reject(e);
13040
+ }
13041
+ };
13042
+ return {
13043
+ newsArticles: newsArticles,
13044
+ loading: loading
13045
+ };
13046
+ };
13047
+
13048
+ var DefaultImage$1 = function DefaultImage(props) {
13049
+ var _props$className = props.className,
13050
+ className = _props$className === void 0 ? "" : _props$className;
13051
+ return /*#__PURE__*/React__default.createElement("div", {
13052
+ className: "flex justify-center items-center max-w-full h-full aspect-video rounded-lg " + className,
13053
+ style: {
13054
+ backgroundColor: "#FAFAFA"
13055
+ }
13056
+ }, /*#__PURE__*/React__default.createElement(SvgImageGallery, {
13057
+ width: "25%",
13058
+ height: "25%",
13059
+ fill: "#D9D9D9"
13060
+ }));
13061
+ };
13062
+ var NewsImage = function NewsImage(props) {
13063
+ var _props$size2 = props.size,
13064
+ size = _props$size2 === void 0 ? 0 : _props$size2,
13065
+ _props$className2 = props.className,
13066
+ className = _props$className2 === void 0 ? "" : _props$className2,
13067
+ news = props.news;
13068
+ var _useState = useState(""),
13069
+ src = _useState[0],
13070
+ setSrc = _useState[1];
13071
+ useEffect(function () {
13072
+ getNewsImage();
13073
+ }, [news]);
13074
+ var getNewsImage = function getNewsImage() {
13075
+ var src = news === null || news === void 0 ? void 0 : news.thumbnail;
13076
+ setSrc(src);
13077
+ };
13078
+ return src ? /*#__PURE__*/React__default.createElement("img", {
13079
+ src: src,
13080
+ className: "h-full rounded-lg max-w-full aspect-video " + className,
13081
+ style: size ? {
13082
+ width: size,
13083
+ height: size
13084
+ } : null
13085
+ }) : /*#__PURE__*/React__default.createElement(DefaultImage$1, {
13086
+ className: className,
13087
+ size: size
13088
+ });
13089
+ };
13090
+
13091
+ var NewsHighlight1 = function NewsHighlight1(props) {
13092
+ var _newsArticles$, _newsArticles$2, _newsArticles$3, _newsArticles$slice;
13093
+ var _props$SectionTitle = props.SectionTitle,
13094
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
13095
+ _props$shopConfigStyl = props.shopConfigStyle,
13096
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
13097
+ _props$Link = props.Link,
13098
+ Link = _props$Link === void 0 ? null : _props$Link,
13099
+ data = props.data;
13100
+ var _useState = useState({
13101
+ tags: "HIGHLIGHT",
13102
+ page: 0,
13103
+ size: 6,
13104
+ sort: "timeUpdate,DESC"
13105
+ }),
13106
+ params = _useState[0];
13107
+ var _NewsController = NewsController(_extends({}, props, {
13108
+ params: params
13109
+ })),
13110
+ _NewsController$newsA = _NewsController.newsArticles,
13111
+ newsArticles = _NewsController$newsA === void 0 ? [] : _NewsController$newsA;
13112
+ return /*#__PURE__*/React__default.createElement("div", {
13113
+ className: "" + SECTION_CLASS
13114
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
13115
+ data: data,
13116
+ shopConfigStyle: shopConfigStyle
13117
+ }), /*#__PURE__*/React__default.createElement("div", {
13118
+ className: "mt-12 mb-6 grid grid-cols-1 md:grid-cols-2 gap-6 "
13119
+ }, /*#__PURE__*/React__default.createElement(LinkToPage, {
13120
+ href: getLinkNewsDetail(newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[0]),
13121
+ Link: Link
13122
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(NewsImage, {
13123
+ news: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[0]
13124
+ }), /*#__PURE__*/React__default.createElement("div", {
13125
+ className: "pt-3 font-medium text-lg"
13126
+ }, newsArticles === null || newsArticles === void 0 ? void 0 : (_newsArticles$ = newsArticles[0]) === null || _newsArticles$ === void 0 ? void 0 : _newsArticles$.title))), /*#__PURE__*/React__default.createElement("div", {
13127
+ className: "flex flex-col gap-6"
13128
+ }, /*#__PURE__*/React__default.createElement(LinkToPage, {
13129
+ className: "grid grid-cols-1 md:grid-cols-2 gap-4 ",
13130
+ href: getLinkNewsDetail(newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[1]),
13131
+ Link: Link
13132
+ }, /*#__PURE__*/React__default.createElement(NewsImage, {
13133
+ news: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[1]
13134
+ }), /*#__PURE__*/React__default.createElement("div", {
13135
+ className: "font-medium text-lg"
13136
+ }, 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, {
13137
+ className: "grid grid-cols-1 md:grid-cols-2 gap-4",
13138
+ href: getLinkNewsDetail(newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[2]),
13139
+ Link: Link
13140
+ }, /*#__PURE__*/React__default.createElement(NewsImage, {
13141
+ news: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[2]
13142
+ }), /*#__PURE__*/React__default.createElement("div", {
13143
+ className: "font-medium text-lg"
13144
+ }, 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", {
13145
+ className: "grid grid-cols-1 md:grid-cols-3 gap-6 mt-6 "
13146
+ }, 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) {
13147
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
13148
+ href: getLinkNewsDetail(item),
13149
+ Link: Link,
13150
+ key: "kdjf-" + index
13151
+ }, /*#__PURE__*/React__default.createElement("div", {
13152
+ className: "jgdfg-" + index
13153
+ }, /*#__PURE__*/React__default.createElement(NewsImage, {
13154
+ news: item
13155
+ }), /*#__PURE__*/React__default.createElement("div", {
13156
+ className: "font-medium text-lg py-2"
13157
+ }, item === null || item === void 0 ? void 0 : item.title)));
13158
+ })));
13159
+ };
13160
+
13161
+ var relativeTime = createCommonjsModule(function (module, exports) {
13162
+ !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)};}}));
13163
+ });
13164
+
13165
+ var vi = createCommonjsModule(function (module, exports) {
13166
+ !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),_}));
13167
+ });
13168
+
13169
+ var getAllNewsCategoriesApi = function getAllNewsCategoriesApi(shopId, landingShopConfigId, appId) {
13170
+ if (appId === void 0) {
13171
+ appId = "SSPA";
13172
+ }
13173
+ return api({
13174
+ method: "get",
13175
+ url: "/landing/news/category/get-all",
13176
+ params: {
13177
+ shopId: shopId,
13178
+ landingShopConfigId: landingShopConfigId,
13179
+ appId: appId,
13180
+ active: true
13181
+ }
13182
+ });
13183
+ };
13184
+
13185
+ var NewsCategoryController = function NewsCategoryController(props) {
13186
+ var params = props.params,
13187
+ shopConfig = props.shopConfig;
13188
+ var _useState = useState([]),
13189
+ newsCategories = _useState[0],
13190
+ setNewsCategories = _useState[1];
13191
+ useEffect(function () {
13192
+ if (shopConfig !== null && shopConfig !== void 0 && shopConfig.shopId && shopConfig !== null && shopConfig !== void 0 && shopConfig.landingShopConfigId) getAllNewsCategories();
13193
+ }, [shopConfig, params]);
13194
+ var getAllNewsCategories = function getAllNewsCategories() {
13195
+ try {
13196
+ var _temp = _catch(function () {
13197
+ 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) {
13198
+ var _res$data, _res$data$status;
13199
+ 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) {
13200
+ var _res$data2;
13201
+ setNewsCategories(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
13202
+ }
13203
+ });
13204
+ }, function (error) {
13205
+ console.log(error);
13206
+ });
13207
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
13208
+ } catch (e) {
13209
+ return Promise.reject(e);
13210
+ }
13211
+ };
13212
+ return {
13213
+ newsCategories: newsCategories
13214
+ };
13215
+ };
13216
+
13217
+ dayjs_min.extend(relativeTime);
13218
+ dayjs_min.locale("vi");
13219
+ var News1 = function News1(props) {
13220
+ var _newsArticles$slice;
13221
+ var _props$shopConfigStyl = props.shopConfigStyle,
13222
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
13223
+ _props$Link = props.Link,
13224
+ Link = _props$Link === void 0 ? null : _props$Link,
13225
+ _props$catId = props.catId,
13226
+ catId = _props$catId === void 0 ? "" : _props$catId;
13227
+ var _useState = useState({
13228
+ page: 0,
13229
+ sort: "timeUpdate,DESC",
13230
+ size: 10,
13231
+ catId: catId
13232
+ }),
13233
+ params = _useState[0],
13234
+ setParams = _useState[1];
13235
+ var _useState2 = useState({}),
13236
+ categorySelected = _useState2[0],
13237
+ setCategorySelected = _useState2[1];
13238
+ var _useState3 = useState(true),
13239
+ isSeeMore = _useState3[0],
13240
+ setIsSeeMore = _useState3[1];
13241
+ var _NewsController = NewsController(_extends({}, props, {
13242
+ params: params
13243
+ })),
13244
+ _NewsController$newsA = _NewsController.newsArticles,
13245
+ newsArticles = _NewsController$newsA === void 0 ? [] : _NewsController$newsA,
13246
+ loading = _NewsController.loading;
13247
+ var _NewsCategoryControll = NewsCategoryController(props),
13248
+ _NewsCategoryControll2 = _NewsCategoryControll.newsCategories,
13249
+ newsCategories = _NewsCategoryControll2 === void 0 ? [] : _NewsCategoryControll2;
13250
+ var handleSeeMoreNews = function handleSeeMoreNews() {
13251
+ setIsSeeMore(false);
13252
+ setParams(function (prev) {
13253
+ return _extends({}, prev, {
13254
+ size: (prev === null || prev === void 0 ? void 0 : prev.size) + 4
13255
+ });
13256
+ });
13257
+ };
13258
+ useEffect(function () {
13259
+ if ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) > 0 && params !== null && params !== void 0 && params.catId) {
13260
+ var category = newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.find(function (item) {
13261
+ return (item === null || item === void 0 ? void 0 : item.catId) == catId;
13262
+ });
13263
+ setCategorySelected(category);
13264
+ }
13265
+ }, [params === null || params === void 0 ? void 0 : params.catId, newsCategories]);
13266
+ return /*#__PURE__*/React__default.createElement("div", {
13267
+ className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-3 gap-6"
13268
+ }, /*#__PURE__*/React__default.createElement("div", {
13269
+ className: "md:col-span-2 flex flex-col gap-8"
13270
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
13271
+ className: "px-6 py-3 text-textButton text-lg rounded-t-lg bg-primary w-max"
13272
+ }, params !== null && params !== void 0 && params.catId ? categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catName : "Tin mới"), /*#__PURE__*/React__default.createElement("div", {
13273
+ className: "w-full border border-primary"
13274
+ })), loading & isSeeMore ? /*#__PURE__*/React__default.createElement("div", {
13275
+ className: "w-full h-80 flex justify-center items-center"
13276
+ }, /*#__PURE__*/React__default.createElement(Loading, null)) : /*#__PURE__*/React__default.createElement("div", {
13277
+ className: "flex flex-col gap-8"
13278
+ }, (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) {
13279
+ var _dayjs;
13280
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
13281
+ href: getLinkNewsDetail(item),
13282
+ Link: Link,
13283
+ key: "kghf-" + index
13284
+ }, /*#__PURE__*/React__default.createElement("div", {
13285
+ className: "grid grid-cols-2 gap-2 md:gap-4 cursor-pointer",
13286
+ key: "djfsdf-" + index
13287
+ }, /*#__PURE__*/React__default.createElement(NewsImage, {
13288
+ news: item
13289
+ }), /*#__PURE__*/React__default.createElement("div", {
13290
+ className: "flex flex-col gap-2 md:gap-3 pb-4"
13291
+ }, /*#__PURE__*/React__default.createElement("div", {
13292
+ className: "font-medium text-lg md:text-xl line-clamp-2"
13293
+ }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
13294
+ className: "line-clamp-3 font-normal min-h-6 md:min-h-20 text-gray3"
13295
+ }, item === null || item === void 0 ? void 0 : item.shortDescription), /*#__PURE__*/React__default.createElement("div", {
13296
+ className: " text-gray3"
13297
+ }, (_dayjs = dayjs_min(item === null || item === void 0 ? void 0 : item.timeUpdate)) === null || _dayjs === void 0 ? void 0 : _dayjs.fromNow()))));
13298
+ }) : /*#__PURE__*/React__default.createElement("div", {
13299
+ className: "w-full h-64 flex flex-col justify-center items-center text-gray3"
13300
+ }, /*#__PURE__*/React__default.createElement(GiNewspaper, {
13301
+ size: 80
13302
+ }), " 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, {
13303
+ label: "Xem th\xEAm",
13304
+ shopConfigStyle: shopConfigStyle,
13305
+ onClick: handleSeeMoreNews,
13306
+ className: "w-max mx-auto"
13307
+ }) : null)), /*#__PURE__*/React__default.createElement("div", {
13308
+ className: "sticky top-20 self-start"
13309
+ }, /*#__PURE__*/React__default.createElement("div", {
13310
+ className: "px-6 py-3 bg-primary rounded-t-lg text-lg text-textButton text-center"
13311
+ }, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
13312
+ className: "rounded-b-lg bg-bgSecondary"
13313
+ }, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {
13314
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
13315
+ href: getLinkNewsByCategory(item),
13316
+ Link: Link,
13317
+ key: "fjhnfg-" + index
13318
+ }, /*#__PURE__*/React__default.createElement("div", {
13319
+ className: "px-6 py-3 hover:bg-gray-100 hover:text-primary cursor-pointer",
13320
+ key: "sdjfdh-" + index
13321
+ }, item === null || item === void 0 ? void 0 : item.catName));
13322
+ }))));
13323
+ };
13324
+
13325
+ var NewsDetailController = function NewsDetailController(props) {
13326
+ var shopConfig = props.shopConfig,
13327
+ _props$articleId = props.articleId,
13328
+ articleId = _props$articleId === void 0 ? 0 : _props$articleId;
13329
+ var _useState = useState(),
13330
+ article = _useState[0],
13331
+ setArticle = _useState[1];
13332
+ useEffect(function () {
13333
+ if (articleId) {
13334
+ getProductDetail();
13335
+ }
13336
+ }, [articleId]);
13337
+ var getProductDetail = function getProductDetail() {
13338
+ try {
13339
+ var _temp = _catch(function () {
13340
+ 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) {
13341
+ var _res$data, _res$data$status;
13342
+ 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) {
13343
+ var _res$data2;
13344
+ setArticle(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
13345
+ }
13346
+ });
13347
+ }, function (e) {
13348
+ console.log(e);
13349
+ });
13350
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
13351
+ } catch (e) {
13352
+ return Promise.reject(e);
13353
+ }
13354
+ };
13355
+ return {
13356
+ article: article
13357
+ };
13358
+ };
13359
+
13360
+ dayjs_min.extend(relativeTime);
13361
+ dayjs_min.locale("vi");
13362
+ var NewsDetail1 = function NewsDetail1(props) {
13363
+ var shopConfigStyle = props.shopConfigStyle,
13364
+ _props$catId = props.catId,
13365
+ catId = _props$catId === void 0 ? 0 : _props$catId,
13366
+ _props$Link = props.Link,
13367
+ Link = _props$Link === void 0 ? null : _props$Link;
13368
+ var _useState = useState({
13369
+ catId: catId,
13370
+ szie: 10
13371
+ }),
13372
+ params = _useState[0],
13373
+ setParams = _useState[1];
13374
+ var _NewsDetailController = NewsDetailController(props),
13375
+ _NewsDetailController2 = _NewsDetailController.article,
13376
+ article = _NewsDetailController2 === void 0 ? {} : _NewsDetailController2;
13377
+ var _NewsCategoryControll = NewsCategoryController(props),
13378
+ _NewsCategoryControll2 = _NewsCategoryControll.newsCategories,
13379
+ newsCategories = _NewsCategoryControll2 === void 0 ? [] : _NewsCategoryControll2;
13380
+ var _NewsController = NewsController(_extends({}, props, {
13381
+ params: params
13382
+ })),
13383
+ _NewsController$newsA = _NewsController.newsArticles,
13384
+ newsArticles = _NewsController$newsA === void 0 ? [] : _NewsController$newsA;
13385
+ var handleSeeMore = function handleSeeMore() {
13386
+ setParams(function (prev) {
13387
+ return _extends({}, prev, {
13388
+ size: (prev === null || prev === void 0 ? void 0 : prev.size) + 4
13389
+ });
13390
+ });
13391
+ };
13392
+ return /*#__PURE__*/React__default.createElement("div", {
13393
+ className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-3 mt-0 md:mt-0 gap-6"
13394
+ }, /*#__PURE__*/React__default.createElement("div", {
13395
+ className: "md:col-span-2 flex flex-col gap-4"
13396
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
13397
+ className: "text-2xl font-medium"
13398
+ }, article === null || article === void 0 ? void 0 : article.title), /*#__PURE__*/React__default.createElement("div", {
13399
+ className: "flex items-center gap-2 text-gray3 mt-2"
13400
+ }, /*#__PURE__*/React__default.createElement(GoClock, null), dayjs_min(article === null || article === void 0 ? void 0 : article.timeUpdate).fromNow())), /*#__PURE__*/React__default.createElement("div", {
13401
+ className: "text-gray2"
13402
+ }, article === null || article === void 0 ? void 0 : article.shortDescription), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(NewsImage, {
13403
+ news: article
13404
+ })), /*#__PURE__*/React__default.createElement("div", {
13405
+ dangerouslySetInnerHTML: {
13406
+ __html: article === null || article === void 0 ? void 0 : article.content
13407
+ }
13408
+ }), /*#__PURE__*/React__default.createElement("div", {
13409
+ className: "mt-6"
13410
+ }, /*#__PURE__*/React__default.createElement("div", {
13411
+ className: "font-medium text-2xl mb-4"
13412
+ }, "Tin c\xF9ng chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
13413
+ className: "grid grid-cols-1 md:grid-cols-2 gap-6"
13414
+ }, newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles.map(function (item, index) {
13415
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
13416
+ href: getLinkNewsDetail(item),
13417
+ Link: Link,
13418
+ key: "kghf-" + index
13419
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(NewsImage, {
13420
+ news: item
13421
+ }), /*#__PURE__*/React__default.createElement("div", {
13422
+ className: "font-medium text-lg line-clamp-2"
13423
+ }, item === null || item === void 0 ? void 0 : item.title)));
13424
+ })), (newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement("div", {
13425
+ className: "flex justify-center mt-4 w-full"
13426
+ }, /*#__PURE__*/React__default.createElement(Button, {
13427
+ label: "Xem thêm",
13428
+ onClick: handleSeeMore,
13429
+ shopConfigStyle: shopConfigStyle
13430
+ })) : null)), /*#__PURE__*/React__default.createElement("div", {
13431
+ className: "sticky top-20 self-start"
13432
+ }, /*#__PURE__*/React__default.createElement("div", {
13433
+ className: "px-6 py-3 bg-primary rounded-t-lg text-lg text-textButton text-center"
13434
+ }, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
13435
+ className: "rounded-b-lg bg-bgSecondary"
13436
+ }, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {
13437
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
13438
+ href: getLinkNewsByCategory(item),
13439
+ Link: Link
13440
+ }, /*#__PURE__*/React__default.createElement("div", {
13441
+ className: "px-6 py-3 hover:bg-gray-100 hover:text-primary cursor-pointer",
13442
+ key: "sdjfdh-" + index
13443
+ }, item === null || item === void 0 ? void 0 : item.catName));
13444
+ }))));
13445
+ };
13446
+
13447
+ export { About1, About5, Address1, Banner1, Banner2, Banner3, Banner7, BannerFull1, BannerFull2, Booking1, BookingForm6, Breadcrumb1, Button, Carts1, Contact1, CustomerRating1, CustomerRating10, CustomerRating5, CustomerRating6, DateTimePicker, Employees1, Features2, Features3, Footer1, Footer7, Gallery1, Hero1, Hero10, Hero11 as Hero12, Hero13, Hero2, Hero5, Hero6, Input, InputPhoneNumber, Links1, ModalNotification, NavBar1, NavBar7, News1, NewsDetail1, NewsHighlight1, PageTitle1, Partner1, ProductCategory2, ProductDetail10, ProductHighlight1, ProductHot1, ProductHot3, ProductItem2, ProductItem3, ProductItem4, ProductItem5, ProductItem6, ProductItem7, ProductList5, ProductList7, ProductSale2, ProductSearch1, Products10, Products2, Products3, ProductsTop1, SearchBar2, SearchBar5, SearchBar6, SearchProduct1, SectionTitle1, SectionTitle2, SectionTitle3, Select$1 as Select, ServiceDetail1, ShopHighlights2, ShopHighlights5, ShopHighlights6, ShopHighlights7, TextArea, TreatmentDetail1, TreatmentItem1, TreatmentsCategory7, TreatmentsList6, TreatmentsList7, VideoFull1 };
12970
13448
  //# sourceMappingURL=index.modern.js.map