s-platform-landing-section 0.1.17 → 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.
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,
@@ -36,7 +37,7 @@ var Button = function Button(props) {
36
37
  _props$type = props.type,
37
38
  type = _props$type === void 0 ? "primary" : _props$type;
38
39
  var _className = type === "primary" ? "text-textButton bg-primary" : "text-primary border border-primary";
39
- _className = "font-medium rounded-lg text-sm px-3 py-2 md:px-4 md:py-2.5 hover:text-textButton hover:bg-primary hover:opacity-80 " + _className + " " + ((shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass) || "") + " " + className;
40
+ _className = "font-medium rounded-lg text-sm px-3 py-2 md:px-4 md:py-2.5 hover:text-textButton hover:bg-primary hover:opacity-80 " + _className + " " + className + " " + ((shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass) || "");
40
41
  return /*#__PURE__*/React__default.createElement("button", {
41
42
  type: "button",
42
43
  className: _className,
@@ -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,
@@ -376,20 +385,38 @@ var NavBar7 = function NavBar7(props) {
376
385
  onClick: function onClick(event) {
377
386
  return event.stopPropagation();
378
387
  }
379
- }, /*#__PURE__*/React__default.createElement("button", {
380
- className: "flex w-full justify-end text-gray4",
388
+ }, /*#__PURE__*/React__default.createElement("div", {
389
+ className: "flex justify-between"
390
+ }, /*#__PURE__*/React__default.createElement("div", {
391
+ className: "flex gap-2 items-center"
392
+ }, /*#__PURE__*/React__default.createElement(LinkToPage, {
393
+ Link: Link,
394
+ href: "/",
395
+ onClick: function onClick() {
396
+ return setIsOpen(false);
397
+ }
398
+ }, /*#__PURE__*/React__default.createElement("img", {
399
+ src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
400
+ className: "h-14 w-14 bg-cover bg-no-repeat"
401
+ })), /*#__PURE__*/React__default.createElement("div", {
402
+ className: "text-xl font-semibold line-clamp-1"
403
+ }, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName)), /*#__PURE__*/React__default.createElement("button", {
404
+ className: "text-gray4",
381
405
  onClick: function onClick() {
382
406
  setIsOpen(false);
383
407
  }
384
408
  }, /*#__PURE__*/React__default.createElement(rx.RxCross2, {
385
409
  size: 24
386
- })), /*#__PURE__*/React__default.createElement("div", null, shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : (_shopConfigStyle$navB3 = shopConfigStyle.navBarMenus) === null || _shopConfigStyle$navB3 === void 0 ? void 0 : (_shopConfigStyle$navB4 = _shopConfigStyle$navB3.filter(function (e) {
410
+ }))), /*#__PURE__*/React__default.createElement("div", null, shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : (_shopConfigStyle$navB3 = shopConfigStyle.navBarMenus) === null || _shopConfigStyle$navB3 === void 0 ? void 0 : (_shopConfigStyle$navB4 = _shopConfigStyle$navB3.filter(function (e) {
387
411
  return e === null || e === void 0 ? void 0 : e.isShow;
388
412
  })) === null || _shopConfigStyle$navB4 === void 0 ? void 0 : _shopConfigStyle$navB4.map(function (item, index) {
389
413
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
390
414
  Link: Link,
391
415
  href: item === null || item === void 0 ? void 0 : item.route,
392
- key: index
416
+ key: index,
417
+ onClick: function onClick() {
418
+ return setIsOpen(false);
419
+ }
393
420
  }, /*#__PURE__*/React__default.createElement("div", {
394
421
  className: "py-2 " + ((item === null || item === void 0 ? void 0 : item.name) === (route === null || route === void 0 ? void 0 : route.name) ? "text-textHeading" : "")
395
422
  }, item === null || item === void 0 ? void 0 : item.label));
@@ -580,10 +607,16 @@ var NavBar1 = function NavBar1(props) {
580
607
  className: "flex justify-between"
581
608
  }, /*#__PURE__*/React__default.createElement("div", {
582
609
  className: "flex gap-2 items-center"
610
+ }, /*#__PURE__*/React__default.createElement(LinkToPage, {
611
+ Link: Link,
612
+ href: "/",
613
+ onClick: function onClick() {
614
+ return setIsOpen(false);
615
+ }
583
616
  }, /*#__PURE__*/React__default.createElement("img", {
584
617
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
585
618
  className: "h-14 w-14 bg-cover bg-no-repeat"
586
- }), /*#__PURE__*/React__default.createElement("div", {
619
+ })), /*#__PURE__*/React__default.createElement("div", {
587
620
  className: "text-xl font-semibold line-clamp-1"
588
621
  }, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName)), /*#__PURE__*/React__default.createElement("button", {
589
622
  className: "text-gray4",
@@ -598,7 +631,10 @@ var NavBar1 = function NavBar1(props) {
598
631
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
599
632
  Link: Link,
600
633
  href: item === null || item === void 0 ? void 0 : item.route,
601
- key: index
634
+ key: index,
635
+ onClick: function onClick() {
636
+ return setIsOpen(false);
637
+ }
602
638
  }, /*#__PURE__*/React__default.createElement("div", {
603
639
  className: "py-2 " + ((item === null || item === void 0 ? void 0 : item.name) === (route === null || route === void 0 ? void 0 : route.name) ? "text-textHeading" : "")
604
640
  }, item === null || item === void 0 ? void 0 : item.label));
@@ -787,7 +823,7 @@ var Input = React.forwardRef(function (props, ref) {
787
823
  setTypeInput("text");
788
824
  }
789
825
  };
790
- var _className = "h-9 md:h-10 py-1 px-2 border border-stroke rounded-lg " + className;
826
+ var _className = "h-10 py-1 px-2 border border-stroke rounded-lg " + className;
791
827
  var _inputClassName = (isQuantity ? "text-center w-12" : "") + " focus:outline-none focus:ring-0 bg-transparent\t " + inputClassName;
792
828
  var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
793
829
  return (e === null || e === void 0 ? void 0 : e.type) === "required";
@@ -831,7 +867,7 @@ var Input = React.forwardRef(function (props, ref) {
831
867
  });
832
868
 
833
869
  var Hero1 = function Hero1(props) {
834
- var _sectionData$, _sectionData$$srcImag, _sectionData$2, _sectionData$3, _sectionData$4, _sectionData$4$button, _sectionData$4$button2, _sectionData$5, _sectionData$5$button, _sectionData$5$button2;
870
+ var _sectionData$, _sectionData$$srcImag, _sectionData$2, _sectionData$3, _sectionData$4, _sectionData$4$button, _sectionData$4$button2, _sectionData$5, _sectionData$5$button, _sectionData$5$button2, _sectionData$6, _sectionData$6$button, _sectionData$6$button2;
835
871
  var shopConfigStyle = props.shopConfigStyle,
836
872
  data = props.data,
837
873
  _props$Link = props.Link,
@@ -848,14 +884,17 @@ var Hero1 = function Hero1(props) {
848
884
  }, /*#__PURE__*/React__default.createElement("div", {
849
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]"
850
886
  }, /*#__PURE__*/React__default.createElement("div", {
851
- 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
+ }
852
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", {
853
892
  className: "text-center md:text-2xl lg:text-3xl font-medium"
854
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, {
855
894
  Link: Link,
856
- 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.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) || "#"
857
896
  }, /*#__PURE__*/React__default.createElement(Button, {
858
- label: 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.label,
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,
859
898
  shopConfigStyle: shopConfigStyle
860
899
  })), " "), /*#__PURE__*/React__default.createElement("div", {
861
900
  className: "w-[90%] md:w-2/3 xl:w-1/2 bg-background flex gap-2 md:gap-4 lg:gap-6 p-2 md:p-4 lg:p-6 rounded-xl absolute bottom-[-40px] shadow-lg"
@@ -887,7 +926,7 @@ var Hero2 = function Hero2(props) {
887
926
  className: "relative"
888
927
  }, /*#__PURE__*/React__default.createElement("img", {
889
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],
890
- 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]"
891
930
  }), /*#__PURE__*/React__default.createElement("div", {
892
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%]"
893
932
  }, /*#__PURE__*/React__default.createElement("img", {
@@ -907,7 +946,7 @@ var Hero5 = function Hero5(props) {
907
946
  className: "relative"
908
947
  }, /*#__PURE__*/React__default.createElement("img", {
909
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],
910
- 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]"
911
950
  }), /*#__PURE__*/React__default.createElement("div", {
912
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"
913
952
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -920,13 +959,15 @@ var Hero5 = function Hero5(props) {
920
959
  var Hero6 = function Hero6(props) {
921
960
  var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$, _sectionData$, _sectionData$$buttons;
922
961
  var shopConfigStyle = props.shopConfigStyle,
923
- data = props.data;
962
+ data = props.data,
963
+ _props$Link = props.Link,
964
+ Link = _props$Link === void 0 ? null : _props$Link;
924
965
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
925
966
  return /*#__PURE__*/React__default.createElement("div", {
926
967
  className: "relative"
927
968
  }, /*#__PURE__*/React__default.createElement("img", {
928
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],
929
- 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]"
930
971
  }), /*#__PURE__*/React__default.createElement("div", {
931
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"
932
973
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -934,7 +975,8 @@ var Hero6 = function Hero6(props) {
934
975
  }, 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$.title), /*#__PURE__*/React__default.createElement("div", {
935
976
  className: "md:text-xl"
936
977
  }, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.description), sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : (_sectionData$$buttons = _sectionData$.buttons) === null || _sectionData$$buttons === void 0 ? void 0 : _sectionData$$buttons.map(function (button) {
937
- return /*#__PURE__*/React__default.createElement("a", {
978
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
979
+ Link: Link,
938
980
  href: (button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
939
981
  }, /*#__PURE__*/React__default.createElement(Button, {
940
982
  label: button === null || button === void 0 ? void 0 : button.label,
@@ -946,7 +988,9 @@ var Hero6 = function Hero6(props) {
946
988
  var Hero10 = function Hero10(props) {
947
989
  var _data$data, _data$data$, _data$data$$srcImages, _sectionData$, _sectionData$2, _sectionData$2$button;
948
990
  var shopConfigStyle = props.shopConfigStyle,
949
- data = props.data;
991
+ data = props.data,
992
+ _props$Link = props.Link,
993
+ Link = _props$Link === void 0 ? null : _props$Link;
950
994
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
951
995
  return /*#__PURE__*/React__default.createElement("div", {
952
996
  className: "relative w-full bg-cover bg-center bg-no-repeat ",
@@ -959,8 +1003,10 @@ var Hero10 = function Hero10(props) {
959
1003
  className: "relative w-full min-h-[540px] p-12 z-10 flex flex-col gap-6 items-center justify-center"
960
1004
  }, /*#__PURE__*/React__default.createElement("div", {
961
1005
  className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
962
- }, 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) {
963
- 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,
964
1010
  href: (button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
965
1011
  }, /*#__PURE__*/React__default.createElement(Button, {
966
1012
  label: button === null || button === void 0 ? void 0 : button.label,
@@ -1060,13 +1106,13 @@ var CarouselItem = function CarouselItem(props) {
1060
1106
  })))), isNavigateButton ? /*#__PURE__*/React__default.createElement("div", {
1061
1107
  className: "hidden my-auto col-span-5 md:col-span-3 lg:col-span-2 gap-4 md:flex justify-end "
1062
1108
  }, /*#__PURE__*/React__default.createElement("button", {
1063
- className: "p-2 h-full w-10 md:w-12 rounded-full " + (isScrolledToRight ? "bg-gray5" : "bg-primary"),
1109
+ className: "p-2 h-full w-10 h-10 md:h-12 md:w-12 rounded-full " + (isScrolledToRight ? "bg-gray5" : "bg-primary"),
1064
1110
  onClick: handleClickPrevImg
1065
1111
  }, /*#__PURE__*/React__default.createElement(io.IoIosArrowBack, {
1066
1112
  size: 32,
1067
1113
  className: "inline-block text-lg text-textButton"
1068
1114
  })), /*#__PURE__*/React__default.createElement("button", {
1069
- className: " p-2 h-full w-10 md:w-12 rounded-full " + (isScrolledToRight ? "bg-primary" : "bg-gray5"),
1115
+ className: " p-2 h-full w-10 h-10 md:h-12 md:w-12 rounded-full " + (isScrolledToRight ? "bg-primary" : "bg-gray5"),
1070
1116
  onClick: handleClickNextImg
1071
1117
  }, /*#__PURE__*/React__default.createElement(io.IoIosArrowForward, {
1072
1118
  size: 32,
@@ -7327,7 +7373,7 @@ var Features3 = function Features3(props) {
7327
7373
  }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
7328
7374
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
7329
7375
  Link: Link,
7330
- 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) || "#"
7331
7377
  }, /*#__PURE__*/React__default.createElement("div", {
7332
7378
  className: "grid grid-cols-2 p-3 rounded-lg font-semibold",
7333
7379
  key: "dfsdfj-" + index,
@@ -7822,12 +7868,14 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
7822
7868
  }));
7823
7869
  };
7824
7870
 
7825
- 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;
7826
7874
  return /*#__PURE__*/React__default.createElement("div", {
7827
7875
  className: "h-60 flex flex-col justify-center items-center text-xl text-gray3"
7828
7876
  }, /*#__PURE__*/React__default.createElement(fa.FaBoxOpen, {
7829
7877
  size: 80
7830
- }), /*#__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));
7831
7879
  };
7832
7880
 
7833
7881
  var TreatmentsList6 = function TreatmentsList6(props) {
@@ -7892,28 +7940,34 @@ var ModalNotification = function ModalNotification(props) {
7892
7940
  var onClose = props.onClose,
7893
7941
  onCloseFormBooking = props.onCloseFormBooking,
7894
7942
  _props$isButtonClose = props.isButtonClose,
7895
- 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;
7896
7950
  var handleClickOutside = function handleClickOutside(event) {
7897
- if (modalRef.current && !modalRef.current.contains(event.target)) {
7898
- if (onClose) onClose();
7899
- if (onCloseFormBooking && typeof onCloseFormBooking === 'function') {
7900
- onCloseFormBooking();
7901
- }
7951
+ event.stopPropagation();
7952
+ if (onClose) {
7953
+ onClose === null || onClose === void 0 ? void 0 : onClose();
7954
+ }
7955
+ if (onCloseFormBooking && typeof onCloseFormBooking === 'function') {
7956
+ onCloseFormBooking();
7902
7957
  }
7903
7958
  };
7904
- React.useEffect(function () {
7905
- document.addEventListener('click', handleClickOutside);
7906
- return function () {
7907
- document.removeEventListener('click', handleClickOutside);
7908
- };
7909
- }, []);
7910
7959
  return /*#__PURE__*/React__default.createElement("div", {
7911
- 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
7912
7962
  }, /*#__PURE__*/React__default.createElement("div", {
7913
- 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,
7914
7968
  ref: modalRef
7915
7969
  }, props === null || props === void 0 ? void 0 : props.children, isButtonClose && /*#__PURE__*/React__default.createElement("button", {
7916
- className: "absolute top-4 right-4",
7970
+ className: "absolute top-4 right-4 " + buttonClassName,
7917
7971
  onClick: onClose
7918
7972
  }, /*#__PURE__*/React__default.createElement(rx.RxCross2, null))));
7919
7973
  };
@@ -8084,6 +8138,14 @@ var Select = React.forwardRef(function (props, ref) {
8084
8138
  setListOptions(options);
8085
8139
  if (!isMulti) setValue(defaultValue);
8086
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]);
8087
8149
  React.useEffect(function () {
8088
8150
  var _inputRef$current;
8089
8151
  inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
@@ -8160,11 +8222,9 @@ var Select = React.forwardRef(function (props, ref) {
8160
8222
  return true;
8161
8223
  }
8162
8224
  };
8163
- var handleSearch = function handleSearch(e) {
8164
- var searchValue = e.target.value;
8165
- setInputSearch(searchValue);
8225
+ var handleSearch = function handleSearch(searchValue) {
8166
8226
  if (handleSearchOption && typeof handleSearchOption === 'function') {
8167
- handleSearchOption(searchValue);
8227
+ handleSearchOption === null || handleSearchOption === void 0 ? void 0 : handleSearchOption(searchValue);
8168
8228
  } else {
8169
8229
  var listFilterOptions = options.filter(function (item) {
8170
8230
  var _item$label;
@@ -8252,7 +8312,7 @@ var Select = React.forwardRef(function (props, ref) {
8252
8312
  placeholder: "T\xECm ki\u1EBFm",
8253
8313
  value: inputSearch,
8254
8314
  onChange: function onChange(e) {
8255
- handleSearch(e);
8315
+ setInputSearch(e.target.value);
8256
8316
  }
8257
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) {
8258
8318
  return /*#__PURE__*/React__default.createElement("div", {
@@ -9047,9 +9107,10 @@ var TreatmentsList7 = function TreatmentsList7(props) {
9047
9107
  var renderItemSlide = function renderItemSlide(product, index) {
9048
9108
  var _product$productInfo, _product$productInfo2;
9049
9109
  return /*#__PURE__*/React__default.createElement("div", {
9050
- className: "w-full"
9110
+ className: "w-full",
9111
+ key: "shshf-" + index
9051
9112
  }, /*#__PURE__*/React__default.createElement("div", {
9052
- 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",
9053
9114
  key: index
9054
9115
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
9055
9116
  product: product === null || product === void 0 ? void 0 : product.productInfo,
@@ -9072,33 +9133,22 @@ var TreatmentsList7 = function TreatmentsList7(props) {
9072
9133
  }
9073
9134
  }))));
9074
9135
  };
9075
- function RenderArrow(props) {
9076
- var className = props.className,
9077
- style = props.style,
9078
- onClick = props.onClick;
9079
- return /*#__PURE__*/React__default.createElement("div", {
9080
- className: className,
9081
- style: _extends({}, style, {
9082
- display: "none"
9083
- }),
9084
- onClick: onClick
9085
- });
9086
- }
9087
9136
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
9088
9137
  className: "" + SECTION_DEFAULT_CLASS
9089
9138
  }, /*#__PURE__*/React__default.createElement(SectionTitle, {
9090
9139
  data: data,
9091
9140
  shopConfigStyle: shopConfigStyle
9092
- }), /*#__PURE__*/React__default.createElement(Slider, {
9093
- 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, {
9094
9144
  infinite: true,
9095
9145
  slidesToShow: 1,
9146
+ slidesToScroll: 1,
9096
9147
  speed: 500,
9097
9148
  autoplay: true,
9098
9149
  autoplaySpeed: 4000,
9099
9150
  pauseOnHover: true,
9100
- nextArrow: /*#__PURE__*/React__default.createElement(RenderArrow, null),
9101
- prevArrow: /*#__PURE__*/React__default.createElement(RenderArrow, null),
9151
+ arrows: false,
9102
9152
  beforeChange: function beforeChange(oldIndex, newIndex) {
9103
9153
  return setCurrentSlide(newIndex);
9104
9154
  },
@@ -9112,6 +9162,8 @@ var TreatmentsList7 = function TreatmentsList7(props) {
9112
9162
  }
9113
9163
  }, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
9114
9164
  return renderItemSlide(product, index);
9165
+ })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, {
9166
+ text: "d\u1ECBch v\u1EE5"
9115
9167
  }))), /*#__PURE__*/React__default.createElement(Dash, {
9116
9168
  color: secondary
9117
9169
  }), isOpenModal ? /*#__PURE__*/React__default.createElement(ModalNotification, {
@@ -9358,7 +9410,6 @@ var ProductItem2 = function ProductItem2(props) {
9358
9410
  Link = _props$Link === void 0 ? null : _props$Link,
9359
9411
  _props$className = props.className,
9360
9412
  className = _props$className === void 0 ? "" : _props$className;
9361
- console.log("checkkkkkkkk:::::::", className);
9362
9413
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
9363
9414
  Link: Link,
9364
9415
  href: getLinkProductDetail(product)
@@ -9390,9 +9441,9 @@ var ProductItem3 = function ProductItem3(props) {
9390
9441
  product: product,
9391
9442
  className: "w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-t-2xl"
9392
9443
  }), /*#__PURE__*/React__default.createElement("div", {
9393
- className: "p-4 flex flex-col gap-4 items-start"
9444
+ className: "p-4 flex flex-col gap-2 md:gap-4 items-start"
9394
9445
  }, /*#__PURE__*/React__default.createElement("div", {
9395
- className: "line-clamp-1"
9446
+ className: "line-clamp-1 text-lg"
9396
9447
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
9397
9448
  product: product,
9398
9449
  className: "text-lg text-start"
@@ -9414,14 +9465,14 @@ var ProductItem4 = function ProductItem4(props) {
9414
9465
  className: "w-full border border-stroke flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
9415
9466
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
9416
9467
  product: product,
9417
- className: "w-full h-44 sm:h-56 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
9468
+ className: "w-full h-40 sm:h-56 lg:h-60 xl:h-64 bg-cover bg-no-repeat rounded-2xl"
9418
9469
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
9419
- className: "text-start line-clamp-1"
9470
+ className: "text-start line-clamp-1 text-lg"
9420
9471
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
9421
9472
  product: product,
9422
9473
  className: "text-lg text-start mt-2"
9423
9474
  })), /*#__PURE__*/React__default.createElement("div", {
9424
- className: "flex pt-4 gap-2 md:gap-4 border-t items-center"
9475
+ className: "flex pt-2 md:pt-4 gap-2 md:gap-4 border-t items-center"
9425
9476
  }, /*#__PURE__*/React__default.createElement("div", {
9426
9477
  className: "p-2 md:p-[10px] rounded-full hover:opacity-80 border border-primary h-full w-auto flex items-center justify-center " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass)
9427
9478
  }, /*#__PURE__*/React__default.createElement(fi.FiShoppingCart, {
@@ -9480,7 +9531,7 @@ var ProductItem6 = function ProductItem6(props) {
9480
9531
  className: "w-full border border-stroke flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
9481
9532
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
9482
9533
  product: product,
9483
- className: "w-full h-44 sm:h-56 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
9534
+ className: "w-full h-40 sm:h-56 lg:h-60 xl:h-64 bg-cover bg-no-repeat rounded-2xl"
9484
9535
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
9485
9536
  className: "text start line-clamp-1"
9486
9537
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10355,12 +10406,14 @@ var ProductHighlight1 = function ProductHighlight1(props) {
10355
10406
  return /*#__PURE__*/React__default.createElement(ProductItem, {
10356
10407
  Link: Link,
10357
10408
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10409
+ shopConfigStyle: shopConfigStyle,
10358
10410
  key: "zjk-" + idx
10359
10411
  });
10360
10412
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
10361
10413
  label: "Xem thêm",
10362
10414
  onClick: handleGetMoreProducts,
10363
- className: "mx-auto " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass),
10415
+ shopConfigStyle: shopConfigStyle,
10416
+ className: "mx-auto",
10364
10417
  type: "outline"
10365
10418
  }) : null);
10366
10419
  };
@@ -10622,7 +10675,7 @@ var Booking1 = function Booking1(props) {
10622
10675
  };
10623
10676
 
10624
10677
  var BookingForm6 = function BookingForm6(props) {
10625
- var _data$data, _data$data$, _data$data2, _data$data2$;
10678
+ var _data$data, _data$data$, _data$data2, _data$data2$, _data$data3, _data$data3$, _data$data4, _data$data4$, _data$data5, _data$data5$, _data$data6, _data$data6$;
10626
10679
  var _props$shopConfigStyl = props.shopConfigStyle,
10627
10680
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
10628
10681
  _props$shopConfig = props.shopConfig,
@@ -10639,14 +10692,20 @@ var BookingForm6 = function BookingForm6(props) {
10639
10692
  shopConfigStyle: shopConfigStyle
10640
10693
  }), /*#__PURE__*/React__default.createElement("div", {
10641
10694
  className: "mt-12 grid grid-cols-1 gap-6 md:grid-cols-3 md:gap-12"
10695
+ }, /*#__PURE__*/React__default.createElement(LinkToPage, {
10696
+ 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) || "#"
10697
+ }, 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", {
10698
+ className: "text-primary w-full h-auto"
10642
10699
  }, /*#__PURE__*/React__default.createElement("div", {
10643
- className: ""
10644
- }, /*#__PURE__*/React__default.createElement("img", {
10645
- 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$.srcImage,
10700
+ dangerouslySetInnerHTML: {
10701
+ __html: configSvg(data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : _data$data4$.svgImage)
10702
+ }
10703
+ })) : /*#__PURE__*/React__default.createElement("img", {
10704
+ src: data === null || data === void 0 ? void 0 : (_data$data5 = data.data) === null || _data$data5 === void 0 ? void 0 : (_data$data5$ = _data$data5[0]) === null || _data$data5$ === void 0 ? void 0 : _data$data5$.srcImage,
10646
10705
  className: "w-full h-auto"
10647
10706
  }), /*#__PURE__*/React__default.createElement("div", {
10648
10707
  className: "mt-4 whitespace-pre-line"
10649
- }, 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$.description)), /*#__PURE__*/React__default.createElement(BookingForm, {
10708
+ }, data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : _data$data6$.description)), /*#__PURE__*/React__default.createElement(BookingForm, {
10650
10709
  shopConfigStyle: shopConfigStyle,
10651
10710
  shopConfig: shopConfig,
10652
10711
  className: "col-span-2"
@@ -10743,15 +10802,21 @@ var Banner2 = function Banner2(props) {
10743
10802
  };
10744
10803
 
10745
10804
  var Banner3 = function Banner3(props) {
10746
- var data = props.data;
10805
+ var data = props.data,
10806
+ _props$Link = props.Link,
10807
+ Link = _props$Link === void 0 ? null : _props$Link;
10747
10808
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
10748
10809
  return /*#__PURE__*/React__default.createElement("div", {
10749
10810
  className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-3 gap-5"
10750
10811
  }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
10751
- return /*#__PURE__*/React__default.createElement("img", {
10812
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
10813
+ Link: Link,
10814
+ href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
10815
+ key: "djsd-" + index
10816
+ }, /*#__PURE__*/React__default.createElement("img", {
10752
10817
  src: item === null || item === void 0 ? void 0 : item.srcImage,
10753
10818
  className: "bg-cover bg-no-repeat h-full rounded-xl"
10754
- });
10819
+ }));
10755
10820
  }));
10756
10821
  };
10757
10822
 
@@ -10944,13 +11009,11 @@ var Links1 = function Links1(props) {
10944
11009
  };
10945
11010
 
10946
11011
  var Footer1 = function Footer1(props) {
10947
- var _routes$filter;
11012
+ var _shopConfigStyle$navB, _shopConfigStyle$navB2;
10948
11013
  var shopConfig = props.shopConfig,
10949
11014
  shopConfigStyle = props.shopConfigStyle,
10950
11015
  _props$Link = props.Link,
10951
- Link = _props$Link === void 0 ? null : _props$Link,
10952
- _props$routes = props.routes,
10953
- routes = _props$routes === void 0 ? [] : _props$routes;
11016
+ Link = _props$Link === void 0 ? null : _props$Link;
10954
11017
  var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
10955
11018
  _shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
10956
11019
  primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
@@ -10982,7 +11045,9 @@ var Footer1 = function Footer1(props) {
10982
11045
  };
10983
11046
  return /*#__PURE__*/React__default.createElement("div", {
10984
11047
  className: SECTION_CLASS + " !md:my-0 !my-0 pt-12 bg-bgSecondary"
10985
- }, /*#__PURE__*/React__default.createElement("div", {
11048
+ }, /*#__PURE__*/React__default.createElement(LinkToPage, {
11049
+ Link: Link,
11050
+ href: "/",
10986
11051
  className: "flex items-center"
10987
11052
  }, /*#__PURE__*/React__default.createElement("img", {
10988
11053
  className: "object-cover w-16 h-16",
@@ -11021,12 +11086,13 @@ var Footer1 = function Footer1(props) {
11021
11086
  className: "mb-3 font-semibold text-lg"
11022
11087
  }, "Li\xEAn k\u1EBFt"), /*#__PURE__*/React__default.createElement("div", {
11023
11088
  className: "leading-10 flex flex-col "
11024
- }, routes === null || routes === void 0 ? void 0 : (_routes$filter = routes.filter(function (e) {
11089
+ }, shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : (_shopConfigStyle$navB = shopConfigStyle.navBarMenus) === null || _shopConfigStyle$navB === void 0 ? void 0 : (_shopConfigStyle$navB2 = _shopConfigStyle$navB.filter(function (e) {
11025
11090
  return e === null || e === void 0 ? void 0 : e.isShow;
11026
- })) === null || _routes$filter === void 0 ? void 0 : _routes$filter.map(function (route, index) {
11091
+ })) === null || _shopConfigStyle$navB2 === void 0 ? void 0 : _shopConfigStyle$navB2.map(function (route, index) {
11027
11092
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
11028
11093
  Link: Link,
11029
- href: route === null || route === void 0 ? void 0 : route.route
11094
+ href: (route === null || route === void 0 ? void 0 : route.route) || "#",
11095
+ key: "dfjg-" + index
11030
11096
  }, /*#__PURE__*/React__default.createElement("div", null, route === null || route === void 0 ? void 0 : route.label));
11031
11097
  }))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
11032
11098
  className: "font-semibold mb-4 text-lg"
@@ -11074,11 +11140,11 @@ var Footer1 = function Footer1(props) {
11074
11140
  };
11075
11141
 
11076
11142
  var Footer7 = function Footer7(props) {
11077
- var _routes$filter;
11143
+ var _shopConfigStyle$navB, _shopConfigStyle$navB2;
11078
11144
  var shopConfig = props.shopConfig,
11079
11145
  shopConfigStyle = props.shopConfigStyle,
11080
- _props$routes = props.routes,
11081
- routes = _props$routes === void 0 ? [] : _props$routes;
11146
+ _props$Link = props.Link,
11147
+ Link = _props$Link === void 0 ? null : _props$Link;
11082
11148
  var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
11083
11149
  _shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
11084
11150
  primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
@@ -11119,7 +11185,9 @@ var Footer7 = function Footer7(props) {
11119
11185
  background: bgSecondary,
11120
11186
  color: textBody
11121
11187
  }
11122
- }, /*#__PURE__*/React__default.createElement("div", {
11188
+ }, /*#__PURE__*/React__default.createElement(LinkToPage, {
11189
+ Link: Link,
11190
+ href: "/",
11123
11191
  className: "flex items-center gap-2"
11124
11192
  }, /*#__PURE__*/React__default.createElement("img", {
11125
11193
  className: "object-cover w-14",
@@ -11137,7 +11205,9 @@ var Footer7 = function Footer7(props) {
11137
11205
  }, /*#__PURE__*/React__default.createElement("div", {
11138
11206
  className: "mb-4 font-semibold text-md md:text-lg"
11139
11207
  }, "Th\xF4ng tin li\xEAn h\u1EC7"), shopAddressList === null || shopAddressList === void 0 ? void 0 : shopAddressList.map(function (item, index) {
11140
- 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", {
11208
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
11209
+ key: "dlkhg-" + index
11210
+ }, /*#__PURE__*/React__default.createElement("div", null, "C\u01A1 s\u1EDF ", index + 1), /*#__PURE__*/React__default.createElement("div", {
11141
11211
  className: "flex gap-1"
11142
11212
  }, /*#__PURE__*/React__default.createElement(io5.IoLocationOutline, {
11143
11213
  size: 24,
@@ -11158,11 +11228,13 @@ var Footer7 = function Footer7(props) {
11158
11228
  className: "mb-4 font-semibold text-md md:text-lg"
11159
11229
  }, "Li\xEAn k\u1EBFt"), /*#__PURE__*/React__default.createElement("div", {
11160
11230
  className: "leading-10 flex flex-col "
11161
- }, routes === null || routes === void 0 ? void 0 : (_routes$filter = routes.filter(function (e) {
11231
+ }, shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : (_shopConfigStyle$navB = shopConfigStyle.navBarMenus) === null || _shopConfigStyle$navB === void 0 ? void 0 : (_shopConfigStyle$navB2 = _shopConfigStyle$navB.filter(function (e) {
11162
11232
  return e === null || e === void 0 ? void 0 : e.isShow;
11163
- })) === null || _routes$filter === void 0 ? void 0 : _routes$filter.map(function (route, index) {
11164
- return /*#__PURE__*/React__default.createElement("a", {
11165
- href: route === null || route === void 0 ? void 0 : route.route
11233
+ })) === null || _shopConfigStyle$navB2 === void 0 ? void 0 : _shopConfigStyle$navB2.map(function (route, index) {
11234
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
11235
+ href: (route === null || route === void 0 ? void 0 : route.route) || "#",
11236
+ Link: Link,
11237
+ key: "fiddf-" + index
11166
11238
  }, /*#__PURE__*/React__default.createElement("div", null, route === null || route === void 0 ? void 0 : route.label));
11167
11239
  }))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
11168
11240
  className: "font-semibold mb-4 text-md md:text-lg"
@@ -11283,71 +11355,48 @@ var CustomerRating1 = function CustomerRating1(props) {
11283
11355
  var CustomerRating5 = function CustomerRating5(props) {
11284
11356
  var _props$data = props.data,
11285
11357
  data = _props$data === void 0 ? {} : _props$data;
11286
- var _useState = React.useState(0),
11287
- currentIndex = _useState[0],
11288
- setCurrentIndex = _useState[1];
11289
11358
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
11290
- var _useState2 = React.useState(0),
11291
- startX = _useState2[0],
11292
- setStartX = _useState2[1];
11293
- var _useState3 = React.useState(0),
11294
- endX = _useState3[0],
11295
- setEndX = _useState3[1];
11296
- var sliderRef = React.useRef();
11297
- var handleTouchStart = function handleTouchStart(e) {
11298
- var touchStart = e.touches[0].clientX;
11299
- setStartX(touchStart);
11300
- };
11301
- var handleTouchMove = function handleTouchMove(e) {
11302
- var touchMove = e.touches[0].clientX;
11303
- setEndX(touchMove);
11304
- };
11305
- var handleTouchEnd = function handleTouchEnd() {
11306
- var diff = startX - endX;
11307
- var threshold = sliderRef.current.offsetWidth / 3;
11308
- if (diff > threshold && currentIndex < sectionData.length - 1) {
11309
- setCurrentIndex(currentIndex + 1);
11310
- } else if (diff < -threshold && currentIndex > 0) {
11311
- setCurrentIndex(currentIndex - 1);
11312
- }
11313
- };
11359
+ var _useState = React.useState(0),
11360
+ currentSlide = _useState[0],
11361
+ setCurrentSlide = _useState[1];
11314
11362
  return /*#__PURE__*/React__default.createElement("div", {
11315
- className: SECTION_CLASS + " mx-0 md:mx-4 xl:mx-20 rounded-xl relative"
11363
+ className: SECTION_CLASS + " mx-0 md:mx-4 xl:mx-20 rounded-xl pb-6 relative"
11316
11364
  }, /*#__PURE__*/React__default.createElement("div", {
11317
11365
  className: "absolute mt-16 inset-0 bg-bgSecondary [clip-path:polygon(0%_0%,_100%_30%,_100%_100%,_0%_100%)] z-0 rounded-3xl"
11318
11366
  }), /*#__PURE__*/React__default.createElement("div", {
11319
- className: "w-full relative z-10 border border-textHeading rounded-3xl flex overflow-hidden",
11320
- ref: sliderRef,
11321
- onTouchStart: handleTouchStart,
11322
- onTouchMove: handleTouchMove,
11323
- onTouchEnd: handleTouchEnd
11324
- }, /*#__PURE__*/React__default.createElement("div", {
11325
- className: "flex justify-start transition-transform duration-300",
11326
- style: {
11327
- transform: "translateX(-" + currentIndex * 100 + "%)"
11367
+ className: "w-full relative z-10 border border-textHeading rounded-3xl"
11368
+ }, /*#__PURE__*/React__default.createElement(Slider, {
11369
+ infinite: true,
11370
+ slidesToShow: 1,
11371
+ slidesToScroll: 1,
11372
+ speed: 500,
11373
+ autoplay: true,
11374
+ autoplaySpeed: 4000,
11375
+ pauseOnHover: true,
11376
+ arrows: false,
11377
+ beforeChange: function beforeChange(oldIndex, newIndex) {
11378
+ return setCurrentSlide(newIndex);
11379
+ },
11380
+ dots: true,
11381
+ customPaging: function customPaging(i) {
11382
+ return i === currentSlide ? /*#__PURE__*/React__default.createElement("div", {
11383
+ className: "w-4 h-1 rounded-full bg-primary mt-4"
11384
+ }) : /*#__PURE__*/React__default.createElement("div", {
11385
+ className: "w-4 h-1 rounded-full bg-gray-300 mt-4"
11386
+ });
11328
11387
  }
11329
11388
  }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
11330
11389
  return /*#__PURE__*/React__default.createElement("div", {
11331
- 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",
11390
+ className: "p-6 !flex !flex-col md:!flex-row gap-4 xl:gap-6",
11332
11391
  key: "lpky-" + index
11333
11392
  }, /*#__PURE__*/React__default.createElement("img", {
11334
11393
  src: item === null || item === void 0 ? void 0 : item.avatar,
11335
- className: "w-80 h-96 object-cover rounded-3xl"
11394
+ className: "w-full md:w-80 h-96 object-cover rounded-3xl"
11336
11395
  }), /*#__PURE__*/React__default.createElement("div", {
11337
- className: "flex flex-col items-center md:items-start gap-6 justify-center"
11396
+ className: "flex flex-col items-center md:items-start gap-4 lg:gap-6 justify-center"
11338
11397
  }, /*#__PURE__*/React__default.createElement("div", {
11339
11398
  className: "text-4xl font-semibold"
11340
- }, 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)));
11341
- })), /*#__PURE__*/React__default.createElement("div", {
11342
- 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"
11343
- }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (_, index) {
11344
- return /*#__PURE__*/React__default.createElement("div", {
11345
- key: "dot-" + index,
11346
- onClick: function onClick() {
11347
- setCurrentIndex(index);
11348
- },
11349
- className: (currentIndex === index ? "w-6 bg-primary" : "w-3 bg-gray4") + " h-3 rounded-full hover:opacity-80 cursor-pointer "
11350
- });
11399
+ }, 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, " ")));
11351
11400
  }))));
11352
11401
  };
11353
11402
 
@@ -11516,21 +11565,19 @@ var PageTitle1 = function PageTitle1(props) {
11516
11565
  };
11517
11566
 
11518
11567
  var About1 = function About1(props) {
11568
+ var shopConfig = props.shopConfig,
11569
+ data = props.data;
11519
11570
  return /*#__PURE__*/React__default.createElement("div", {
11520
11571
  className: SECTION_CLASS + " flex flex-col gap-4"
11521
- }, /*#__PURE__*/React__default.createElement("div", null, "Tr\xE1i c\xE2y s\u1EA1ch - an to\xE0n cho s\u1EE9c kho\u1EBB ng\u01B0\u1EDDi ti\xEAu d\xF9ng. C\u1EEDa h\xE0ng ORGANIC FOOD c\u1EE7a ch\xFAng t\xF4i t\u1EEBng b\u01B0\u1EDBc \u0111i v\xE0o th\u1ECB tr\u01B0\u1EDDng v\xE0 ni\u1EC1m tin c\u1EE7a kh\xE1ch h\xE0ng. Ho\u1EA1t \u0111\u1ED9ng v\xE0o th\xE1ng 5/2020, ORGANIC FOOD \u0111\xE3 tr\u1EDF th\xE0nh c\xE1i t\xEAn quen thu\u1ED9c trong l\u0129nh v\u1EF1c cung c\u1EA5p tr\xE1i c\xE2y s\u1EA1ch, an to\xE0n, cam k\u1EBFt ch\xEDn t\u1EF1 nhi\xEAn 100% v\xE0 h\u01B0\u1EDBng \u0111\u1EBFn s\u1EE9c kho\u1EBB ng\u01B0\u1EDDi ti\xEAu d\xF9ng qua 3 ti\xEAu ch\xED:"), /*#__PURE__*/React__default.createElement("div", {
11522
- className: "font-semibold"
11523
- }, "T\u1EA7m Nh\xECn"), /*#__PURE__*/React__default.createElement("div", null, "S\u1EA3n ph\u1EA9m t\u01B0\u0300 ORGANIC FOOD se\u0303 tr\u1EDF tha\u0300nh thu\u031Bo\u031Bng hi\u1EB9\u0302u quen thu\u1ECD\u0302c va\u0300 h\u01B0\u1EDBng \u0111\u1EBFn ch\u1EA5t l\u01B0\u1EE3ng t\u1ED1t nh\u1EA5t."), /*#__PURE__*/React__default.createElement("div", {
11524
- className: "font-semibold"
11525
- }, "S\u1EE9 m\u1EC7nh"), /*#__PURE__*/React__default.createElement("li", {
11526
- className: "ps-4"
11527
- }, " \u0110\u1ECD\u0302i ngu\u0303 ba\u0301n ha\u0300ng s\u0103\u0303n sa\u0300ng l\u0103\u0301ng nghe va\u0300 t\u1EA1\u0302n ta\u0302m nhi\u1EB9\u0302t huy\xEA\u0301t trong co\u0302ng vi\u1EB9\u0302c."), /*#__PURE__*/React__default.createElement("li", {
11528
- className: "ps-4"
11529
- }, " Sa\u0309n ph\xE2\u0309m th\u01B0\u0301c u\xF4\u0301ng \u0111a da\u0323ng, \u0111a\u0309m ba\u0309o t\xF4\u0301t s\u01B0\u0301c kho\u0309e va\u0300 \u0111a\u0301p \u01B0\u0301ng \u0111u\u031B\u01A1\u0323c mong \u0111\u01A1\u0323i cu\u0309a kha\u0301ch ha\u0300ng."), /*#__PURE__*/React__default.createElement("li", {
11530
- className: "ps-4"
11531
- }, " Tr\xE1i c\xE2y \u0111a d\u1EA1ng, cam k\u1EBFt h\xE0ng s\u1EA1ch \u0111\u1EA3m b\u1EA3o ch\u1EA5t l\u01B0\u1EE3ng t\u1ED1t nh\u1EA5t v\xE0 an to\xE0n tuy\u1EC7t \u0111\u1ED1i cho ng\u01B0\u1EDDi ti\xEAu d\xF9ng"), /*#__PURE__*/React__default.createElement("div", {
11532
- className: "font-semibold"
11533
- }, "Gi\xE1 Tr\u1ECB C\u1ED1t L\xF5i"), /*#__PURE__*/React__default.createElement("div", null, "ORGANIC FOOD s\u1EBD lu\xF4n l\xE0 ng\u01B0\u1EDDi b\u1EA1n tin c\u1EADy nh\u1EA5t c\xF9ng kh\xE1ch h\xE0ng, tr\xE1i c\xE2y s\u1EA1ch lu\xF4n \u0111\u1EA3m b\u1EA3o ch\u1EA5t l\u01B0\u1EE3ng v\xE0 mang l\u1EA1i ngu\u1ED3n dinh d\u01B0\u1EE1ng c\u0169ng nh\u01B0 s\u1EF1 an to\xE0n cho kh\xE1ch h\xE0ng, g\xF3p ph\u1EA7n mang \u0111\u1EBFn cu\u1ED9c s\u1ED1ng xanh kho\u1EBB m\u1EA1nh cho m\u1ECDi nh\xE0."));
11572
+ }, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement("h1", {
11573
+ className: "text-4xl font-semibold"
11574
+ }, data === null || data === void 0 ? void 0 : data.sectionTitle) : null, data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("div", {
11575
+ className: "text-xl"
11576
+ }, data === null || data === void 0 ? void 0 : data.sectionDescription) : null, /*#__PURE__*/React__default.createElement("div", {
11577
+ dangerouslySetInnerHTML: {
11578
+ __html: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopAbout
11579
+ }
11580
+ }));
11534
11581
  };
11535
11582
 
11536
11583
  var About5 = function About5(props) {
@@ -11630,6 +11677,7 @@ var Breadcrumb1 = function Breadcrumb1(props) {
11630
11677
  label: "Trang chủ",
11631
11678
  route: "/"
11632
11679
  });
11680
+ console.log(items);
11633
11681
  setItems(items);
11634
11682
  };
11635
11683
  return /*#__PURE__*/React__default.createElement("div", {
@@ -11642,7 +11690,7 @@ var Breadcrumb1 = function Breadcrumb1(props) {
11642
11690
  className: "text-gray4"
11643
11691
  }, "/") : null, item !== null && item !== void 0 && item.route ? /*#__PURE__*/React__default.createElement(LinkToPage, {
11644
11692
  Link: Link,
11645
- href: item === null || item === void 0 ? void 0 : item.route,
11693
+ href: (item === null || item === void 0 ? void 0 : item.route) || "#",
11646
11694
  style: {
11647
11695
  color: textHeading
11648
11696
  }
@@ -12501,7 +12549,7 @@ var SearchProduct1 = function SearchProduct1(props) {
12501
12549
  setSearchValue = _useState2[1];
12502
12550
  React.useEffect(function () {
12503
12551
  if (valueSearch === "") {
12504
- setProducts([]);
12552
+ setListProducts([]);
12505
12553
  } else {
12506
12554
  var delayDebounceFn = setTimeout(function () {
12507
12555
  handleSearch(valueSearch);
@@ -12573,6 +12621,7 @@ var SearchProduct1 = function SearchProduct1(props) {
12573
12621
  };
12574
12622
 
12575
12623
  var SearchBar2 = function SearchBar2(props) {
12624
+ var _data$data;
12576
12625
  var _props$Link = props.Link,
12577
12626
  Link = _props$Link === void 0 ? null : _props$Link,
12578
12627
  data = props.data;
@@ -12618,12 +12667,21 @@ var SearchBar2 = function SearchBar2(props) {
12618
12667
  }
12619
12668
  };
12620
12669
  return /*#__PURE__*/React__default.createElement("div", {
12621
- className: "w-[100vw] md:w-[50vw] py-6 mx-auto px-6 flex flex-col gap-4"
12670
+ className: SECTION_CLASS + " md:mt-6"
12671
+ }, /*#__PURE__*/React__default.createElement("div", {
12672
+ className: " w-full flex flex-col justify-center px-6 gap-2 md:gap-4 items-center rounded-xl md:rounded-3xl ",
12673
+ style: {
12674
+ background: "url(" + (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.srcImage) + ")",
12675
+ backgroundPosition: "center",
12676
+ backgroundSize: "cover"
12677
+ }
12678
+ }, /*#__PURE__*/React__default.createElement("div", {
12679
+ className: "w-full md:w-1/2 py-6 mx-auto px-6 flex flex-col h-full gap-4"
12622
12680
  }, /*#__PURE__*/React__default.createElement(Input, {
12623
12681
  icons: /*#__PURE__*/React__default.createElement(io5.IoSearchOutline, {
12624
12682
  className: "text-gray3"
12625
12683
  }),
12626
- className: "w-full",
12684
+ className: "w-full h-12",
12627
12685
  inputClassName: "w-full",
12628
12686
  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",
12629
12687
  onChange: setSearchValue
@@ -12648,14 +12706,13 @@ var SearchBar2 = function SearchBar2(props) {
12648
12706
  })));
12649
12707
  })) : /*#__PURE__*/React__default.createElement("div", {
12650
12708
  className: "mx-auto"
12651
- }, data === null || data === void 0 ? void 0 : data.sectionDescription));
12709
+ }, data === null || data === void 0 ? void 0 : data.sectionDescription))));
12652
12710
  };
12653
12711
 
12654
12712
  var SearchBar5 = function SearchBar5(props) {
12655
- var _data$data, _data$data2, _data$data3;
12713
+ var _data$data, _data$data2, _data$data3, _data$data4, _data$data5;
12656
12714
  var _props$Link = props.Link,
12657
12715
  Link = _props$Link === void 0 ? null : _props$Link,
12658
- shopConfigStyle = props.shopConfigStyle,
12659
12716
  data = props.data;
12660
12717
  var _useState = React.useState(""),
12661
12718
  value = _useState[0],
@@ -12669,14 +12726,17 @@ var SearchBar5 = function SearchBar5(props) {
12669
12726
  backgroundPosition: "center",
12670
12727
  backgroundSize: "cover"
12671
12728
  }
12672
- }, /*#__PURE__*/React__default.createElement("div", {
12729
+ }, data !== null && data !== void 0 && (_data$data2 = data.data) !== null && _data$data2 !== void 0 && _data$data2.title ? /*#__PURE__*/React__default.createElement("div", {
12673
12730
  className: "text-xl font-semibold md:text-3xl lg:text-4xl text-textButton text-center"
12674
- }, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : _data$data2.title), /*#__PURE__*/React__default.createElement("div", null, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : _data$data3.description), /*#__PURE__*/React__default.createElement(Input, {
12731
+ }, 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", {
12732
+ className: "text-center text-textButton"
12733
+ }, 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, {
12675
12734
  onChange: setValue,
12676
12735
  icons: /*#__PURE__*/React__default.createElement(io5.IoSearchOutline, {
12677
- className: "text-gray3 text-xl md:text-2xl"
12736
+ className: "text-gray3 ps-1 text-xl md:text-2xl"
12678
12737
  }),
12679
- className: "w-full bg-bgSecondary w-full md:w-[50vw] lg:w-[35vw] mb-2 md:h-12",
12738
+ wrapClassName: "w-full sm:w-[60%] md:w-[50%] lg:w-[40%]",
12739
+ className: "w-full bg-bgSecondary mb-2 md:h-12",
12680
12740
  style: {
12681
12741
  borderRadius: "32px"
12682
12742
  },
@@ -12687,20 +12747,17 @@ var SearchBar5 = function SearchBar5(props) {
12687
12747
  href: genLinkSearch(value)
12688
12748
  }, /*#__PURE__*/React__default.createElement(Button, {
12689
12749
  label: "T\xECm ki\u1EBFm",
12690
- className: "whitespace-nowrap h-full ",
12691
- shopConfigStyle: shopConfigStyle
12750
+ className: "whitespace-nowrap h-full !rounded-3xl "
12692
12751
  })) : /*#__PURE__*/React__default.createElement(Button, {
12693
12752
  label: "T\xECm ki\u1EBFm",
12694
- className: "whitespace-nowrap ",
12695
- shopConfigStyle: shopConfigStyle
12753
+ className: "whitespace-nowrap !rounded-3xl py-1.5 md:py-2.5"
12696
12754
  }))
12697
12755
  })));
12698
12756
  };
12699
12757
 
12700
12758
  var SearchBar6 = function SearchBar6(props) {
12701
- var _data$data, _data$data2, _data$data3;
12702
- var shopConfigStyle = props.shopConfigStyle,
12703
- _props$Link = props.Link,
12759
+ var _data$data, _data$data2, _data$data3, _data$data4, _data$data5;
12760
+ var _props$Link = props.Link,
12704
12761
  Link = _props$Link === void 0 ? null : _props$Link,
12705
12762
  data = props.data;
12706
12763
  var _useState = React.useState(""),
@@ -12713,15 +12770,18 @@ var SearchBar6 = function SearchBar6(props) {
12713
12770
  backgroundPosition: "center",
12714
12771
  backgroundSize: "cover"
12715
12772
  }
12716
- }, /*#__PURE__*/React__default.createElement("div", {
12773
+ }, data !== null && data !== void 0 && (_data$data2 = data.data) !== null && _data$data2 !== void 0 && _data$data2.title ? /*#__PURE__*/React__default.createElement("div", {
12717
12774
  className: "text-lg font-semibold text-textBody md:text-2xl lg:text-3xl text-center"
12718
- }, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : _data$data2.title), /*#__PURE__*/React__default.createElement("div", null, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : _data$data3.description), /*#__PURE__*/React__default.createElement("div", {
12719
- className: "flex gap-2 md:gap-4 lg:gap-6 mb-2 md:mb-0"
12775
+ }, 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", {
12776
+ className: "text-center text-textBody"
12777
+ }, 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", {
12778
+ 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"
12720
12779
  }, /*#__PURE__*/React__default.createElement(Input, {
12721
12780
  icons: /*#__PURE__*/React__default.createElement(io5.IoSearchOutline, {
12722
12781
  className: "text-gray3"
12723
12782
  }),
12724
- className: "w-full h-full md:h-12 w-full md:w-[70vw] bg-background lg:w-[50vw]",
12783
+ className: "w-full h-full",
12784
+ wrapClassName: " w-full h-full",
12725
12785
  inputClassName: "w-full",
12726
12786
  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",
12727
12787
  onChange: setValue
@@ -12730,22 +12790,25 @@ var SearchBar6 = function SearchBar6(props) {
12730
12790
  href: genLinkSearch(value)
12731
12791
  }, /*#__PURE__*/React__default.createElement(Button, {
12732
12792
  label: "T\xECm ki\u1EBFm",
12733
- className: "whitespace-nowrap h-full",
12734
- shopConfigStyle: shopConfigStyle
12793
+ className: "whitespace-nowrap h-full"
12735
12794
  })) : /*#__PURE__*/React__default.createElement(Button, {
12736
12795
  label: "T\xECm ki\u1EBFm",
12737
- className: "whitespace-nowrap ",
12738
- shopConfigStyle: shopConfigStyle
12796
+ className: "whitespace-nowrap "
12739
12797
  }))));
12740
12798
  };
12741
12799
 
12742
12800
  var ShopHighlights2 = function ShopHighlights2(props) {
12743
- var data = props.data;
12801
+ var data = props.data,
12802
+ _props$Link = props.Link,
12803
+ Link = _props$Link === void 0 ? null : _props$Link;
12744
12804
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
12745
12805
  return /*#__PURE__*/React__default.createElement("div", {
12746
12806
  className: SECTION_CLASS + " my-0 md:my-0 py-6 grid grid-cols-2 md:grid-cols-4 gap-4 lg:gap-6"
12747
12807
  }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
12748
- return /*#__PURE__*/React__default.createElement("div", {
12808
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
12809
+ Link: Link,
12810
+ href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
12811
+ }, /*#__PURE__*/React__default.createElement("div", {
12749
12812
  className: "flex flex-col items-center text-center lg:px-3 gap-3",
12750
12813
  key: "kdf-" + index
12751
12814
  }, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
@@ -12759,17 +12822,22 @@ var ShopHighlights2 = function ShopHighlights2(props) {
12759
12822
  className: "w-16 h-16 p-3 rounded-full bg-primary"
12760
12823
  }), /*#__PURE__*/React__default.createElement("div", {
12761
12824
  className: "font-medium text-lg"
12762
- }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.description));
12825
+ }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.description)));
12763
12826
  }));
12764
12827
  };
12765
12828
 
12766
12829
  var ShopHighlights5 = function ShopHighlights5(props) {
12767
- var data = props.data;
12830
+ var data = props.data,
12831
+ _props$Link = props.Link,
12832
+ Link = _props$Link === void 0 ? null : _props$Link;
12768
12833
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
12769
12834
  return /*#__PURE__*/React__default.createElement("div", {
12770
12835
  className: SECTION_CLASS + " grid md:grid-cols-3 py-6 gap-4 lg:gap-6 bg-bgSecondary"
12771
12836
  }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
12772
- return /*#__PURE__*/React__default.createElement("div", {
12837
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
12838
+ href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
12839
+ Link: Link
12840
+ }, /*#__PURE__*/React__default.createElement("div", {
12773
12841
  className: "flex flex-col items-center text-center md:px-3 lg:px-6 gap-3",
12774
12842
  key: "kdf-" + index
12775
12843
  }, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
@@ -12783,7 +12851,7 @@ var ShopHighlights5 = function ShopHighlights5(props) {
12783
12851
  className: "w-16 h-16 rounded-full bg-primary"
12784
12852
  }), /*#__PURE__*/React__default.createElement("div", {
12785
12853
  className: "font-medium text-xl text-textHeading pt-2 border-t border-textHeading"
12786
- }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.description));
12854
+ }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.description)));
12787
12855
  }));
12788
12856
  };
12789
12857
 
@@ -12813,7 +12881,7 @@ var ShopHighlights6 = function ShopHighlights6(props) {
12813
12881
  className: " w-44 h-0.5 rounded-full bg-primary"
12814
12882
  }), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.description), /*#__PURE__*/React__default.createElement(LinkToPage, {
12815
12883
  Link: Link,
12816
- href: (item === null || item === void 0 ? void 0 : item.link) || (item === null || item === void 0 ? void 0 : item.route)
12884
+ href: (item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
12817
12885
  }, /*#__PURE__*/React__default.createElement(Button, {
12818
12886
  shopConfigStyle: shopConfigStyle,
12819
12887
  label: item === null || item === void 0 ? void 0 : item.title
@@ -12828,7 +12896,9 @@ var ShopHighlights7 = function ShopHighlights7(props) {
12828
12896
  _props$data = props.data,
12829
12897
  data = _props$data === void 0 ? {} : _props$data,
12830
12898
  _props$SectionTitle = props.SectionTitle,
12831
- SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
12899
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
12900
+ _props$Link = props.Link,
12901
+ Link = _props$Link === void 0 ? null : _props$Link;
12832
12902
  var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
12833
12903
  _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
12834
12904
  secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
@@ -12839,7 +12909,9 @@ var ShopHighlights7 = function ShopHighlights7(props) {
12839
12909
  }), /*#__PURE__*/React__default.createElement("div", {
12840
12910
  className: "mt-6 grid grid-cols-3 gap-4 md:gap-8"
12841
12911
  }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
12842
- return /*#__PURE__*/React__default.createElement("div", {
12912
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
12913
+ Link: Link,
12914
+ href: (it === null || it === void 0 ? void 0 : it.route) || (it === null || it === void 0 ? void 0 : it.link) || "#",
12843
12915
  key: index,
12844
12916
  className: "pt-6 col-span-3 md:col-span-1"
12845
12917
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -12897,6 +12969,484 @@ var VideoFull1 = function VideoFull1(props) {
12897
12969
  })) : null);
12898
12970
  };
12899
12971
 
12972
+ var getAllArticleNewsApi = function getAllArticleNewsApi(shopId, appId, landingShopConfigId, params) {
12973
+ if (params === void 0) {
12974
+ params = {};
12975
+ }
12976
+ return api({
12977
+ method: "get",
12978
+ url: "/landing/news/article/get-all-filter",
12979
+ params: _extends({
12980
+ shopId: shopId,
12981
+ appId: appId,
12982
+ landingShopConfigId: landingShopConfigId
12983
+ }, params)
12984
+ });
12985
+ };
12986
+ var getNewsDetailApi = function getNewsDetailApi(articleId, shopId, landingShopConfigId) {
12987
+ return api({
12988
+ method: "get",
12989
+ url: "/landing/news/article/" + articleId,
12990
+ params: {
12991
+ shopId: shopId,
12992
+ landingShopConfigId: landingShopConfigId,
12993
+ articleId: articleId
12994
+ }
12995
+ });
12996
+ };
12997
+
12998
+ var NewsController = function NewsController(props) {
12999
+ var shopConfig = props.shopConfig,
13000
+ params = props.params;
13001
+ var _useState = React.useState(false),
13002
+ loading = _useState[0],
13003
+ setLoading = _useState[1];
13004
+ var _useState2 = React.useState([]),
13005
+ newsArticles = _useState2[0],
13006
+ setNewsArticles = _useState2[1];
13007
+ var _useState3 = React.useState(),
13008
+ setPage = _useState3[1];
13009
+ React.useEffect(function () {
13010
+ if (shopConfig !== null && shopConfig !== void 0 && shopConfig.shopId && shopConfig !== null && shopConfig !== void 0 && shopConfig.landingShopConfigId) {
13011
+ getAllArticleNews();
13012
+ } else {
13013
+ setNewsArticles([]);
13014
+ setPage(null);
13015
+ }
13016
+ }, [shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingShopConfigId, params]);
13017
+ var getAllArticleNews = function getAllArticleNews() {
13018
+ try {
13019
+ setLoading(true);
13020
+ var _temp = _catch(function () {
13021
+ var defaultParams = {
13022
+ page: 0,
13023
+ size: 10,
13024
+ active: true
13025
+ };
13026
+ var filterParams = _extends({}, defaultParams, params);
13027
+ 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) {
13028
+ var _response$data, _response$data$status;
13029
+ 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) {
13030
+ var _response$data2, _response$data2$data, _response$data3, _response$data3$data;
13031
+ 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);
13032
+ 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);
13033
+ }
13034
+ setLoading(false);
13035
+ });
13036
+ }, function (error) {
13037
+ console.log(error);
13038
+ setLoading(false);
13039
+ });
13040
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
13041
+ } catch (e) {
13042
+ return Promise.reject(e);
13043
+ }
13044
+ };
13045
+ return {
13046
+ newsArticles: newsArticles,
13047
+ loading: loading
13048
+ };
13049
+ };
13050
+
13051
+ var DefaultImage$1 = function DefaultImage(props) {
13052
+ var _props$className = props.className,
13053
+ className = _props$className === void 0 ? "" : _props$className;
13054
+ return /*#__PURE__*/React__default.createElement("div", {
13055
+ className: "flex justify-center items-center max-w-full h-full aspect-video rounded-lg " + className,
13056
+ style: {
13057
+ backgroundColor: "#FAFAFA"
13058
+ }
13059
+ }, /*#__PURE__*/React__default.createElement(SvgImageGallery, {
13060
+ width: "25%",
13061
+ height: "25%",
13062
+ fill: "#D9D9D9"
13063
+ }));
13064
+ };
13065
+ var NewsImage = function NewsImage(props) {
13066
+ var _props$size2 = props.size,
13067
+ size = _props$size2 === void 0 ? 0 : _props$size2,
13068
+ _props$className2 = props.className,
13069
+ className = _props$className2 === void 0 ? "" : _props$className2,
13070
+ news = props.news;
13071
+ var _useState = React.useState(""),
13072
+ src = _useState[0],
13073
+ setSrc = _useState[1];
13074
+ React.useEffect(function () {
13075
+ getNewsImage();
13076
+ }, [news]);
13077
+ var getNewsImage = function getNewsImage() {
13078
+ var src = news === null || news === void 0 ? void 0 : news.thumbnail;
13079
+ setSrc(src);
13080
+ };
13081
+ return src ? /*#__PURE__*/React__default.createElement("img", {
13082
+ src: src,
13083
+ className: "h-full rounded-lg max-w-full aspect-video " + className,
13084
+ style: size ? {
13085
+ width: size,
13086
+ height: size
13087
+ } : null
13088
+ }) : /*#__PURE__*/React__default.createElement(DefaultImage$1, {
13089
+ className: className,
13090
+ size: size
13091
+ });
13092
+ };
13093
+
13094
+ var NewsHighlight1 = function NewsHighlight1(props) {
13095
+ var _newsArticles$, _newsArticles$2, _newsArticles$3, _newsArticles$slice;
13096
+ var _props$SectionTitle = props.SectionTitle,
13097
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
13098
+ _props$shopConfigStyl = props.shopConfigStyle,
13099
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
13100
+ _props$Link = props.Link,
13101
+ Link = _props$Link === void 0 ? null : _props$Link,
13102
+ data = props.data;
13103
+ var _useState = React.useState({
13104
+ tags: "HIGHLIGHT",
13105
+ page: 0,
13106
+ size: 6,
13107
+ sort: "timeUpdate,DESC"
13108
+ }),
13109
+ params = _useState[0];
13110
+ var _NewsController = NewsController(_extends({}, props, {
13111
+ params: params
13112
+ })),
13113
+ _NewsController$newsA = _NewsController.newsArticles,
13114
+ newsArticles = _NewsController$newsA === void 0 ? [] : _NewsController$newsA;
13115
+ return /*#__PURE__*/React__default.createElement("div", {
13116
+ className: "" + SECTION_CLASS
13117
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
13118
+ data: data,
13119
+ shopConfigStyle: shopConfigStyle
13120
+ }), /*#__PURE__*/React__default.createElement("div", {
13121
+ className: "mt-12 mb-6 grid grid-cols-1 md:grid-cols-2 gap-6 "
13122
+ }, /*#__PURE__*/React__default.createElement(LinkToPage, {
13123
+ href: getLinkNewsDetail(newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[0]),
13124
+ Link: Link
13125
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(NewsImage, {
13126
+ news: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[0]
13127
+ }), /*#__PURE__*/React__default.createElement("div", {
13128
+ className: "pt-3 font-medium text-lg"
13129
+ }, newsArticles === null || newsArticles === void 0 ? void 0 : (_newsArticles$ = newsArticles[0]) === null || _newsArticles$ === void 0 ? void 0 : _newsArticles$.title))), /*#__PURE__*/React__default.createElement("div", {
13130
+ className: "flex flex-col gap-6"
13131
+ }, /*#__PURE__*/React__default.createElement(LinkToPage, {
13132
+ className: "grid grid-cols-1 md:grid-cols-2 gap-4 ",
13133
+ href: getLinkNewsDetail(newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[1]),
13134
+ Link: Link
13135
+ }, /*#__PURE__*/React__default.createElement(NewsImage, {
13136
+ news: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[1]
13137
+ }), /*#__PURE__*/React__default.createElement("div", {
13138
+ className: "font-medium text-lg"
13139
+ }, 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, {
13140
+ className: "grid grid-cols-1 md:grid-cols-2 gap-4",
13141
+ href: getLinkNewsDetail(newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[2]),
13142
+ Link: Link
13143
+ }, /*#__PURE__*/React__default.createElement(NewsImage, {
13144
+ news: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[2]
13145
+ }), /*#__PURE__*/React__default.createElement("div", {
13146
+ className: "font-medium text-lg"
13147
+ }, 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", {
13148
+ className: "grid grid-cols-1 md:grid-cols-3 gap-6 mt-6 "
13149
+ }, 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) {
13150
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
13151
+ href: getLinkNewsDetail(item),
13152
+ Link: Link,
13153
+ key: "kdjf-" + index
13154
+ }, /*#__PURE__*/React__default.createElement("div", {
13155
+ className: "jgdfg-" + index
13156
+ }, /*#__PURE__*/React__default.createElement(NewsImage, {
13157
+ news: item
13158
+ }), /*#__PURE__*/React__default.createElement("div", {
13159
+ className: "font-medium text-lg py-2"
13160
+ }, item === null || item === void 0 ? void 0 : item.title)));
13161
+ })));
13162
+ };
13163
+
13164
+ var relativeTime = createCommonjsModule(function (module, exports) {
13165
+ !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)};}}));
13166
+ });
13167
+
13168
+ var vi = createCommonjsModule(function (module, exports) {
13169
+ !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),_}));
13170
+ });
13171
+
13172
+ var getAllNewsCategoriesApi = function getAllNewsCategoriesApi(shopId, landingShopConfigId, appId) {
13173
+ if (appId === void 0) {
13174
+ appId = "SSPA";
13175
+ }
13176
+ return api({
13177
+ method: "get",
13178
+ url: "/landing/news/category/get-all",
13179
+ params: {
13180
+ shopId: shopId,
13181
+ landingShopConfigId: landingShopConfigId,
13182
+ appId: appId,
13183
+ active: true
13184
+ }
13185
+ });
13186
+ };
13187
+
13188
+ var NewsCategoryController = function NewsCategoryController(props) {
13189
+ var params = props.params,
13190
+ shopConfig = props.shopConfig;
13191
+ var _useState = React.useState([]),
13192
+ newsCategories = _useState[0],
13193
+ setNewsCategories = _useState[1];
13194
+ React.useEffect(function () {
13195
+ if (shopConfig !== null && shopConfig !== void 0 && shopConfig.shopId && shopConfig !== null && shopConfig !== void 0 && shopConfig.landingShopConfigId) getAllNewsCategories();
13196
+ }, [shopConfig, params]);
13197
+ var getAllNewsCategories = function getAllNewsCategories() {
13198
+ try {
13199
+ var _temp = _catch(function () {
13200
+ 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) {
13201
+ var _res$data, _res$data$status;
13202
+ 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) {
13203
+ var _res$data2;
13204
+ setNewsCategories(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
13205
+ }
13206
+ });
13207
+ }, function (error) {
13208
+ console.log(error);
13209
+ });
13210
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
13211
+ } catch (e) {
13212
+ return Promise.reject(e);
13213
+ }
13214
+ };
13215
+ return {
13216
+ newsCategories: newsCategories
13217
+ };
13218
+ };
13219
+
13220
+ dayjs_min.extend(relativeTime);
13221
+ dayjs_min.locale("vi");
13222
+ var News1 = function News1(props) {
13223
+ var _newsArticles$slice;
13224
+ var _props$shopConfigStyl = props.shopConfigStyle,
13225
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
13226
+ _props$Link = props.Link,
13227
+ Link = _props$Link === void 0 ? null : _props$Link,
13228
+ _props$catId = props.catId,
13229
+ catId = _props$catId === void 0 ? "" : _props$catId;
13230
+ var _useState = React.useState({
13231
+ page: 0,
13232
+ sort: "timeUpdate,DESC",
13233
+ size: 10,
13234
+ catId: catId
13235
+ }),
13236
+ params = _useState[0],
13237
+ setParams = _useState[1];
13238
+ var _useState2 = React.useState({}),
13239
+ categorySelected = _useState2[0],
13240
+ setCategorySelected = _useState2[1];
13241
+ var _useState3 = React.useState(true),
13242
+ isSeeMore = _useState3[0],
13243
+ setIsSeeMore = _useState3[1];
13244
+ var _NewsController = NewsController(_extends({}, props, {
13245
+ params: params
13246
+ })),
13247
+ _NewsController$newsA = _NewsController.newsArticles,
13248
+ newsArticles = _NewsController$newsA === void 0 ? [] : _NewsController$newsA,
13249
+ loading = _NewsController.loading;
13250
+ var _NewsCategoryControll = NewsCategoryController(props),
13251
+ _NewsCategoryControll2 = _NewsCategoryControll.newsCategories,
13252
+ newsCategories = _NewsCategoryControll2 === void 0 ? [] : _NewsCategoryControll2;
13253
+ var handleSeeMoreNews = function handleSeeMoreNews() {
13254
+ setIsSeeMore(false);
13255
+ setParams(function (prev) {
13256
+ return _extends({}, prev, {
13257
+ size: (prev === null || prev === void 0 ? void 0 : prev.size) + 4
13258
+ });
13259
+ });
13260
+ };
13261
+ React.useEffect(function () {
13262
+ if ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) > 0 && params !== null && params !== void 0 && params.catId) {
13263
+ var category = newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.find(function (item) {
13264
+ return (item === null || item === void 0 ? void 0 : item.catId) == catId;
13265
+ });
13266
+ setCategorySelected(category);
13267
+ }
13268
+ }, [params === null || params === void 0 ? void 0 : params.catId, newsCategories]);
13269
+ return /*#__PURE__*/React__default.createElement("div", {
13270
+ className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-3 gap-6"
13271
+ }, /*#__PURE__*/React__default.createElement("div", {
13272
+ className: "md:col-span-2 flex flex-col gap-8"
13273
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
13274
+ className: "px-6 py-3 text-textButton text-lg rounded-t-lg bg-primary w-max"
13275
+ }, params !== null && params !== void 0 && params.catId ? categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catName : "Tin mới"), /*#__PURE__*/React__default.createElement("div", {
13276
+ className: "w-full border border-primary"
13277
+ })), loading & isSeeMore ? /*#__PURE__*/React__default.createElement("div", {
13278
+ className: "w-full h-80 flex justify-center items-center"
13279
+ }, /*#__PURE__*/React__default.createElement(Loading, null)) : /*#__PURE__*/React__default.createElement("div", {
13280
+ className: "flex flex-col gap-8"
13281
+ }, (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) {
13282
+ var _dayjs;
13283
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
13284
+ href: getLinkNewsDetail(item),
13285
+ Link: Link,
13286
+ key: "kghf-" + index
13287
+ }, /*#__PURE__*/React__default.createElement("div", {
13288
+ className: "grid grid-cols-2 gap-2 md:gap-4 cursor-pointer",
13289
+ key: "djfsdf-" + index
13290
+ }, /*#__PURE__*/React__default.createElement(NewsImage, {
13291
+ news: item
13292
+ }), /*#__PURE__*/React__default.createElement("div", {
13293
+ className: "flex flex-col gap-2 md:gap-3 pb-4"
13294
+ }, /*#__PURE__*/React__default.createElement("div", {
13295
+ className: "font-medium text-lg md:text-xl line-clamp-2"
13296
+ }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
13297
+ className: "line-clamp-3 font-normal min-h-6 md:min-h-20 text-gray3"
13298
+ }, item === null || item === void 0 ? void 0 : item.shortDescription), /*#__PURE__*/React__default.createElement("div", {
13299
+ className: " text-gray3"
13300
+ }, (_dayjs = dayjs_min(item === null || item === void 0 ? void 0 : item.timeUpdate)) === null || _dayjs === void 0 ? void 0 : _dayjs.fromNow()))));
13301
+ }) : /*#__PURE__*/React__default.createElement("div", {
13302
+ className: "w-full h-64 flex flex-col justify-center items-center text-gray3"
13303
+ }, /*#__PURE__*/React__default.createElement(gi.GiNewspaper, {
13304
+ size: 80
13305
+ }), " 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, {
13306
+ label: "Xem th\xEAm",
13307
+ shopConfigStyle: shopConfigStyle,
13308
+ onClick: handleSeeMoreNews,
13309
+ className: "w-max mx-auto"
13310
+ }) : null)), /*#__PURE__*/React__default.createElement("div", {
13311
+ className: "sticky top-20 self-start"
13312
+ }, /*#__PURE__*/React__default.createElement("div", {
13313
+ className: "px-6 py-3 bg-primary rounded-t-lg text-lg text-textButton text-center"
13314
+ }, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
13315
+ className: "rounded-b-lg bg-bgSecondary"
13316
+ }, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {
13317
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
13318
+ href: getLinkNewsByCategory(item),
13319
+ Link: Link,
13320
+ key: "fjhnfg-" + index
13321
+ }, /*#__PURE__*/React__default.createElement("div", {
13322
+ className: "px-6 py-3 hover:bg-gray-100 hover:text-primary cursor-pointer",
13323
+ key: "sdjfdh-" + index
13324
+ }, item === null || item === void 0 ? void 0 : item.catName));
13325
+ }))));
13326
+ };
13327
+
13328
+ var NewsDetailController = function NewsDetailController(props) {
13329
+ var shopConfig = props.shopConfig,
13330
+ _props$articleId = props.articleId,
13331
+ articleId = _props$articleId === void 0 ? 0 : _props$articleId;
13332
+ var _useState = React.useState(),
13333
+ article = _useState[0],
13334
+ setArticle = _useState[1];
13335
+ React.useEffect(function () {
13336
+ if (articleId) {
13337
+ getProductDetail();
13338
+ }
13339
+ }, [articleId]);
13340
+ var getProductDetail = function getProductDetail() {
13341
+ try {
13342
+ var _temp = _catch(function () {
13343
+ 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) {
13344
+ var _res$data, _res$data$status;
13345
+ 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) {
13346
+ var _res$data2;
13347
+ setArticle(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
13348
+ }
13349
+ });
13350
+ }, function (e) {
13351
+ console.log(e);
13352
+ });
13353
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
13354
+ } catch (e) {
13355
+ return Promise.reject(e);
13356
+ }
13357
+ };
13358
+ return {
13359
+ article: article
13360
+ };
13361
+ };
13362
+
13363
+ dayjs_min.extend(relativeTime);
13364
+ dayjs_min.locale("vi");
13365
+ var NewsDetail1 = function NewsDetail1(props) {
13366
+ var shopConfigStyle = props.shopConfigStyle,
13367
+ _props$catId = props.catId,
13368
+ catId = _props$catId === void 0 ? 0 : _props$catId,
13369
+ _props$Link = props.Link,
13370
+ Link = _props$Link === void 0 ? null : _props$Link;
13371
+ var _useState = React.useState({
13372
+ catId: catId,
13373
+ szie: 10
13374
+ }),
13375
+ params = _useState[0],
13376
+ setParams = _useState[1];
13377
+ var _NewsDetailController = NewsDetailController(props),
13378
+ _NewsDetailController2 = _NewsDetailController.article,
13379
+ article = _NewsDetailController2 === void 0 ? {} : _NewsDetailController2;
13380
+ var _NewsCategoryControll = NewsCategoryController(props),
13381
+ _NewsCategoryControll2 = _NewsCategoryControll.newsCategories,
13382
+ newsCategories = _NewsCategoryControll2 === void 0 ? [] : _NewsCategoryControll2;
13383
+ var _NewsController = NewsController(_extends({}, props, {
13384
+ params: params
13385
+ })),
13386
+ _NewsController$newsA = _NewsController.newsArticles,
13387
+ newsArticles = _NewsController$newsA === void 0 ? [] : _NewsController$newsA;
13388
+ var handleSeeMore = function handleSeeMore() {
13389
+ setParams(function (prev) {
13390
+ return _extends({}, prev, {
13391
+ size: (prev === null || prev === void 0 ? void 0 : prev.size) + 4
13392
+ });
13393
+ });
13394
+ };
13395
+ return /*#__PURE__*/React__default.createElement("div", {
13396
+ className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-3 mt-0 md:mt-0 gap-6"
13397
+ }, /*#__PURE__*/React__default.createElement("div", {
13398
+ className: "md:col-span-2 flex flex-col gap-4"
13399
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
13400
+ className: "text-2xl font-medium"
13401
+ }, article === null || article === void 0 ? void 0 : article.title), /*#__PURE__*/React__default.createElement("div", {
13402
+ className: "flex items-center gap-2 text-gray3 mt-2"
13403
+ }, /*#__PURE__*/React__default.createElement(go.GoClock, null), dayjs_min(article === null || article === void 0 ? void 0 : article.timeUpdate).fromNow())), /*#__PURE__*/React__default.createElement("div", {
13404
+ className: "text-gray2"
13405
+ }, article === null || article === void 0 ? void 0 : article.shortDescription), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(NewsImage, {
13406
+ news: article
13407
+ })), /*#__PURE__*/React__default.createElement("div", {
13408
+ dangerouslySetInnerHTML: {
13409
+ __html: article === null || article === void 0 ? void 0 : article.content
13410
+ }
13411
+ }), /*#__PURE__*/React__default.createElement("div", {
13412
+ className: "mt-6"
13413
+ }, /*#__PURE__*/React__default.createElement("div", {
13414
+ className: "font-medium text-2xl mb-4"
13415
+ }, "Tin c\xF9ng chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
13416
+ className: "grid grid-cols-1 md:grid-cols-2 gap-6"
13417
+ }, newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles.map(function (item, index) {
13418
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
13419
+ href: getLinkNewsDetail(item),
13420
+ Link: Link,
13421
+ key: "kghf-" + index
13422
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(NewsImage, {
13423
+ news: item
13424
+ }), /*#__PURE__*/React__default.createElement("div", {
13425
+ className: "font-medium text-lg line-clamp-2"
13426
+ }, item === null || item === void 0 ? void 0 : item.title)));
13427
+ })), (newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement("div", {
13428
+ className: "flex justify-center mt-4 w-full"
13429
+ }, /*#__PURE__*/React__default.createElement(Button, {
13430
+ label: "Xem thêm",
13431
+ onClick: handleSeeMore,
13432
+ shopConfigStyle: shopConfigStyle
13433
+ })) : null)), /*#__PURE__*/React__default.createElement("div", {
13434
+ className: "sticky top-20 self-start"
13435
+ }, /*#__PURE__*/React__default.createElement("div", {
13436
+ className: "px-6 py-3 bg-primary rounded-t-lg text-lg text-textButton text-center"
13437
+ }, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
13438
+ className: "rounded-b-lg bg-bgSecondary"
13439
+ }, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {
13440
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
13441
+ href: getLinkNewsByCategory(item),
13442
+ Link: Link
13443
+ }, /*#__PURE__*/React__default.createElement("div", {
13444
+ className: "px-6 py-3 hover:bg-gray-100 hover:text-primary cursor-pointer",
13445
+ key: "sdjfdh-" + index
13446
+ }, item === null || item === void 0 ? void 0 : item.catName));
13447
+ }))));
13448
+ };
13449
+
12900
13450
  exports.About1 = About1;
12901
13451
  exports.About5 = About5;
12902
13452
  exports.Address1 = Address1;
@@ -12936,6 +13486,9 @@ exports.Links1 = Links1;
12936
13486
  exports.ModalNotification = ModalNotification;
12937
13487
  exports.NavBar1 = NavBar1;
12938
13488
  exports.NavBar7 = NavBar7;
13489
+ exports.News1 = News1;
13490
+ exports.NewsDetail1 = NewsDetail1;
13491
+ exports.NewsHighlight1 = NewsHighlight1;
12939
13492
  exports.PageTitle1 = PageTitle1;
12940
13493
  exports.Partner1 = Partner1;
12941
13494
  exports.ProductCategory2 = ProductCategory2;