s-platform-landing-section 0.1.34 → 0.1.36-beta.1

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.
@@ -6,18 +6,19 @@ import { RxCross2 } from 'react-icons/rx';
6
6
  import { PiHandHeartBold } from 'react-icons/pi';
7
7
  import { TbCategory } from 'react-icons/tb';
8
8
  import { SiZalo } from 'react-icons/si';
9
- import { IoIosStar, IoIosArrowBack, IoIosArrowForward, IoMdCheckmark, IoIosHeartEmpty, IoMdCheckmarkCircleOutline } from 'react-icons/io';
10
- import { FaMinus, FaRegEyeSlash, FaPlus, FaArrowsRotate, FaStar, FaRegStarHalfStroke, FaRegStar } from 'react-icons/fa6';
11
- import 'react-icons/ci';
12
- import { BsCurrencyDollar } from 'react-icons/bs';
9
+ import { IoIosStar, IoMdCheckmark, IoIosHeartEmpty, IoIosArrowBack, IoIosArrowForward, IoMdCheckmarkCircleOutline } from 'react-icons/io';
10
+ import { MdKeyboardDoubleArrowRight } from 'react-icons/md';
11
+ import { FaMinus, FaRegEyeSlash, FaPlus, FaStar, FaRegStarHalfStroke, FaRegStar } from 'react-icons/fa6';
12
+ import { AiOutlinePhone, AiOutlineShoppingCart, AiOutlineInfoCircle } from 'react-icons/ai';
13
13
  import { LuSearch, LuShoppingCart, LuShoppingBag } from 'react-icons/lu';
14
14
  import DatePicker from 'react-datepicker';
15
15
  import 'react-datepicker/dist/react-datepicker.css';
16
16
  import Slider from 'react-slick';
17
17
  import 'slick-carousel/slick/slick.css';
18
18
  import 'slick-carousel/slick/slick-theme.css';
19
- import { AiOutlineShoppingCart, AiOutlineInfoCircle, AiOutlinePhone } from 'react-icons/ai';
19
+ import { BsCurrencyDollar } from 'react-icons/bs';
20
20
  import { GoCreditCard, GoClock } from 'react-icons/go';
21
+ import { GrPowerCycle } from 'react-icons/gr';
21
22
  import { RiMessengerFill, RiDoubleQuotesL, RiDeleteBin7Line } from 'react-icons/ri';
22
23
  import { HiOutlineLocationMarker, HiOutlineArrowNarrowLeft, HiOutlineArrowNarrowRight } from 'react-icons/hi';
23
24
  import { GiNewspaper } from 'react-icons/gi';
@@ -947,7 +948,7 @@ var SectionTitle2 = function SectionTitle2(props) {
947
948
  }), /*#__PURE__*/React__default.createElement(IoIosStar, {
948
949
  className: "w-4 h-4 text-warning"
949
950
  })) : null, data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("div", {
950
- className: "text-xl text-center leading-relaxed text-textSecondary"
951
+ className: "text-xl text-center leading-relaxed text-textSecondary pb-4"
951
952
  }, data === null || data === void 0 ? void 0 : data.sectionDescription) : null);
952
953
  };
953
954
 
@@ -974,10 +975,27 @@ var SectionTitle4 = function SectionTitle4(props) {
974
975
  }, data === null || data === void 0 ? void 0 : (_data$sectionTitle = data.sectionTitle) === null || _data$sectionTitle === void 0 ? void 0 : _data$sectionTitle.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
975
976
  className: "border w-32 border-primary"
976
977
  })) : null, data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("p", {
977
- className: "text-xl text-center font-medium leading-relaxed text-secondary mt-2"
978
+ className: "text-xl text-center leading-relaxed text-secondary mt-2"
978
979
  }, data === null || data === void 0 ? void 0 : data.sectionDescription) : null);
979
980
  };
980
981
 
982
+ var SectionTitle5 = function SectionTitle5(props) {
983
+ var data = props.data;
984
+ return /*#__PURE__*/React__default.createElement("div", {
985
+ className: true
986
+ }, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement("div", {
987
+ className: "flex items-start gap-2"
988
+ }, /*#__PURE__*/React__default.createElement("div", {
989
+ className: "text-secondary text-4xl md:text-5xl"
990
+ }, /*#__PURE__*/React__default.createElement(MdKeyboardDoubleArrowRight, null)), /*#__PURE__*/React__default.createElement("div", {
991
+ className: "flex flex-col gap-2"
992
+ }, /*#__PURE__*/React__default.createElement("div", {
993
+ className: "text-2xl md:text-4xl text-textHeading font-medium font-fontHeading"
994
+ }, data === null || data === void 0 ? void 0 : data.sectionTitle), data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("p", {
995
+ className: "text-lg md:text-2xl leading-relaxed text-textSecondary"
996
+ }, data === null || data === void 0 ? void 0 : data.sectionDescription) : null)) : null);
997
+ };
998
+
981
999
  var Input = forwardRef(function (props, ref) {
982
1000
  var _props$label = props.label,
983
1001
  label = _props$label === void 0 ? "" : _props$label,
@@ -1210,21 +1228,22 @@ var Hero2 = function Hero2(props) {
1210
1228
  }, /*#__PURE__*/React__default.createElement("img", {
1211
1229
  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],
1212
1230
  alt: 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,
1213
- className: "w-full h-auto object-cover min-h-[22vh] max-h-[100vh]"
1231
+ className: "w-full h-auto object-cover min-h-[35vh] max-h-[100vh]"
1214
1232
  }), /*#__PURE__*/React__default.createElement("div", {
1215
- className: "absolute inset-y-0 right-[1%] md:right-[8%] w-[58%] md:w-1/2 flex flex-col gap-2 md:gap-4 xl:gap-6 justify-center items-start px-4 pt-4 pb-2 md:px-8 md:pt-8 md:pb-6 xl:p-8"
1216
- }, /*#__PURE__*/React__default.createElement("img", {
1233
+ className: "absolute inset-y-0 right-[2%] md:right-[4%] w-[58%] md:w-[54%] flex flex-col gap-2 md:gap-4 xl:gap-6 justify-center items-start px-4 pt-4 pb-2 md:px-8 md:pt-8 md:pb-6 xl:p-8"
1234
+ }, shopConfig !== null && shopConfig !== void 0 && shopConfig.logoUrl ? /*#__PURE__*/React__default.createElement("img", {
1217
1235
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
1218
- alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName,
1219
1236
  className: "h-6 w-6 sm:h-10 sm:w-10 md:h-12 md:w-12 lg:w-14 lg:h-14 xl:h-20 xl:w-20"
1220
- }), /*#__PURE__*/React__default.createElement("div", {
1221
- className: "font-medium line-clamp-1 ",
1237
+ }) : null, /*#__PURE__*/React__default.createElement("div", {
1238
+ className: "font-medium line-clamp-2 lg:line-clamp-1 text-2xl md:text-3xl lg:text-4xl xl:text-6xl",
1222
1239
  style: {
1223
- fontSize: "clamp(1.25rem, 4vw, 3.5rem)",
1224
1240
  lineHeight: "1.5"
1225
1241
  }
1226
1242
  }, 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$.title), /*#__PURE__*/React__default.createElement("div", {
1227
- className: "text-xs line-clamp-2 md:line-clamp-3 text-ellipsis sm:text-base md:text-xl lg:text-2xl"
1243
+ className: "line-clamp-3 text-ellipsis text-base md:text-lg lg:text-xl xl:text-2xl",
1244
+ style: {
1245
+ lineHeight: 1.625
1246
+ }
1228
1247
  }, 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$.description)));
1229
1248
  };
1230
1249
 
@@ -1236,13 +1255,16 @@ var Hero5 = function Hero5(props) {
1236
1255
  }, /*#__PURE__*/React__default.createElement("img", {
1237
1256
  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],
1238
1257
  alt: 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,
1239
- className: "w-full min-h-[22vh] max-h-[100vh] object-cover"
1258
+ className: "w-full min-h-[35vh] max-h-[100vh] object-cover"
1240
1259
  }), /*#__PURE__*/React__default.createElement("div", {
1241
- className: "absolute inset-0 flex flex-col top-[5%] md:top-[10%] gap-1 md:gap-4 p-4 lg:p-10 w-3/5 md:w-1/2 lg:w-[45%] max-w-[90%] left-1 lg:left-10 xl:left-20"
1260
+ className: "absolute inset-0 flex flex-col top-[8%] md:top-[10%] gap-1 md:gap-4 p-4 lg:p-10 w-3/5 md:w-1/2 max-w-[90%] left-1 lg:left-10 xl:left-20"
1242
1261
  }, /*#__PURE__*/React__default.createElement("div", {
1243
- className: "text-xl sm:text-2xl md:text-3xl lg:text-4xl text-textHeading pt-2 pb-1 overflow-hidden text-ellipsis font-medium line-clamp-1"
1262
+ className: "text-xl sm:text-2xl md:text-3xl lg:text-4xl text-textHeading overflow-hidden text-ellipsis font-medium line-clamp-2 xl:line-clamp-1",
1263
+ style: {
1264
+ lineHeight: 1.5
1265
+ }
1244
1266
  }, 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$.title), /*#__PURE__*/React__default.createElement("div", {
1245
- className: "text-sm md:text-xl lg:text-2xl text-primary line-clamp-3 md:line-clamp-4 overflow-hidden text-ellipsis "
1267
+ className: "text-sm md:text-xl lg:text-2xl text-primary line-clamp-3 overflow-hidden text-ellipsis"
1246
1268
  }, 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$.description)));
1247
1269
  };
1248
1270
 
@@ -1258,21 +1280,20 @@ var Hero6 = function Hero6(props) {
1258
1280
  }, /*#__PURE__*/React__default.createElement("img", {
1259
1281
  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],
1260
1282
  alt: 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,
1261
- className: "object-cover w-full h-auto"
1283
+ className: "object-cover w-full min-h-[30vh] max-h-[100vh]"
1262
1284
  }), /*#__PURE__*/React__default.createElement("div", {
1263
- className: "absolute inset-0 flex flex-col items-center justify-center md:gap-1 lg:gap-2 text-center py-1 md:py-4 px-16 md:px-20 "
1285
+ className: "absolute inset-0 flex flex-col items-center justify-center md:gap-1 lg:gap-2 text-center py-1 md:py-4 px-10 md:px-20 "
1264
1286
  }, 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$.title ? /*#__PURE__*/React__default.createElement("div", {
1265
- className: "text-primary font-headingFont text-center line-clamp-1 text-ellipsis pt-2 md:pt-3",
1287
+ className: "text-primary font-headingFont text-center line-clamp-1 text-2xl md:text-4xl xl:text-6xl text-ellipsis",
1266
1288
  style: {
1267
- fontSize: "clamp(1rem, 4vw, 3rem)",
1268
1289
  lineHeight: "2"
1269
1290
  }
1270
1291
  }, 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$.title) : null, /*#__PURE__*/React__default.createElement("div", {
1271
- className: "flex flex-col gap-1 md:gap-4 lg:gap-6 "
1292
+ className: "flex flex-col gap-2 md:gap-4 lg:gap-6 "
1272
1293
  }, data !== null && data !== void 0 && (_data$data5 = data.data) !== null && _data$data5 !== void 0 && (_data$data5$ = _data$data5[0]) !== null && _data$data5$ !== void 0 && _data$data5$.description ? /*#__PURE__*/React__default.createElement("div", {
1273
- className: "line-clamp-1 md:line-clamp-2 pb-1",
1294
+ className: "line-clamp-2 lg:line-clamp-3 md:text-xl xl:text-2xl",
1274
1295
  style: {
1275
- fontSize: "clamp(0.75rem, 3vw, 1.5rem)"
1296
+ lineHeight: 1.5
1276
1297
  }
1277
1298
  }, 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) : null, 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) {
1278
1299
  return button !== null && button !== void 0 && button.label && (button !== null && button !== void 0 && button.route || button !== null && button !== void 0 && button.link) ? /*#__PURE__*/React__default.createElement(LinkToPage, {
@@ -1319,13 +1340,16 @@ var Hero10 = function Hero10(props) {
1319
1340
 
1320
1341
  var SECTION_DEFAULT_CLASS = "my-12 mx-4 xl:mx-20 bg-background";
1321
1342
  var SECTION_CLASS = "my-6 md:my-12 px-4 xl:px-20 bg-background";
1343
+ var SECTION_CLASS_PADDING = "py-6 md:py-12 px-4 xl:px-20 bg-background";
1322
1344
 
1323
1345
  var Hero11 = function Hero11(props) {
1324
- var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$title, _data$data3, _data$data3$;
1346
+ var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$title, _data$data3, _data$data3$, _data$data4, _data$data4$, _data$data4$$buttons;
1325
1347
  var _props$data = props.data,
1326
1348
  data = _props$data === void 0 ? {} : _props$data,
1327
1349
  _props$shopConfigStyl = props.shopConfigStyle,
1328
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
1350
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
1351
+ _props$Link = props.Link,
1352
+ Link = _props$Link === void 0 ? null : _props$Link;
1329
1353
  return /*#__PURE__*/React__default.createElement("div", {
1330
1354
  className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-2 py-12 !bg-bgSecondary gap-6 md:gap-12"
1331
1355
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -1353,11 +1377,16 @@ var Hero11 = function Hero11(props) {
1353
1377
  className: "text-2xl md:text-4xl !leading-[1.6] font-headingFont w-max text-center text-primary"
1354
1378
  }, 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 = _data$data2$.title) === null || _data$data2$$title === void 0 ? void 0 : _data$data2$$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
1355
1379
  className: "text-lg md:text-xl lg:text-2xl"
1356
- }, 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), /*#__PURE__*/React__default.createElement(Button, {
1357
- label: "\u0110\u1EB7t b\xE0n ngay",
1358
- shopConfigStyle: shopConfigStyle,
1359
- className: "!font-normal w-max",
1360
- sho: true
1380
+ }, 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), 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$$buttons = _data$data4$.buttons) === null || _data$data4$$buttons === void 0 ? void 0 : _data$data4$$buttons.map(function (button, index) {
1381
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
1382
+ Link: Link,
1383
+ key: "gdf-" + index,
1384
+ href: convertURL(button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
1385
+ }, /*#__PURE__*/React__default.createElement(Button, {
1386
+ label: button === null || button === void 0 ? void 0 : button.label,
1387
+ shopConfigStyle: shopConfigStyle,
1388
+ className: "!font-normal w-max"
1389
+ }));
1361
1390
  })));
1362
1391
  };
1363
1392
 
@@ -1383,113 +1412,6 @@ var Hero12 = function Hero12(props) {
1383
1412
  }, 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)));
1384
1413
  };
1385
1414
 
1386
- var CarouselItem = function CarouselItem(props) {
1387
- var _Object$keys;
1388
- var _props$data = props.data,
1389
- data = _props$data === void 0 ? [] : _props$data,
1390
- _props$className = props.className,
1391
- className = _props$className === void 0 ? "" : _props$className,
1392
- _props$style = props.style,
1393
- style = _props$style === void 0 ? {} : _props$style,
1394
- _props$onClick = props.onClick,
1395
- onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
1396
- _props$isAll = props.isAll,
1397
- isAll = _props$isAll === void 0 ? true : _props$isAll,
1398
- _props$isNavigateButt = props.isNavigateButton,
1399
- isNavigateButton = _props$isNavigateButt === void 0 ? true : _props$isNavigateButt,
1400
- _props$itemClassName = props.itemClassName,
1401
- itemClassName = _props$itemClassName === void 0 ? "" : _props$itemClassName;
1402
- var listRef = useRef(null);
1403
- var _useState = useState(false),
1404
- canScrollLeft = _useState[0],
1405
- setCanScrollLeft = _useState[1];
1406
- var _useState2 = useState(false),
1407
- canScrollRight = _useState2[0],
1408
- setCanScrollRight = _useState2[1];
1409
- var _useState3 = useState({}),
1410
- value = _useState3[0],
1411
- setValue = _useState3[1];
1412
- useEffect(function () {
1413
- var _listRef$current;
1414
- checkScroll();
1415
- (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.addEventListener("scroll", checkScroll);
1416
- return function () {
1417
- var _listRef$current2;
1418
- return (_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.removeEventListener("scroll", checkScroll);
1419
- };
1420
- }, [data]);
1421
- var checkScroll = function checkScroll() {
1422
- if (listRef.current) {
1423
- var _listRef$current3 = listRef.current,
1424
- scrollLeft = _listRef$current3.scrollLeft,
1425
- scrollWidth = _listRef$current3.scrollWidth,
1426
- clientWidth = _listRef$current3.clientWidth;
1427
- setCanScrollLeft(scrollLeft > 0);
1428
- setCanScrollRight(scrollLeft + clientWidth < scrollWidth - 1);
1429
- }
1430
- };
1431
- var handleClickPrevImg = function handleClickPrevImg() {
1432
- if (listRef.current) {
1433
- checkScroll();
1434
- listRef.current.scrollBy({
1435
- left: -300,
1436
- behavior: "smooth"
1437
- });
1438
- }
1439
- };
1440
- var handleClickNextImg = function handleClickNextImg() {
1441
- if (listRef.current) {
1442
- checkScroll();
1443
- listRef.current.scrollBy({
1444
- left: 300,
1445
- behavior: "smooth"
1446
- });
1447
- }
1448
- };
1449
- var handleOnClick = function handleOnClick(item) {
1450
- setValue(item);
1451
- onClick === null || onClick === void 0 ? void 0 : onClick(item);
1452
- };
1453
- return /*#__PURE__*/React__default.createElement("div", {
1454
- className: "h-10 md:h-12 flex justify-between items-center " + className,
1455
- style: style
1456
- }, /*#__PURE__*/React__default.createElement("div", {
1457
- className: "w-full overflow-hidden "
1458
- }, /*#__PURE__*/React__default.createElement("div", {
1459
- className: "flex overflow-x-auto gap-2 " + (isNavigateButton ? "no-scrollbar" : "scroll-custom pb-2") + " items-center",
1460
- ref: listRef
1461
- }, isAll ? /*#__PURE__*/React__default.createElement("div", {
1462
- className: " " + ((Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(value)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0 ? "bg-primary text-textButton" : "bg-background") + " w-max border border-primary p-1 md:p-2 rounded-lg cursor-pointer whitespace-nowrap",
1463
- onClick: function onClick() {
1464
- handleOnClick({});
1465
- }
1466
- }, "T\u1EA5t c\u1EA3") : null, data && (data === null || data === void 0 ? void 0 : data.length) > 0 && (data === null || data === void 0 ? void 0 : data.map(function (item, index) {
1467
- return /*#__PURE__*/React__default.createElement("div", {
1468
- className: ((value === null || value === void 0 ? void 0 : value.value) === (item === null || item === void 0 ? void 0 : item.value) ? "bg-primary text-textButton" : "bg-background") + " w-max border border-primary py-1 px-2 md:py-2 md:px-3 rounded-lg cursor-pointer whitespace-nowrap " + itemClassName,
1469
- key: "carousel-" + index,
1470
- onClick: function onClick() {
1471
- handleOnClick(item);
1472
- }
1473
- }, item === null || item === void 0 ? void 0 : item.label);
1474
- })))), isNavigateButton ? /*#__PURE__*/React__default.createElement("div", {
1475
- className: "hidden my-auto gap-4 md:flex justify-end ps-10"
1476
- }, /*#__PURE__*/React__default.createElement("button", {
1477
- className: "h-full w-9 h-9 md:h-11 md:w-11 items-center justify-center rounded-full " + (canScrollLeft ? "bg-primary cursor-pointer text-textButton" : "bg-gray5 text-gray3 cursor-not-allowed"),
1478
- onClick: handleClickPrevImg,
1479
- disabled: !canScrollLeft
1480
- }, /*#__PURE__*/React__default.createElement(IoIosArrowBack, {
1481
- size: 24,
1482
- className: "inline-block text-lg"
1483
- })), /*#__PURE__*/React__default.createElement("button", {
1484
- className: "h-full w-9 h-9 md:h-11 md:w-11 flex items-center justify-center rounded-full " + (canScrollRight ? "bg-primary cursor-pointer text-textButton" : "bg-gray5 text-gray3 cursor-not-allowed"),
1485
- onClick: handleClickNextImg,
1486
- disabled: !canScrollRight
1487
- }, /*#__PURE__*/React__default.createElement(IoIosArrowForward, {
1488
- size: 24,
1489
- className: "inline-block text-lg "
1490
- }))) : null);
1491
- };
1492
-
1493
1415
  // A type of promise-like that resolves synchronously and supports only one observer
1494
1416
 
1495
1417
  const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
@@ -1509,6 +1431,19 @@ function _catch(body, recover) {
1509
1431
  return result;
1510
1432
  }
1511
1433
 
1434
+ // Asynchronously await a promise and pass the result to a finally continuation
1435
+ function _finallyRethrows(body, finalizer) {
1436
+ try {
1437
+ var result = body();
1438
+ } catch (e) {
1439
+ return finalizer(true, e);
1440
+ }
1441
+ if (result && result.then) {
1442
+ return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
1443
+ }
1444
+ return finalizer(false, result);
1445
+ }
1446
+
1512
1447
  function bind(fn, thisArg) {
1513
1448
  return function wrap() {
1514
1449
  return fn.apply(thisArg, arguments);
@@ -7600,6 +7535,14 @@ var formatCurrency = function formatCurrency(amount) {
7600
7535
  var formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
7601
7536
  return formattedAmount + " \u20AB";
7602
7537
  };
7538
+ var formatCurrency2 = function formatCurrency2(amount) {
7539
+ if (isNaN(amount)) {
7540
+ return 'đ 0';
7541
+ }
7542
+ var roundedAmount = Math.round(amount);
7543
+ var formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
7544
+ return "\u0111 " + formattedAmount;
7545
+ };
7603
7546
  var pattern = {
7604
7547
  phoneNumberPattern: /^(?:\+84|0)\d{9}$/
7605
7548
  };
@@ -7697,101 +7640,272 @@ var Hero13 = function Hero13(props) {
7697
7640
  var _sectionData$, _sectionData$$srcImag, _data$data, _data$data$;
7698
7641
  var listRef = useRef(null);
7699
7642
  var _useState = useState(false);
7700
- var data = props.data;
7643
+ var shopConfig = props.shopConfig,
7644
+ data = props.data;
7701
7645
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
7702
7646
  var _CategoryController = CategoryController(props);
7703
7647
  return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("img", {
7704
7648
  src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : (_sectionData$$srcImag = _sectionData$.srcImages) === null || _sectionData$$srcImag === void 0 ? void 0 : _sectionData$$srcImag[0],
7705
7649
  alt: 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$.title,
7706
7650
  className: "w-full object-cover"
7707
- }));
7708
- };
7709
-
7710
- var Features2 = function Features2(props) {
7711
- var data = props.data;
7712
- var sectionData = data === null || data === void 0 ? void 0 : data.data;
7713
- return /*#__PURE__*/React__default.createElement("div", {
7714
- className: "" + SECTION_DEFAULT_CLASS
7651
+ }), /*#__PURE__*/React__default.createElement("div", {
7652
+ className: "fixed right-6 bottom-10 md:bottom-24 z-50 flex flex-col gap-4 w-max"
7653
+ }, /*#__PURE__*/React__default.createElement("a", {
7654
+ href: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopPhone ? "tel:" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone) : "#"
7715
7655
  }, /*#__PURE__*/React__default.createElement("div", {
7716
- className: "p-6 grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6 lg:gap-8 rounded-xl bg-bgSecondary"
7717
- }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
7718
- return /*#__PURE__*/React__default.createElement("div", {
7719
- className: "flex flex-col gap-2 items-center text-sm lg:text-lg font-semibold text-center",
7720
- key: "dfgg-" + index
7721
- }, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
7722
- className: "w-12 text-primary md:w-16 lg:w-20 xl:w-24 h-24",
7723
- dangerouslySetInnerHTML: {
7724
- __html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
7725
- }
7726
- }) : /*#__PURE__*/React__default.createElement("img", {
7727
- src: item === null || item === void 0 ? void 0 : item.srcImage,
7728
- className: "w-12 md:w-16 lg:w-20 xl:w-24 text-primary",
7729
- alt: "logo"
7730
- }), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title));
7731
- })));
7656
+ className: "relative w-max"
7657
+ }, /*#__PURE__*/React__default.createElement("span", {
7658
+ className: "absolute inset-0 rounded-full bg-primary opacity-30 animate-ping"
7659
+ }), /*#__PURE__*/React__default.createElement("div", {
7660
+ className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
7661
+ }, /*#__PURE__*/React__default.createElement(AiOutlinePhone, {
7662
+ size: 36
7663
+ })))), /*#__PURE__*/React__default.createElement("a", {
7664
+ href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#",
7665
+ target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopMessenger ? "_blank" : "_self"
7666
+ }, /*#__PURE__*/React__default.createElement("div", {
7667
+ className: "relative w-max"
7668
+ }, /*#__PURE__*/React__default.createElement("span", {
7669
+ className: "absolute inset-0 rounded-full bg-primary opacity-30 animate-ping"
7670
+ }), /*#__PURE__*/React__default.createElement("div", {
7671
+ className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
7672
+ }, /*#__PURE__*/React__default.createElement(FaFacebookMessenger, {
7673
+ size: 32
7674
+ })))), /*#__PURE__*/React__default.createElement("a", {
7675
+ href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopFacebookPage) || "#",
7676
+ target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopFacebookPage ? "_blank" : "_self"
7677
+ }, /*#__PURE__*/React__default.createElement("div", {
7678
+ className: "relative w-max"
7679
+ }, /*#__PURE__*/React__default.createElement("span", {
7680
+ className: "absolute inset-0 rounded-full bg-primary opacity-30 animate-ping"
7681
+ }), /*#__PURE__*/React__default.createElement("div", {
7682
+ className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
7683
+ }, /*#__PURE__*/React__default.createElement(SiZalo, {
7684
+ size: 32
7685
+ }))))));
7732
7686
  };
7733
7687
 
7734
- var Features3 = function Features3(props) {
7735
- var _data$sectionTitle;
7688
+ var Hero14 = function Hero14(props) {
7689
+ var _data$data, _data$data$, _data$data$$srcImages, _sectionData$, _sectionData$2, _sectionData$3, _sectionData$4, _sectionData$4$button;
7736
7690
  var shopConfigStyle = props.shopConfigStyle,
7737
- shopConfig = props.shopConfig,
7738
7691
  data = props.data,
7739
- _props$SectionTitle = props.SectionTitle,
7740
- SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
7741
7692
  _props$Link = props.Link,
7742
7693
  Link = _props$Link === void 0 ? null : _props$Link;
7743
7694
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
7744
- data.sectionTitle = data === null || data === void 0 ? void 0 : (_data$sectionTitle = data.sectionTitle) === null || _data$sectionTitle === void 0 ? void 0 : _data$sectionTitle.replace("{shopName}", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName);
7745
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
7746
- _shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
7747
- textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
7748
- _shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
7749
- background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
7750
- _shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
7751
- bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
7752
7695
  return /*#__PURE__*/React__default.createElement("div", {
7753
- className: SECTION_DEFAULT_CLASS + " flex flex-col gap-4 lg:gap-6",
7696
+ className: "relative w-full bg-cover bg-center bg-no-repeat ",
7754
7697
  style: {
7755
- background: background,
7756
- color: textBody
7698
+ backgroundImage: "url(" + (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]) + ")"
7757
7699
  }
7758
- }, /*#__PURE__*/React__default.createElement(SectionTitle, {
7759
- data: data,
7760
- shopConfigStyle: shopConfigStyle
7700
+ }, /*#__PURE__*/React__default.createElement("div", {
7701
+ className: "absolute top-0 w-full h-full bg-black opacity-40 z-0"
7761
7702
  }), /*#__PURE__*/React__default.createElement("div", {
7762
- className: "grid grid-cols-2 sm:grid-cols-4 gap-6 text-sm md:text-base"
7763
- }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
7703
+ className: "relative w-full min-h-[540px] p-12 z-10 flex flex-col gap-6 items-center justify-end bg-gradient-to-t from-black/50 to-transparent"
7704
+ }, /*#__PURE__*/React__default.createElement("div", {
7705
+ className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
7706
+ }, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.title), sectionData !== null && sectionData !== void 0 && (_sectionData$2 = sectionData[0]) !== null && _sectionData$2 !== void 0 && _sectionData$2.description ? /*#__PURE__*/React__default.createElement("div", {
7707
+ className: "text-lg text-center text-white md:text-2xl"
7708
+ }, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$3 = sectionData[0]) === null || _sectionData$3 === void 0 ? void 0 : _sectionData$3.description) : null, 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$button.map(function (button, index) {
7764
7709
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
7765
7710
  Link: Link,
7766
- href: (item === null || item === void 0 ? void 0 : item.link) || convertURL(item === null || item === void 0 ? void 0 : item.route) || "#"
7767
- }, /*#__PURE__*/React__default.createElement("div", {
7768
- className: "grid grid-cols-2 p-3 rounded-lg font-semibold",
7769
- key: "dfsdfj-" + index,
7770
- style: {
7771
- background: bgSecondary
7772
- }
7773
- }, /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title), item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
7774
- className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 h-auto"
7775
- }, /*#__PURE__*/React__default.createElement("div", {
7776
- dangerouslySetInnerHTML: {
7777
- __html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
7778
- }
7779
- })) : /*#__PURE__*/React__default.createElement("img", {
7780
- src: item === null || item === void 0 ? void 0 : item.srcImage,
7781
- className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 object-cover",
7782
- alt: ""
7783
- })));
7711
+ key: "gdf-" + index,
7712
+ href: convertURL(button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
7713
+ }, /*#__PURE__*/React__default.createElement(Button, {
7714
+ label: button === null || button === void 0 ? void 0 : button.label,
7715
+ className: "!bg-secondary",
7716
+ shopConfigStyle: shopConfigStyle
7717
+ }));
7784
7718
  })));
7785
7719
  };
7786
7720
 
7787
- var ProductController = function ProductController(props) {
7788
- var shopConfig = props.shopConfig,
7789
- params = props.params,
7790
- _props$isAutoGetList = props.isAutoGetList,
7791
- isAutoGetList = _props$isAutoGetList === void 0 ? true : _props$isAutoGetList;
7792
- var _useState = useState([]),
7793
- products = _useState[0],
7794
- setProducts = _useState[1];
7721
+ var Hero15 = function Hero15(props) {
7722
+ var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$title, _data$data3, _data$data3$, _data$data4, _data$data4$, _data$data4$$buttons, _data$data5, _data$data5$, _data$data5$$buttons, _data$data5$$buttons$, _data$data6, _data$data6$, _data$data6$$buttons, _data$data6$$buttons$, _data$data7, _data$data7$, _data$data7$$buttons, _data$data7$$buttons$, _data$data8, _data$data8$, _data$data8$$srcImage;
7723
+ var _props$data = props.data,
7724
+ data = _props$data === void 0 ? {} : _props$data,
7725
+ _props$shopConfigStyl = props.shopConfigStyle,
7726
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
7727
+ return /*#__PURE__*/React__default.createElement("div", {
7728
+ className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-2 py-12 !bg-primary gap-6 md:gap-10"
7729
+ }, /*#__PURE__*/React__default.createElement("img", {
7730
+ 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],
7731
+ className: "object-cover max-w-full h-auto border-4 border-secondary block md:hidden"
7732
+ }), /*#__PURE__*/React__default.createElement("div", {
7733
+ className: "relative flex flex-col justify-center gap-6 lg:gap-10"
7734
+ }, /*#__PURE__*/React__default.createElement("div", {
7735
+ className: "text-2xl md:text-4xl !leading-[1.6] font-headingFont text-textSecondary"
7736
+ }, 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 = _data$data2$.title) === null || _data$data2$$title === void 0 ? void 0 : _data$data2$$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
7737
+ className: "text-lg text-textButton"
7738
+ }, 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), /*#__PURE__*/React__default.createElement("hr", {
7739
+ className: "w-1/3"
7740
+ }), (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$$buttons = _data$data4$.buttons) === null || _data$data4$$buttons === void 0 ? void 0 : _data$data4$$buttons.length) > 0 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
7741
+ href: (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$$buttons = _data$data5$.buttons) === null || _data$data5$$buttons === void 0 ? void 0 : (_data$data5$$buttons$ = _data$data5$$buttons[0]) === null || _data$data5$$buttons$ === void 0 ? void 0 : _data$data5$$buttons$.route) || (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$$buttons = _data$data6$.buttons) === null || _data$data6$$buttons === void 0 ? void 0 : (_data$data6$$buttons$ = _data$data6$$buttons[0]) === null || _data$data6$$buttons$ === void 0 ? void 0 : _data$data6$$buttons$.link) || "#"
7742
+ }, /*#__PURE__*/React__default.createElement(Button, {
7743
+ label: data === null || data === void 0 ? void 0 : (_data$data7 = data.data) === null || _data$data7 === void 0 ? void 0 : (_data$data7$ = _data$data7[0]) === null || _data$data7$ === void 0 ? void 0 : (_data$data7$$buttons = _data$data7$.buttons) === null || _data$data7$$buttons === void 0 ? void 0 : (_data$data7$$buttons$ = _data$data7$$buttons[0]) === null || _data$data7$$buttons$ === void 0 ? void 0 : _data$data7$$buttons$.label,
7744
+ shopConfigStyle: shopConfigStyle,
7745
+ className: "!font-normal w-max !bg-secondary"
7746
+ })) : null), /*#__PURE__*/React__default.createElement("img", {
7747
+ src: data === null || data === void 0 ? void 0 : (_data$data8 = data.data) === null || _data$data8 === void 0 ? void 0 : (_data$data8$ = _data$data8[0]) === null || _data$data8$ === void 0 ? void 0 : (_data$data8$$srcImage = _data$data8$.srcImages) === null || _data$data8$$srcImage === void 0 ? void 0 : _data$data8$$srcImage[0],
7748
+ className: "object-cover max-w-full h-auto border-4 border-secondary hidden md:block"
7749
+ }));
7750
+ };
7751
+
7752
+ var Hero16 = function Hero16(props) {
7753
+ var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$srcImage;
7754
+ var _props$data = props.data,
7755
+ data = _props$data === void 0 ? {} : _props$data,
7756
+ _props$shopConfigStyl = props.shopConfigStyle,
7757
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
7758
+ _props$router = props.router,
7759
+ router = _props$router === void 0 ? function () {} : _props$router,
7760
+ _props$Link = props.Link,
7761
+ Link = _props$Link === void 0 ? null : _props$Link;
7762
+ var _useState = useState(""),
7763
+ value = _useState[0],
7764
+ setValue = _useState[1];
7765
+ var handleSearch = function handleSearch(e) {
7766
+ if ((e === null || e === void 0 ? void 0 : e.key) === "Enter" && value && value.length > 0) {
7767
+ router === null || router === void 0 ? void 0 : router.push(genLinkSearch(value));
7768
+ }
7769
+ };
7770
+ return /*#__PURE__*/React__default.createElement("div", {
7771
+ className: "min-h-[480px] w-full h-full relative"
7772
+ }, /*#__PURE__*/React__default.createElement("img", {
7773
+ 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],
7774
+ className: "object-cover max-w-full h-auto"
7775
+ }), /*#__PURE__*/React__default.createElement("div", {
7776
+ className: "absolute top-0 left-0 z-0 bg-secondary opacity-80 w-full h-full"
7777
+ }), /*#__PURE__*/React__default.createElement("div", {
7778
+ className: "w-full md:w-2/3 absolute top-[10%] md:top-1/3 left-0 z-10 px-4 xl:px-20 flex flex-col gap-6 text-textButton my-auto"
7779
+ }, /*#__PURE__*/React__default.createElement("h2", {
7780
+ className: "font-medium text-2xl lg:text-4xl"
7781
+ }, "Thu\u1ED1c t\u1ED1t, gi\xE1 t\u1ED1t - V\xEC s\u1EE9c kh\u1ECFe c\u1EE7a b\u1EA1n"), /*#__PURE__*/React__default.createElement("div", {
7782
+ className: " text-lg lg:text-2xl"
7783
+ }, "Ch\xFAng t\xF4i lu\xF4n n\u1ED5 l\u1EF1c h\u1EBFt m\xECnh cung c\u1EA5p s\u1EA3n ph\u1EA9m v\xE0 d\u1ECBch v\u1EE5 \u0111\xFAng v\u1EDBi gi\xE1 tr\u1ECB m\xE0 kh\xE1ch h\xE0ng mong \u0111\u1EE3i."), /*#__PURE__*/React__default.createElement("div", {
7784
+ className: "flex flex-col md:flex-row gap-4 w-full"
7785
+ }, /*#__PURE__*/React__default.createElement(Input, {
7786
+ wrapClassName: "w-full md:w-2/3 xl:w-[85%]",
7787
+ icons: /*#__PURE__*/React__default.createElement(LuSearch, {
7788
+ className: "text-gray3",
7789
+ size: 18
7790
+ }),
7791
+ placeholder: "Nh\u1EADp t\xEAn s\u1EA3n ph\u1EA9m",
7792
+ inputClassName: "w-full text-textBody",
7793
+ className: "h-12",
7794
+ onKeyDown: function onKeyDown(e) {
7795
+ handleSearch(e);
7796
+ },
7797
+ onChange: setValue
7798
+ }), value && (value === null || value === void 0 ? void 0 : value.length) > 0 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
7799
+ Link: Link,
7800
+ href: genLinkSearch(value)
7801
+ }, /*#__PURE__*/React__default.createElement(Button, {
7802
+ label: "T\xECm ki\u1EBFm",
7803
+ className: "whitespace-nowrap h-12 w-max",
7804
+ shopConfigStyle: shopConfigStyle
7805
+ })) : /*#__PURE__*/React__default.createElement(Button, {
7806
+ label: "T\xECm ki\u1EBFm",
7807
+ className: "whitespace-nowrap w-max h-12",
7808
+ shopConfigStyle: shopConfigStyle
7809
+ }))), /*#__PURE__*/React__default.createElement("div", {
7810
+ className: "absolute bottom-0 right-0 text-primary w-[45%] z-10"
7811
+ }, /*#__PURE__*/React__default.createElement("svg", {
7812
+ viewBox: "0 0 480 212",
7813
+ fill: "none",
7814
+ xmlns: "http://www.w3.org/2000/svg"
7815
+ }, /*#__PURE__*/React__default.createElement("path", {
7816
+ d: "M75.1847 149.804C55 189.553 14.9932 204.532 0 212H480V0C424.514 20.7319 393 94.1529 216.361 62.1956C120.186 44.7957 96.1405 108.537 75.1847 149.804Z",
7817
+ fill: "currentColor"
7818
+ }))), /*#__PURE__*/React__default.createElement("img", {
7819
+ src: 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$$srcImage = _data$data2$.srcImages) === null || _data$data2$$srcImage === void 0 ? void 0 : _data$data2$$srcImage[1],
7820
+ className: "object-cover w-[28%] h-auto absolute right-10 opacity-100 bottom-0 z-10"
7821
+ }));
7822
+ };
7823
+
7824
+ var Features2 = function Features2(props) {
7825
+ var data = props.data;
7826
+ var sectionData = data === null || data === void 0 ? void 0 : data.data;
7827
+ return /*#__PURE__*/React__default.createElement("div", {
7828
+ className: "" + SECTION_DEFAULT_CLASS
7829
+ }, /*#__PURE__*/React__default.createElement("div", {
7830
+ className: "p-6 grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6 lg:gap-8 rounded-xl bg-bgSecondary"
7831
+ }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
7832
+ return /*#__PURE__*/React__default.createElement("div", {
7833
+ className: "flex flex-col gap-2 items-center text-sm lg:text-lg font-semibold text-center",
7834
+ key: "dfgg-" + index
7835
+ }, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
7836
+ className: "w-12 text-primary md:w-16 lg:w-20 xl:w-24 h-24",
7837
+ dangerouslySetInnerHTML: {
7838
+ __html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
7839
+ }
7840
+ }) : /*#__PURE__*/React__default.createElement("img", {
7841
+ src: item === null || item === void 0 ? void 0 : item.srcImage,
7842
+ className: "w-12 md:w-16 lg:w-20 xl:w-24 text-primary",
7843
+ alt: "logo"
7844
+ }), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title));
7845
+ })));
7846
+ };
7847
+
7848
+ var Features3 = function Features3(props) {
7849
+ var _data$sectionTitle;
7850
+ var shopConfigStyle = props.shopConfigStyle,
7851
+ shopConfig = props.shopConfig,
7852
+ data = props.data,
7853
+ _props$SectionTitle = props.SectionTitle,
7854
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
7855
+ _props$Link = props.Link,
7856
+ Link = _props$Link === void 0 ? null : _props$Link;
7857
+ var sectionData = data === null || data === void 0 ? void 0 : data.data;
7858
+ data.sectionTitle = data === null || data === void 0 ? void 0 : (_data$sectionTitle = data.sectionTitle) === null || _data$sectionTitle === void 0 ? void 0 : _data$sectionTitle.replace("{shopName}", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName);
7859
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
7860
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
7861
+ textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
7862
+ _shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
7863
+ background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
7864
+ _shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
7865
+ bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
7866
+ return /*#__PURE__*/React__default.createElement("div", {
7867
+ className: SECTION_DEFAULT_CLASS + " flex flex-col gap-4 lg:gap-6",
7868
+ style: {
7869
+ background: background,
7870
+ color: textBody
7871
+ }
7872
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
7873
+ data: data,
7874
+ shopConfigStyle: shopConfigStyle
7875
+ }), /*#__PURE__*/React__default.createElement("div", {
7876
+ className: "grid grid-cols-2 sm:grid-cols-4 gap-6 text-sm md:text-base"
7877
+ }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
7878
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
7879
+ Link: Link,
7880
+ href: (item === null || item === void 0 ? void 0 : item.link) || convertURL(item === null || item === void 0 ? void 0 : item.route) || "#"
7881
+ }, /*#__PURE__*/React__default.createElement("div", {
7882
+ className: "grid grid-cols-2 p-3 h-full w-full rounded-lg font-semibold",
7883
+ key: "dfsdfj-" + index,
7884
+ style: {
7885
+ background: bgSecondary
7886
+ }
7887
+ }, /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title), item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
7888
+ className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 h-auto"
7889
+ }, /*#__PURE__*/React__default.createElement("div", {
7890
+ dangerouslySetInnerHTML: {
7891
+ __html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
7892
+ }
7893
+ })) : /*#__PURE__*/React__default.createElement("img", {
7894
+ src: item === null || item === void 0 ? void 0 : item.srcImage,
7895
+ className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 object-cover",
7896
+ alt: ""
7897
+ })));
7898
+ })));
7899
+ };
7900
+
7901
+ var ProductController = function ProductController(props) {
7902
+ var shopConfig = props.shopConfig,
7903
+ params = props.params,
7904
+ _props$isAutoGetList = props.isAutoGetList,
7905
+ isAutoGetList = _props$isAutoGetList === void 0 ? true : _props$isAutoGetList;
7906
+ var _useState = useState([]),
7907
+ products = _useState[0],
7908
+ setProducts = _useState[1];
7795
7909
  var _useState2 = useState(false),
7796
7910
  loading = _useState2[0],
7797
7911
  setLoading = _useState2[1];
@@ -7813,8 +7927,6 @@ var ProductController = function ProductController(props) {
7813
7927
  setLoading(true);
7814
7928
  var _temp = _catch(function () {
7815
7929
  var filterParams = _extends({}, defaultParams, params);
7816
- console.log("filterParams params", params);
7817
- console.log("filterParams", filterParams);
7818
7930
  return Promise.resolve(getProductListApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId, filterParams)).then(function (res) {
7819
7931
  var _res$data, _res$data$status;
7820
7932
  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) {
@@ -8158,33 +8270,34 @@ var ProductPrice = function ProductPrice(props) {
8158
8270
  }
8159
8271
  };
8160
8272
  return /*#__PURE__*/React__default.createElement("div", {
8161
- className: className
8273
+ className: "flex gap-4 flex-wrap " + className
8162
8274
  }, /*#__PURE__*/React__default.createElement("span", {
8163
- className: "text-primary font-semibold mr-4 " + priceClassName,
8275
+ className: "text-primary font-semibold " + priceClassName,
8164
8276
  style: style
8165
8277
  }, displayPrice), displayPriceBeforeDiscount !== displayPrice && displayPriceBeforeDiscount != null ? /*#__PURE__*/React__default.createElement("span", {
8166
8278
  className: "text-gray3 line-through " + priceBeforeDiscountClassName + " "
8167
- }, "200,000\u0111") : null);
8279
+ }, displayPriceBeforeDiscount) : null);
8168
8280
  };
8169
8281
 
8170
8282
  var ProductItem1 = function ProductItem1(props) {
8283
+ var _product$productInfo, _product$productInfo2;
8171
8284
  var product = props.product;
8172
8285
  return /*#__PURE__*/React__default.createElement("div", {
8173
8286
  className: "flex"
8174
8287
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
8175
- product: product,
8288
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
8176
8289
  className: "!w-20 rounded-lg"
8177
8290
  }), /*#__PURE__*/React__default.createElement("div", {
8178
8291
  className: "ml-4 border-b border-stroke flex-1"
8179
8292
  }, /*#__PURE__*/React__default.createElement("div", {
8180
8293
  className: "text-lg"
8181
- }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement("div", {
8294
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement("div", {
8182
8295
  className: "flex mt-2"
8183
8296
  }, /*#__PURE__*/React__default.createElement("div", {
8184
8297
  className: "flex-1 text-gray3"
8185
- }, getDurationValue(product === null || product === void 0 ? void 0 : product.attributes)), /*#__PURE__*/React__default.createElement(ProductPrice, {
8186
- product: product
8187
- }))));
8298
+ }, getDurationValue(product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.attributes)), product !== null && product !== void 0 && product.isShowProductPriceOnLanding ? /*#__PURE__*/React__default.createElement(ProductPrice, {
8299
+ product: product === null || product === void 0 ? void 0 : product.productInfo
8300
+ }) : null)));
8188
8301
  };
8189
8302
 
8190
8303
  var Dash = function Dash(props) {
@@ -8224,6 +8337,7 @@ var NotFoundProduct = function NotFoundProduct(props) {
8224
8337
  };
8225
8338
 
8226
8339
  var TreatmentsCategory7 = function TreatmentsCategory7(props) {
8340
+ var _products$slice;
8227
8341
  var _props$shopConfigStyl = props.shopConfigStyle,
8228
8342
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
8229
8343
  _props$data = props.data,
@@ -8236,7 +8350,8 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
8236
8350
  _shopConfigStyle$colo2 = _shopConfigStyle$colo.secondary,
8237
8351
  secondary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2;
8238
8352
  var _useState = useState({
8239
- types: "1"
8353
+ types: "1,10",
8354
+ size: 12
8240
8355
  }),
8241
8356
  params = _useState[0],
8242
8357
  setParams = _useState[1];
@@ -8253,15 +8368,27 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
8253
8368
  var _useState2 = useState(0),
8254
8369
  selectedCategory = _useState2[0],
8255
8370
  setSelectedCategory = _useState2[1];
8371
+ var _useState3 = useState(true),
8372
+ isGetMore = _useState3[0],
8373
+ setIsGetMore = _useState3[1];
8256
8374
  useEffect(function () {
8257
8375
  var newParams = _extends({}, params, {
8258
- categoryId: selectedCategory
8376
+ categoryId: selectedCategory,
8377
+ size: 12
8259
8378
  });
8260
8379
  if (!selectedCategory) {
8261
8380
  delete newParams.categoryId;
8262
8381
  }
8263
8382
  setParams(newParams);
8264
8383
  }, [selectedCategory]);
8384
+ var handleGetMoreProducts = function handleGetMoreProducts() {
8385
+ setIsGetMore(false);
8386
+ setParams(function (prev) {
8387
+ return _extends({}, prev, {
8388
+ size: (prev === null || prev === void 0 ? void 0 : prev.size) + 4
8389
+ });
8390
+ });
8391
+ };
8265
8392
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
8266
8393
  className: SECTION_DEFAULT_CLASS + " relative"
8267
8394
  }, /*#__PURE__*/React__default.createElement(SectionTitle, {
@@ -8278,25 +8405,32 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
8278
8405
  key: index,
8279
8406
  className: "p-3 flex gap-3 shrink-0 cursor-pointer text-base " + (selectedCategory === item.categoryId ? "bg-primary text-textButton" : ""),
8280
8407
  onClick: function onClick() {
8281
- return setSelectedCategory(item.categoryId);
8408
+ setSelectedCategory(item.categoryId);
8409
+ setIsGetMore(true);
8282
8410
  }
8283
8411
  }, item === null || item === void 0 ? void 0 : item.cateName);
8284
8412
  }
8285
- }), loading ? /*#__PURE__*/React__default.createElement("div", {
8413
+ }), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
8286
8414
  className: "flex w-full justify-center p-12"
8287
- }, /*#__PURE__*/React__default.createElement(Loading, null)) : products !== null && products !== void 0 && products.length ? /*#__PURE__*/React__default.createElement("div", {
8415
+ }, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
8288
8416
  className: "grid grid-cols-1 md:grid-cols-2 gap-10 mt-6"
8289
- }, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
8417
+ }, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, index) {
8290
8418
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
8291
8419
  key: index,
8292
8420
  Link: Link,
8293
8421
  href: getLinkServiceDetail(product === null || product === void 0 ? void 0 : product.productInfo)
8294
8422
  }, /*#__PURE__*/React__default.createElement(ProductItem1, {
8295
- product: product === null || product === void 0 ? void 0 : product.productInfo
8423
+ product: product
8296
8424
  }));
8297
8425
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, {
8298
8426
  text: "d\u1ECBch v\u1EE5"
8299
- })), /*#__PURE__*/React__default.createElement(Dash, {
8427
+ }), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement("div", {
8428
+ className: "w-full flex justify-center mt-6"
8429
+ }, /*#__PURE__*/React__default.createElement(Button, {
8430
+ label: "Xem thêm",
8431
+ onClick: handleGetMoreProducts,
8432
+ className: "" + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass)
8433
+ })) : null), /*#__PURE__*/React__default.createElement(Dash, {
8300
8434
  color: secondary
8301
8435
  }));
8302
8436
  };
@@ -8314,7 +8448,7 @@ var TreatmentsList6 = function TreatmentsList6(props) {
8314
8448
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
8315
8449
  var _useState = useState({
8316
8450
  size: 12,
8317
- types: "1"
8451
+ types: "1,10"
8318
8452
  }),
8319
8453
  params = _useState[0],
8320
8454
  setParams = _useState[1];
@@ -8347,10 +8481,12 @@ var TreatmentsList6 = function TreatmentsList6(props) {
8347
8481
  return /*#__PURE__*/React__default.createElement(TreatmentItem, {
8348
8482
  Link: Link,
8349
8483
  shopConfigStyle: shopConfigStyle,
8350
- product: product === null || product === void 0 ? void 0 : product.productInfo,
8484
+ product: product,
8351
8485
  key: "htrhr-" + idx
8352
8486
  });
8353
- })) : /*#__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, {
8487
+ })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, {
8488
+ text: "d\u1ECBch v\u1EE5"
8489
+ }), !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, {
8354
8490
  label: "Xem thêm",
8355
8491
  onClick: handleGetMoreProducts,
8356
8492
  className: "mx-auto " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass),
@@ -8511,77 +8647,173 @@ var BookingController = function BookingController(props) {
8511
8647
  };
8512
8648
  };
8513
8649
 
8514
- var Select = forwardRef(function (props, ref) {
8650
+ var DateTimePicker = forwardRef(function (props, ref) {
8515
8651
  var _props$label = props.label,
8516
8652
  label = _props$label === void 0 ? "" : _props$label,
8517
- _props$labelClassName = props.labelClassName,
8518
- labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
8519
- _props$placeholder = props.placeholder,
8520
- placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
8521
8653
  _props$className = props.className,
8522
8654
  className = _props$className === void 0 ? "" : _props$className,
8523
- _props$optionClassNam = props.optionClassName,
8524
- optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
8525
- _props$wrapClassName = props.wrapClassName,
8526
- wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
8527
- _props$selectClassNam = props.selectClassName,
8528
- selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
8529
- _props$disabled = props.disabled,
8530
- disabled = _props$disabled === void 0 ? false : _props$disabled,
8531
- _props$rules = props.rules,
8532
- rules = _props$rules === void 0 ? [] : _props$rules,
8533
- options = props.options,
8655
+ _props$labelClassName = props.labelClassName,
8656
+ labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
8534
8657
  _props$defaultValue = props.defaultValue,
8535
- defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
8536
- handleSearchOption = props.handleSearchOption,
8537
- _props$isMulti = props.isMulti,
8538
- isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
8539
- _props$onClick = props.onClick,
8540
- onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
8541
- _props$isButtonDelete = props.isButtonDelete,
8542
- isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
8543
- _props$funcDelete = props.funcDelete,
8544
- funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
8545
- _props$isSearch = props.isSearch,
8546
- isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
8547
- renderItem = props.renderItem;
8548
- var _useState = useState(false),
8549
- isOpen = _useState[0],
8550
- setIsOpen = _useState[1];
8551
- var selectRef = useRef(null);
8658
+ defaultValue = _props$defaultValue === void 0 ? new Date() : _props$defaultValue,
8659
+ _props$time = props.time,
8660
+ time = _props$time === void 0 ? false : _props$time,
8661
+ rules = props.rules;
8662
+ var _useState = useState(defaultValue),
8663
+ value = _useState[0],
8664
+ _setValue = _useState[1];
8552
8665
  var _useState2 = useState(""),
8553
8666
  error = _useState2[0],
8554
8667
  _setError = _useState2[1];
8555
- var _useState3 = useState(""),
8556
- inputSearch = _useState3[0],
8557
- setInputSearch = _useState3[1];
8558
- var _useState4 = useState(defaultValue),
8559
- value = _useState4[0],
8560
- setValue = _useState4[1];
8561
- var _useState5 = useState(options),
8562
- listOptions = _useState5[0],
8563
- setListOptions = _useState5[1];
8564
- var dropdownRef = useRef(null);
8565
- var _useState6 = useState('bottom'),
8566
- dropdownPosition = _useState6[0],
8567
- setDropdownPosition = _useState6[1];
8568
- var inputRef = useRef(null);
8569
- useEffect(function () {
8570
- if (isMulti) setValue(defaultValue);
8571
- }, [defaultValue]);
8572
- useEffect(function () {
8573
- setListOptions(options);
8574
- if (!isMulti) setValue(defaultValue);
8575
- }, [options]);
8576
- useEffect(function () {
8577
- var delayDebounceFn = setTimeout(function () {
8578
- handleSearch === null || handleSearch === void 0 ? void 0 : handleSearch(inputSearch);
8579
- }, 500);
8580
- return function () {
8581
- return clearTimeout(delayDebounceFn);
8582
- };
8583
- }, [inputSearch]);
8584
- useEffect(function () {
8668
+ var _className = "h-10 flex items-center py-1 px-2 border border-stroke rounded bg-white cursor-pointer " + className;
8669
+ var CustomInput = forwardRef(function (_ref, ref) {
8670
+ var value = _ref.value,
8671
+ onClick = _ref.onClick,
8672
+ className = _ref.className;
8673
+ return /*#__PURE__*/React__default.createElement("div", {
8674
+ className: className,
8675
+ onClick: onClick,
8676
+ ref: ref
8677
+ }, value);
8678
+ });
8679
+ useImperativeHandle(ref, function () {
8680
+ return {
8681
+ validateData: function validateData() {
8682
+ return _validateData();
8683
+ },
8684
+ setValue: function setValue(text) {
8685
+ return _setValue(text);
8686
+ },
8687
+ getValue: function getValue() {
8688
+ return value;
8689
+ },
8690
+ setError: function setError(err) {
8691
+ return _setError(err);
8692
+ }
8693
+ };
8694
+ });
8695
+ var _validateData = function _validateData() {
8696
+ var count = 0;
8697
+ rules === null || rules === void 0 ? void 0 : rules.forEach(function (e) {
8698
+ var _e$pattern, _e$validate;
8699
+ if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
8700
+ _setError(e === null || e === void 0 ? void 0 : e.message);
8701
+ count++;
8702
+ return false;
8703
+ } else if ((e === null || e === void 0 ? void 0 : e.type) === 'pattern' && !(e !== null && e !== void 0 && (_e$pattern = e.pattern) !== null && _e$pattern !== void 0 && _e$pattern.test(value))) {
8704
+ _setError(e === null || e === void 0 ? void 0 : e.message);
8705
+ count++;
8706
+ return false;
8707
+ } else if (value !== "" && (e === null || e === void 0 ? void 0 : e.type) === "validate" && e !== null && e !== void 0 && e.validate && !(e !== null && e !== void 0 && (_e$validate = e.validate) !== null && _e$validate !== void 0 && _e$validate.call(e))) {
8708
+ _setError(e === null || e === void 0 ? void 0 : e.message);
8709
+ count++;
8710
+ return false;
8711
+ }
8712
+ });
8713
+ if (count) {
8714
+ return false;
8715
+ } else {
8716
+ _setError('');
8717
+ return true;
8718
+ }
8719
+ };
8720
+ var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
8721
+ return (e === null || e === void 0 ? void 0 : e.type) === "required";
8722
+ }));
8723
+ var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
8724
+ className: "text-danger"
8725
+ }, " *") : null;
8726
+ return /*#__PURE__*/React__default.createElement("div", {
8727
+ className: "w-full"
8728
+ }, label ? /*#__PURE__*/React__default.createElement("div", {
8729
+ className: "mb-1 " + labelClassName
8730
+ }, label, labelRequired) : null, /*#__PURE__*/React__default.createElement(DatePicker, {
8731
+ selected: value,
8732
+ onChange: function onChange(date) {
8733
+ _setValue(date);
8734
+ },
8735
+ customInput: /*#__PURE__*/React__default.createElement(CustomInput, {
8736
+ className: _className
8737
+ }),
8738
+ dateFormat: time ? "dd/MM/yyyy HH:mm" : "dd/MM/yyyy",
8739
+ showTimeSelect: time,
8740
+ timeIntervals: 15,
8741
+ wrapperClassName: "w-full"
8742
+ }), error ? /*#__PURE__*/React__default.createElement("div", {
8743
+ className: "text-danger"
8744
+ }, error) : null);
8745
+ });
8746
+
8747
+ var Select = forwardRef(function (props, ref) {
8748
+ var _props$label = props.label,
8749
+ label = _props$label === void 0 ? "" : _props$label,
8750
+ _props$labelClassName = props.labelClassName,
8751
+ labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
8752
+ _props$placeholder = props.placeholder,
8753
+ placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
8754
+ _props$className = props.className,
8755
+ className = _props$className === void 0 ? "" : _props$className,
8756
+ _props$optionClassNam = props.optionClassName,
8757
+ optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
8758
+ _props$wrapClassName = props.wrapClassName,
8759
+ wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
8760
+ _props$selectClassNam = props.selectClassName,
8761
+ selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
8762
+ _props$disabled = props.disabled,
8763
+ disabled = _props$disabled === void 0 ? false : _props$disabled,
8764
+ _props$rules = props.rules,
8765
+ rules = _props$rules === void 0 ? [] : _props$rules,
8766
+ options = props.options,
8767
+ _props$defaultValue = props.defaultValue,
8768
+ defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
8769
+ _props$isMulti = props.isMulti,
8770
+ isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
8771
+ _props$onClick = props.onClick,
8772
+ onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
8773
+ _props$isButtonDelete = props.isButtonDelete,
8774
+ isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
8775
+ _props$funcDelete = props.funcDelete,
8776
+ funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
8777
+ _props$isSearch = props.isSearch,
8778
+ isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
8779
+ renderItem = props.renderItem;
8780
+ var _useState = useState(false),
8781
+ isOpen = _useState[0],
8782
+ setIsOpen = _useState[1];
8783
+ var selectRef = useRef(null);
8784
+ var _useState2 = useState(""),
8785
+ error = _useState2[0],
8786
+ _setError = _useState2[1];
8787
+ var _useState3 = useState(""),
8788
+ inputSearch = _useState3[0],
8789
+ setInputSearch = _useState3[1];
8790
+ var _useState4 = useState(defaultValue),
8791
+ value = _useState4[0],
8792
+ setValue = _useState4[1];
8793
+ var _useState5 = useState(options),
8794
+ listOptions = _useState5[0],
8795
+ setListOptions = _useState5[1];
8796
+ var dropdownRef = useRef(null);
8797
+ var _useState6 = useState('bottom'),
8798
+ dropdownPosition = _useState6[0],
8799
+ setDropdownPosition = _useState6[1];
8800
+ var inputRef = useRef(null);
8801
+ useEffect(function () {
8802
+ if (isMulti) setValue(defaultValue);
8803
+ }, [defaultValue]);
8804
+ useEffect(function () {
8805
+ setListOptions(options);
8806
+ if (!isMulti) setValue(defaultValue);
8807
+ }, [options]);
8808
+ useEffect(function () {
8809
+ var delayDebounceFn = setTimeout(function () {
8810
+ handleSearch === null || handleSearch === void 0 ? void 0 : handleSearch(inputSearch);
8811
+ }, 600);
8812
+ return function () {
8813
+ return clearTimeout(delayDebounceFn);
8814
+ };
8815
+ }, [inputSearch]);
8816
+ useEffect(function () {
8585
8817
  var _inputRef$current;
8586
8818
  inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
8587
8819
  var updateDropdownPosition = function updateDropdownPosition() {
@@ -8658,20 +8890,13 @@ var Select = forwardRef(function (props, ref) {
8658
8890
  }
8659
8891
  };
8660
8892
  var handleSearch = function handleSearch(searchValue) {
8661
- if (handleSearchOption && typeof handleSearchOption === 'function') {
8662
- handleSearchOption === null || handleSearchOption === void 0 ? void 0 : handleSearchOption(searchValue);
8663
- } else {
8664
- var listFilterOptions = options.filter(function (item) {
8665
- var _item$label;
8666
- return item === null || item === void 0 ? void 0 : (_item$label = item.label) === null || _item$label === void 0 ? void 0 : _item$label.toLowerCase().includes(searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase());
8667
- });
8668
- setListOptions(listFilterOptions);
8669
- }
8893
+ var listFilterOptions = options.filter(function (item) {
8894
+ var _item$label;
8895
+ return item === null || item === void 0 ? void 0 : (_item$label = item.label) === null || _item$label === void 0 ? void 0 : _item$label.toLowerCase().includes(searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase());
8896
+ });
8897
+ setListOptions(listFilterOptions);
8670
8898
  };
8671
8899
  var handleToggleSelect = function handleToggleSelect() {
8672
- if (!isOpen && handleSearchOption && typeof handleSearchOption === 'function') {
8673
- handleSearchOption("");
8674
- }
8675
8900
  setIsOpen(!isOpen);
8676
8901
  setInputSearch("");
8677
8902
  setListOptions(options);
@@ -8707,7 +8932,7 @@ var Select = forwardRef(function (props, ref) {
8707
8932
  }, label ? /*#__PURE__*/React__default.createElement("div", {
8708
8933
  className: "mb-1 " + labelClassName
8709
8934
  }, label, " ", labelRequired) : null, /*#__PURE__*/React__default.createElement("div", {
8710
- className: "flex flex-col gap-2 rounded-lg w-full bg-white " + (disabled ? "!bg-gray6" : "") + " border " + className
8935
+ className: "flex flex-col gap-2 rounded-lg w-full bg-white " + (disabled ? "!bg-gray6" : "") + " border border-stroke " + className
8711
8936
  }, /*#__PURE__*/React__default.createElement("button", {
8712
8937
  className: " w-full h-10 bg-transparent flex justify-between items-center px-3 py-2 " + selectClassName,
8713
8938
  onClick: handleToggleSelect,
@@ -8770,103 +8995,6 @@ var Select = forwardRef(function (props, ref) {
8770
8995
  });
8771
8996
  var Select$1 = memo(Select);
8772
8997
 
8773
- var DateTimePicker = forwardRef(function (props, ref) {
8774
- var _props$label = props.label,
8775
- label = _props$label === void 0 ? "" : _props$label,
8776
- _props$className = props.className,
8777
- className = _props$className === void 0 ? "" : _props$className,
8778
- _props$labelClassName = props.labelClassName,
8779
- labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
8780
- _props$defaultValue = props.defaultValue,
8781
- defaultValue = _props$defaultValue === void 0 ? new Date() : _props$defaultValue,
8782
- _props$time = props.time,
8783
- time = _props$time === void 0 ? false : _props$time,
8784
- rules = props.rules;
8785
- var _useState = useState(defaultValue),
8786
- value = _useState[0],
8787
- _setValue = _useState[1];
8788
- var _useState2 = useState(""),
8789
- error = _useState2[0],
8790
- _setError = _useState2[1];
8791
- var _className = "h-10 flex items-center py-1 px-2 border border-stroke rounded bg-white cursor-pointer " + className;
8792
- var CustomInput = forwardRef(function (_ref, ref) {
8793
- var value = _ref.value,
8794
- onClick = _ref.onClick,
8795
- className = _ref.className;
8796
- return /*#__PURE__*/React__default.createElement("div", {
8797
- className: className,
8798
- onClick: onClick,
8799
- ref: ref
8800
- }, value);
8801
- });
8802
- useImperativeHandle(ref, function () {
8803
- return {
8804
- validateData: function validateData() {
8805
- return _validateData();
8806
- },
8807
- setValue: function setValue(text) {
8808
- return _setValue(text);
8809
- },
8810
- getValue: function getValue() {
8811
- return value;
8812
- },
8813
- setError: function setError(err) {
8814
- return _setError(err);
8815
- }
8816
- };
8817
- });
8818
- var _validateData = function _validateData() {
8819
- var count = 0;
8820
- rules === null || rules === void 0 ? void 0 : rules.forEach(function (e) {
8821
- var _e$pattern, _e$validate;
8822
- if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
8823
- _setError(e === null || e === void 0 ? void 0 : e.message);
8824
- count++;
8825
- return false;
8826
- } else if ((e === null || e === void 0 ? void 0 : e.type) === 'pattern' && !(e !== null && e !== void 0 && (_e$pattern = e.pattern) !== null && _e$pattern !== void 0 && _e$pattern.test(value))) {
8827
- _setError(e === null || e === void 0 ? void 0 : e.message);
8828
- count++;
8829
- return false;
8830
- } else if (value !== "" && (e === null || e === void 0 ? void 0 : e.type) === "validate" && e !== null && e !== void 0 && e.validate && !(e !== null && e !== void 0 && (_e$validate = e.validate) !== null && _e$validate !== void 0 && _e$validate.call(e))) {
8831
- _setError(e === null || e === void 0 ? void 0 : e.message);
8832
- count++;
8833
- return false;
8834
- }
8835
- });
8836
- if (count) {
8837
- return false;
8838
- } else {
8839
- _setError('');
8840
- return true;
8841
- }
8842
- };
8843
- var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
8844
- return (e === null || e === void 0 ? void 0 : e.type) === "required";
8845
- }));
8846
- var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
8847
- className: "text-danger"
8848
- }, " *") : null;
8849
- return /*#__PURE__*/React__default.createElement("div", {
8850
- className: "w-full"
8851
- }, label ? /*#__PURE__*/React__default.createElement("div", {
8852
- className: "mb-1 " + labelClassName
8853
- }, label, labelRequired) : null, /*#__PURE__*/React__default.createElement(DatePicker, {
8854
- selected: value,
8855
- onChange: function onChange(date) {
8856
- _setValue(date);
8857
- },
8858
- customInput: /*#__PURE__*/React__default.createElement(CustomInput, {
8859
- className: _className
8860
- }),
8861
- dateFormat: time ? "dd/MM/yyyy HH:mm" : "dd/MM/yyyy",
8862
- showTimeSelect: time,
8863
- timeIntervals: 15,
8864
- wrapperClassName: "w-full"
8865
- }), error ? /*#__PURE__*/React__default.createElement("div", {
8866
- className: "text-danger"
8867
- }, error) : null);
8868
- });
8869
-
8870
8998
  var InputPhoneNumber = forwardRef(function (props, ref) {
8871
8999
  var _props$label = props.label,
8872
9000
  label = _props$label === void 0 ? "" : _props$label,
@@ -9015,150 +9143,312 @@ var InputPhoneNumber = forwardRef(function (props, ref) {
9015
9143
  }, error) : null);
9016
9144
  });
9017
9145
 
9018
- var dayjs_min = createCommonjsModule(function (module, exports) {
9019
- !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
9020
- });
9021
-
9022
- var js_cookie = createCommonjsModule(function (module, exports) {
9023
- (function (global, factory) {
9024
- module.exports = factory() ;
9025
- })(commonjsGlobal, (function () {
9026
- /* eslint-disable no-var */
9027
- function assign (target) {
9028
- for (var i = 1; i < arguments.length; i++) {
9029
- var source = arguments[i];
9030
- for (var key in source) {
9031
- target[key] = source[key];
9032
- }
9033
- }
9034
- return target
9035
- }
9036
- /* eslint-enable no-var */
9037
-
9038
- /* eslint-disable no-var */
9039
- var defaultConverter = {
9040
- read: function (value) {
9041
- if (value[0] === '"') {
9042
- value = value.slice(1, -1);
9043
- }
9044
- return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent)
9045
- },
9046
- write: function (value) {
9047
- return encodeURIComponent(value).replace(
9048
- /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
9049
- decodeURIComponent
9050
- )
9146
+ var Select$2 = forwardRef(function (props, ref) {
9147
+ var _props$label = props.label,
9148
+ label = _props$label === void 0 ? "" : _props$label,
9149
+ _props$labelClassName = props.labelClassName,
9150
+ labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
9151
+ _props$placeholder = props.placeholder,
9152
+ placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
9153
+ _props$className = props.className,
9154
+ className = _props$className === void 0 ? "" : _props$className,
9155
+ _props$optionClassNam = props.optionClassName,
9156
+ optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
9157
+ _props$wrapClassName = props.wrapClassName,
9158
+ wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
9159
+ _props$selectClassNam = props.selectClassName,
9160
+ selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
9161
+ _props$disabled = props.disabled,
9162
+ disabled = _props$disabled === void 0 ? false : _props$disabled,
9163
+ _props$rules = props.rules,
9164
+ rules = _props$rules === void 0 ? [] : _props$rules,
9165
+ options = props.options,
9166
+ _props$defaultValue = props.defaultValue,
9167
+ defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
9168
+ handleSearchOption = props.handleSearchOption,
9169
+ _props$isMulti = props.isMulti,
9170
+ isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
9171
+ _props$onClick = props.onClick,
9172
+ onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
9173
+ _props$isButtonDelete = props.isButtonDelete,
9174
+ isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
9175
+ _props$funcDelete = props.funcDelete,
9176
+ funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
9177
+ setParams = props.setParams,
9178
+ _props$isSearch = props.isSearch,
9179
+ isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
9180
+ renderItem = props.renderItem;
9181
+ var _useState = useState(false),
9182
+ isOpen = _useState[0],
9183
+ setIsOpen = _useState[1];
9184
+ var selectRef = useRef(null);
9185
+ var _useState2 = useState(""),
9186
+ error = _useState2[0],
9187
+ _setError = _useState2[1];
9188
+ var _useState3 = useState(""),
9189
+ inputSearch = _useState3[0],
9190
+ setInputSearch = _useState3[1];
9191
+ var _useState4 = useState(defaultValue),
9192
+ value = _useState4[0],
9193
+ setValue = _useState4[1];
9194
+ var _useState5 = useState(options),
9195
+ listOptions = _useState5[0],
9196
+ setListOptions = _useState5[1];
9197
+ var dropdownRef = useRef(null);
9198
+ var _useState6 = useState('bottom'),
9199
+ dropdownPosition = _useState6[0],
9200
+ setDropdownPosition = _useState6[1];
9201
+ var inputRef = useRef(null);
9202
+ var _useState7 = useState(12),
9203
+ nextTrigger = _useState7[0],
9204
+ setNextTrigger = _useState7[1];
9205
+ var optionRef = useRef(null);
9206
+ useEffect(function () {
9207
+ if (isMulti) setValue(defaultValue);
9208
+ }, [defaultValue]);
9209
+ useEffect(function () {
9210
+ setListOptions(options);
9211
+ if (!isMulti) setValue(defaultValue);
9212
+ }, [options]);
9213
+ useEffect(function () {
9214
+ if (typeof setParams !== 'function') return;
9215
+ var handleScroll = function handleScroll() {
9216
+ if (!optionRef.current) return;
9217
+ var children = optionRef.current.querySelectorAll('div.option');
9218
+ var parentRect = optionRef.current.getBoundingClientRect();
9219
+ children.forEach(function (child, index) {
9220
+ var rect = child.getBoundingClientRect();
9221
+ if (rect.top >= parentRect.top && rect.bottom <= parentRect.bottom) {
9222
+ if (index === nextTrigger) {
9223
+ setParams === null || setParams === void 0 ? void 0 : setParams(function (prev) {
9224
+ return _extends({}, prev, {
9225
+ size: (prev === null || prev === void 0 ? void 0 : prev.size) + 8
9226
+ });
9227
+ });
9228
+ setNextTrigger(function (prev) {
9229
+ return prev + 8;
9230
+ });
9231
+ }
9232
+ }
9233
+ });
9234
+ };
9235
+ if (optionRef.current) {
9236
+ optionRef.current.addEventListener('scroll', handleScroll);
9051
9237
  }
9052
- };
9053
- /* eslint-enable no-var */
9054
-
9055
- /* eslint-disable no-var */
9056
-
9057
- function init (converter, defaultAttributes) {
9058
- function set (name, value, attributes) {
9059
- if (typeof document === 'undefined') {
9060
- return
9061
- }
9062
-
9063
- attributes = assign({}, defaultAttributes, attributes);
9064
-
9065
- if (typeof attributes.expires === 'number') {
9066
- attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
9238
+ return function () {
9239
+ if (optionRef.current) {
9240
+ optionRef.current.removeEventListener('scroll', handleScroll);
9067
9241
  }
9068
- if (attributes.expires) {
9069
- attributes.expires = attributes.expires.toUTCString();
9242
+ };
9243
+ }, [listOptions, nextTrigger]);
9244
+ useEffect(function () {
9245
+ var delayDebounceFn = setTimeout(function () {
9246
+ handleSearch === null || handleSearch === void 0 ? void 0 : handleSearch(inputSearch);
9247
+ if (optionRef.current) {
9248
+ optionRef.current.scrollTop = 0;
9070
9249
  }
9071
-
9072
- name = encodeURIComponent(name)
9073
- .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
9074
- .replace(/[()]/g, escape);
9075
-
9076
- var stringifiedAttributes = '';
9077
- for (var attributeName in attributes) {
9078
- if (!attributes[attributeName]) {
9079
- continue
9080
- }
9081
-
9082
- stringifiedAttributes += '; ' + attributeName;
9083
-
9084
- if (attributes[attributeName] === true) {
9085
- continue
9250
+ }, 600);
9251
+ return function () {
9252
+ return clearTimeout(delayDebounceFn);
9253
+ };
9254
+ }, [inputSearch]);
9255
+ useEffect(function () {
9256
+ var _inputRef$current;
9257
+ inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
9258
+ var updateDropdownPosition = function updateDropdownPosition() {
9259
+ if (selectRef.current && dropdownRef.current) {
9260
+ var _selectRef$current, _window;
9261
+ var selectRect = selectRef === null || selectRef === void 0 ? void 0 : (_selectRef$current = selectRef.current) === null || _selectRef$current === void 0 ? void 0 : _selectRef$current.getBoundingClientRect();
9262
+ var spaceBelow = ((_window = window) === null || _window === void 0 ? void 0 : _window.innerHeight) - (selectRect === null || selectRect === void 0 ? void 0 : selectRect.bottom);
9263
+ var spaceAbove = selectRect === null || selectRect === void 0 ? void 0 : selectRect.top;
9264
+ if (spaceBelow < spaceAbove) {
9265
+ setDropdownPosition('top');
9266
+ } else {
9267
+ setDropdownPosition('bottom');
9086
9268
  }
9087
-
9088
- // Considers RFC 6265 section 5.2:
9089
- // ...
9090
- // 3. If the remaining unparsed-attributes contains a %x3B (";")
9091
- // character:
9092
- // Consume the characters of the unparsed-attributes up to,
9093
- // not including, the first %x3B (";") character.
9094
- // ...
9095
- stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
9096
9269
  }
9097
-
9098
- return (document.cookie =
9099
- name + '=' + converter.write(value, name) + stringifiedAttributes)
9270
+ };
9271
+ if (isOpen) {
9272
+ updateDropdownPosition();
9273
+ window.addEventListener('resize', updateDropdownPosition);
9100
9274
  }
9101
-
9102
- function get (name) {
9103
- if (typeof document === 'undefined' || (arguments.length && !name)) {
9104
- return
9275
+ return function () {
9276
+ window.removeEventListener('resize', updateDropdownPosition);
9277
+ };
9278
+ }, [isOpen]);
9279
+ var handleClickOutside = function handleClickOutside(event) {
9280
+ var _selectRef$current2;
9281
+ if (selectRef !== null && selectRef !== void 0 && selectRef.current && !(selectRef !== null && selectRef !== void 0 && (_selectRef$current2 = selectRef.current) !== null && _selectRef$current2 !== void 0 && _selectRef$current2.contains(event.target))) {
9282
+ setIsOpen(false);
9283
+ setInputSearch("");
9284
+ setListOptions(options);
9285
+ }
9286
+ };
9287
+ useEffect(function () {
9288
+ document.addEventListener('click', handleClickOutside);
9289
+ return function () {
9290
+ document.removeEventListener('click', handleClickOutside);
9291
+ };
9292
+ }, []);
9293
+ useImperativeHandle(ref, function () {
9294
+ return {
9295
+ validateData: function validateData() {
9296
+ return _validateData();
9297
+ },
9298
+ setError: function setError(err) {
9299
+ return _setError(err);
9105
9300
  }
9106
-
9107
- // To prevent the for loop in the first place assign an empty array
9108
- // in case there are no cookies at all.
9109
- var cookies = document.cookie ? document.cookie.split('; ') : [];
9110
- var jar = {};
9111
- for (var i = 0; i < cookies.length; i++) {
9112
- var parts = cookies[i].split('=');
9113
- var value = parts.slice(1).join('=');
9114
-
9115
- try {
9116
- var found = decodeURIComponent(parts[0]);
9117
- jar[found] = converter.read(value, found);
9118
-
9119
- if (name === found) {
9120
- break
9121
- }
9122
- } catch (e) {}
9301
+ };
9302
+ });
9303
+ var isEmpty = function isEmpty(value) {
9304
+ var _Object$keys;
9305
+ if (Array !== null && Array !== void 0 && Array.isArray(value)) return (value === null || value === void 0 ? void 0 : value.length) <= 0;
9306
+ if (typeof value === 'object') return (Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(value)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0;
9307
+ return false;
9308
+ };
9309
+ var _validateData = function _validateData() {
9310
+ var count = 0;
9311
+ for (var _iterator = _createForOfIteratorHelperLoose(rules), _step; !(_step = _iterator()).done;) {
9312
+ var _e$pattern;
9313
+ var e = _step.value;
9314
+ if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && isEmpty(value)) {
9315
+ _setError(e === null || e === void 0 ? void 0 : e.message);
9316
+ count++;
9317
+ break;
9318
+ } else if ((e === null || e === void 0 ? void 0 : e.type) === 'pattern' && !(e !== null && e !== void 0 && (_e$pattern = e.pattern) !== null && _e$pattern !== void 0 && _e$pattern.test(value))) {
9319
+ _setError(e === null || e === void 0 ? void 0 : e.message);
9320
+ count++;
9321
+ break;
9123
9322
  }
9124
-
9125
- return name ? jar[name] : jar
9126
9323
  }
9127
-
9128
- return Object.create(
9129
- {
9130
- set,
9131
- get,
9132
- remove: function (name, attributes) {
9133
- set(
9134
- name,
9135
- '',
9136
- assign({}, attributes, {
9137
- expires: -1
9138
- })
9139
- );
9140
- },
9141
- withAttributes: function (attributes) {
9142
- return init(this.converter, assign({}, this.attributes, attributes))
9143
- },
9144
- withConverter: function (converter) {
9145
- return init(assign({}, this.converter, converter), this.attributes)
9146
- }
9147
- },
9148
- {
9149
- attributes: { value: Object.freeze(defaultAttributes) },
9150
- converter: { value: Object.freeze(converter) }
9324
+ if (count) {
9325
+ return false;
9326
+ } else {
9327
+ _setError('');
9328
+ return true;
9329
+ }
9330
+ };
9331
+ var handleSearch = function handleSearch(searchValue) {
9332
+ if (handleSearchOption && typeof handleSearchOption === 'function') {
9333
+ handleSearchOption === null || handleSearchOption === void 0 ? void 0 : handleSearchOption(searchValue);
9334
+ setNextTrigger(12);
9335
+ } else {
9336
+ var listFilterOptions = options.filter(function (item) {
9337
+ var _item$label;
9338
+ return item === null || item === void 0 ? void 0 : (_item$label = item.label) === null || _item$label === void 0 ? void 0 : _item$label.toLowerCase().includes(searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase());
9339
+ });
9340
+ setListOptions(listFilterOptions);
9341
+ }
9342
+ };
9343
+ var handleToggleSelect = function handleToggleSelect() {
9344
+ setIsOpen(!isOpen);
9345
+ setInputSearch("");
9346
+ setListOptions(options);
9347
+ if (typeof setParams === 'function') {
9348
+ setParams === null || setParams === void 0 ? void 0 : setParams(function (prev) {
9349
+ return _extends({}, prev, {
9350
+ size: 16
9351
+ });
9352
+ });
9353
+ setNextTrigger(12);
9354
+ }
9355
+ };
9356
+ var checkSelection = function checkSelection(valueId) {
9357
+ if (isMulti) return value === null || value === void 0 ? void 0 : value.some(function (item) {
9358
+ return (item === null || item === void 0 ? void 0 : item.value) === valueId;
9359
+ });
9360
+ return (value === null || value === void 0 ? void 0 : value.value) == valueId;
9361
+ };
9362
+ var handleSelection = function handleSelection(item, e) {
9363
+ e.stopPropagation();
9364
+ if (!isMulti) {
9365
+ setValue(item);
9366
+ setIsOpen(false);
9367
+ }
9368
+ onClick === null || onClick === void 0 ? void 0 : onClick(item);
9369
+ };
9370
+ var handleDeleteSelection = function handleDeleteSelection(e, item) {
9371
+ e.stopPropagation();
9372
+ if (isMulti === false) setValue({});
9373
+ funcDelete === null || funcDelete === void 0 ? void 0 : funcDelete(item);
9374
+ };
9375
+ var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
9376
+ return (e === null || e === void 0 ? void 0 : e.type) === "required";
9377
+ }));
9378
+ var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
9379
+ className: "text-danger"
9380
+ }, " *") : null;
9381
+ return /*#__PURE__*/React__default.createElement("div", {
9382
+ ref: selectRef,
9383
+ className: "relative " + wrapClassName
9384
+ }, label ? /*#__PURE__*/React__default.createElement("div", {
9385
+ className: "mb-1 " + labelClassName
9386
+ }, label, " ", labelRequired) : null, /*#__PURE__*/React__default.createElement("div", {
9387
+ className: "flex flex-col gap-2 rounded-lg w-full bg-white " + (disabled ? "!bg-gray6" : "") + " border border-stroke " + className
9388
+ }, /*#__PURE__*/React__default.createElement("button", {
9389
+ className: " w-full h-10 bg-transparent flex justify-between items-center px-3 py-2 " + selectClassName,
9390
+ onClick: handleToggleSelect,
9391
+ disabled: disabled
9392
+ }, /*#__PURE__*/React__default.createElement("div", {
9393
+ className: "flex justify-between items-center w-full"
9394
+ }, isEmpty(value) || isMulti ? /*#__PURE__*/React__default.createElement("div", {
9395
+ className: "text-gray3 line-clamp-1"
9396
+ }, placeholder) : /*#__PURE__*/React__default.createElement("div", {
9397
+ className: "w-full text-start pointer-events-none line-clamp-1",
9398
+ dangerouslySetInnerHTML: {
9399
+ __html: value === null || value === void 0 ? void 0 : value.label
9400
+ }
9401
+ }), isButtonDelete && !isEmpty(value) ? /*#__PURE__*/React__default.createElement("div", {
9402
+ onClick: function onClick(e) {
9403
+ handleDeleteSelection(e, value);
9404
+ }
9405
+ }, /*#__PURE__*/React__default.createElement(RxCross2, null)) : /*#__PURE__*/React__default.createElement("div", {
9406
+ className: "ms-1"
9407
+ }, /*#__PURE__*/React__default.createElement(FaAngleUp, {
9408
+ className: "text-xs"
9409
+ }), /*#__PURE__*/React__default.createElement(FaAngleDown, {
9410
+ className: "text-xs"
9411
+ })))), isOpen ? /*#__PURE__*/React__default.createElement("div", {
9412
+ ref: dropdownRef,
9413
+ style: {
9414
+ background: "#FFFFFF"
9415
+ },
9416
+ className: "absolute p-1 my-2 rounded-2xl w-full z-40 border " + (dropdownPosition === 'top' ? 'bottom-full mb-2' : 'top-full mt-2') + " " + optionClassName
9417
+ }, /*#__PURE__*/React__default.createElement("div", null, isSearch ? /*#__PURE__*/React__default.createElement("div", {
9418
+ className: "px-3 flex items-center border-b-[1px]"
9419
+ }, /*#__PURE__*/React__default.createElement(LuSearch, {
9420
+ className: "inline text-gray3 me-2"
9421
+ }), /*#__PURE__*/React__default.createElement("input", {
9422
+ type: "text",
9423
+ ref: inputRef,
9424
+ className: "py-2 w-full border-0 focus:outline-none focus:ring-0",
9425
+ placeholder: "T\xECm ki\u1EBFm",
9426
+ value: inputSearch,
9427
+ onChange: function onChange(e) {
9428
+ setInputSearch(e.target.value);
9429
+ }
9430
+ })) : null, /*#__PURE__*/React__default.createElement("div", {
9431
+ className: "overflow-y-auto max-h-72 scroll-container",
9432
+ ref: optionRef
9433
+ }, (listOptions === null || listOptions === void 0 ? void 0 : listOptions.length) > 0 ? listOptions === null || listOptions === void 0 ? void 0 : listOptions.map(function (item, index) {
9434
+ return /*#__PURE__*/React__default.createElement("div", {
9435
+ key: "gjfd-" + index,
9436
+ className: "option px-2 cursor-default py-1.5 flex items-center hover:bg-gray-100 rounded-lg",
9437
+ onClick: function onClick(e) {
9438
+ handleSelection(item, e);
9151
9439
  }
9152
- )
9153
- }
9154
-
9155
- var api = init(defaultConverter, { path: '/' });
9156
- /* eslint-enable no-var */
9157
-
9158
- return api;
9159
-
9160
- }));
9440
+ }, /*#__PURE__*/React__default.createElement(IoMdCheckmark, {
9441
+ className: (checkSelection(item === null || item === void 0 ? void 0 : item.value) ? "" : 'invisible') + " inline me-2 w-4"
9442
+ }), renderItem ? renderItem(item) : /*#__PURE__*/React__default.createElement("div", {
9443
+ className: " whitespace-nowrap line-clamp-1"
9444
+ }, item === null || item === void 0 ? void 0 : item.label));
9445
+ }) : /*#__PURE__*/React__default.createElement("div", {
9446
+ className: "py-6 text-center"
9447
+ }, "Kh\xF4ng c\xF3 k\u1EBFt qu\u1EA3")))) : null), error ? /*#__PURE__*/React__default.createElement("div", {
9448
+ className: "text-danger"
9449
+ }, error) : null);
9161
9450
  });
9451
+ var SelectDynamic = memo(Select$2);
9162
9452
 
9163
9453
  var BookingForm = function BookingForm(props) {
9164
9454
  var _props$shopConfig = props.shopConfig,
@@ -9175,7 +9465,8 @@ var BookingForm = function BookingForm(props) {
9175
9465
  isModalBooking = _props$isModalBooking === void 0 ? false : _props$isModalBooking;
9176
9466
  var _useState = useState(false);
9177
9467
  var _useState2 = useState({
9178
- types: "1,10"
9468
+ types: "1,10",
9469
+ size: 16
9179
9470
  }),
9180
9471
  productsParams = _useState2[0],
9181
9472
  setProductsParams = _useState2[1];
@@ -9349,6 +9640,7 @@ var BookingForm = function BookingForm(props) {
9349
9640
  var handleSearchProducts = function handleSearchProducts(value) {
9350
9641
  setProductsParams(function (prev) {
9351
9642
  return _extends({}, prev, {
9643
+ size: 16,
9352
9644
  productName: value
9353
9645
  });
9354
9646
  });
@@ -9385,7 +9677,8 @@ var BookingForm = function BookingForm(props) {
9385
9677
  className: "grid grid-cols-1 gap-4"
9386
9678
  }, /*#__PURE__*/React__default.createElement("div", {
9387
9679
  className: "relative"
9388
- }, /*#__PURE__*/React__default.createElement(Select$1, {
9680
+ }, /*#__PURE__*/React__default.createElement(SelectDynamic, {
9681
+ setParams: setProductsParams,
9389
9682
  ref: inputSelectedRef,
9390
9683
  isMulti: true,
9391
9684
  defaultValue: listProductSelected,
@@ -9501,6 +9794,7 @@ var BookingForm = function BookingForm(props) {
9501
9794
  className: "text-center"
9502
9795
  }, "Ch\xFAng t\xF4i \u0111\xE3 ghi nh\u1EADn th\xF4ng tin c\u1EE7a b\u1EA1n v\xE0 s\u1EBD li\xEAn h\u1EC7 l\u1EA1i ngay"))));
9503
9796
  };
9797
+ var BookingForm$1 = memo(BookingForm);
9504
9798
 
9505
9799
  var TreatmentsList7 = function TreatmentsList7(props) {
9506
9800
  var _props$shopConfigStyl = props.shopConfigStyle,
@@ -9533,8 +9827,8 @@ var TreatmentsList7 = function TreatmentsList7(props) {
9533
9827
  params: params
9534
9828
  })),
9535
9829
  _ProductController$pr = _ProductController.products,
9536
- products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
9537
- console.log("treatment1:", products);
9830
+ products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
9831
+ loading = _ProductController.loading;
9538
9832
  var handleOpenModalBooking = function handleOpenModalBooking(event, data) {
9539
9833
  try {
9540
9834
  var _data$productInfo, _data$productInfo2;
@@ -9591,7 +9885,9 @@ var TreatmentsList7 = function TreatmentsList7(props) {
9591
9885
  shopConfigStyle: shopConfigStyle
9592
9886
  }), /*#__PURE__*/React__default.createElement("div", {
9593
9887
  className: "mt-12 w-full"
9594
- }, (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement(Slider, {
9888
+ }, loading ? /*#__PURE__*/React__default.createElement("div", {
9889
+ className: "flex justify-center h-20 items-center"
9890
+ }, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement(Slider, {
9595
9891
  infinite: (products === null || products === void 0 ? void 0 : products.length) > 1 ? true : false,
9596
9892
  slidesToShow: 1,
9597
9893
  slidesToScroll: 1,
@@ -9619,7 +9915,7 @@ var TreatmentsList7 = function TreatmentsList7(props) {
9619
9915
  color: secondary
9620
9916
  }), isOpenModal ? /*#__PURE__*/React__default.createElement(ModalNotification, {
9621
9917
  onClose: handleCloseModal
9622
- }, /*#__PURE__*/React__default.createElement(BookingForm, {
9918
+ }, /*#__PURE__*/React__default.createElement(BookingForm$1, {
9623
9919
  className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh] !bg-bgSecondary",
9624
9920
  onCloseFormBooking: handleCloseModal,
9625
9921
  defaultValue: dataBooking,
@@ -9789,7 +10085,7 @@ var ServiceDetail1 = function ServiceDetail1(props) {
9789
10085
  }
9790
10086
  }), /*#__PURE__*/React__default.createElement("p", {
9791
10087
  className: "text-lg mt-12 text-xl pb-1 pt-6 border-t border-stroke"
9792
- }, "M\xF4 t\u1EA3 s\u1EA3n ph\u1EA9m"), product !== null && product !== void 0 && product.description ? /*#__PURE__*/React__default.createElement("div", {
10088
+ }, "M\xF4 t\u1EA3 d\u1ECBch v\u1EE5"), product !== null && product !== void 0 && product.description ? /*#__PURE__*/React__default.createElement("div", {
9793
10089
  className: "h-max"
9794
10090
  }, /*#__PURE__*/React__default.createElement("div", {
9795
10091
  ref: descriptionRef,
@@ -9814,7 +10110,7 @@ var ServiceDetail1 = function ServiceDetail1(props) {
9814
10110
  className: "text-gray3 mt-2"
9815
10111
  }, "Kh\xF4ng c\xF3 th\xF4ng tin"))), isBooking ? /*#__PURE__*/React__default.createElement(ModalNotification, {
9816
10112
  onClose: handleCloseModal
9817
- }, /*#__PURE__*/React__default.createElement(BookingForm, {
10113
+ }, /*#__PURE__*/React__default.createElement(BookingForm$1, {
9818
10114
  isModalBooking: isBooking,
9819
10115
  className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh]",
9820
10116
  onCloseFormBooking: handleCloseModal,
@@ -9924,7 +10220,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
9924
10220
  }
9925
10221
  }), /*#__PURE__*/React__default.createElement("p", {
9926
10222
  className: "text-lg mt-12 text-xl pb-1 pt-6 border-t border-stroke"
9927
- }, "M\xF4 t\u1EA3 s\u1EA3n ph\u1EA9m"), product !== null && product !== void 0 && product.description ? /*#__PURE__*/React__default.createElement("div", {
10223
+ }, "M\xF4 t\u1EA3 d\u1ECBch v\u1EE5"), product !== null && product !== void 0 && product.description ? /*#__PURE__*/React__default.createElement("div", {
9928
10224
  className: "h-max"
9929
10225
  }, /*#__PURE__*/React__default.createElement("div", {
9930
10226
  ref: descriptionRef,
@@ -9949,7 +10245,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
9949
10245
  className: "text-gray3 mt-2"
9950
10246
  }, "Kh\xF4ng c\xF3 th\xF4ng tin"))), isBooking ? /*#__PURE__*/React__default.createElement(ModalNotification, {
9951
10247
  onClose: handleCloseModal
9952
- }, /*#__PURE__*/React__default.createElement(BookingForm, {
10248
+ }, /*#__PURE__*/React__default.createElement(BookingForm$1, {
9953
10249
  isModalBooking: isBooking,
9954
10250
  className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh]",
9955
10251
  onCloseFormBooking: handleCloseModal,
@@ -9960,6 +10256,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
9960
10256
  };
9961
10257
 
9962
10258
  var ProductItem2 = function ProductItem2(props) {
10259
+ var _product$productInfo;
9963
10260
  var product = props.product,
9964
10261
  _props$Link = props.Link,
9965
10262
  Link = _props$Link === void 0 ? null : _props$Link,
@@ -9967,27 +10264,29 @@ var ProductItem2 = function ProductItem2(props) {
9967
10264
  className = _props$className === void 0 ? "" : _props$className;
9968
10265
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
9969
10266
  Link: Link,
9970
- href: getLinkProductDetail(product)
10267
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
9971
10268
  }, /*#__PURE__*/React__default.createElement("div", {
9972
10269
  className: "text-center relative group " + className
9973
10270
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
9974
- product: product,
10271
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
9975
10272
  className: "max-w-[240px] rounded-full mx-auto !object-cover"
9976
- }), /*#__PURE__*/React__default.createElement(ProductPrice, {
9977
- product: product,
9978
- className: "text-lg mt-4"
9979
10273
  }), /*#__PURE__*/React__default.createElement("div", {
10274
+ className: "flex justify-center"
10275
+ }, /*#__PURE__*/React__default.createElement(ProductPrice, {
10276
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10277
+ className: "text-lg mt-4 " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10278
+ })), /*#__PURE__*/React__default.createElement("div", {
9980
10279
  className: "text-lg mt-2"
9981
- }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement("div", {
10280
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement("div", {
9982
10281
  className: "absolute w-full h-full rounded-2xl top-0 left-0 opacity-0 group-hover:opacity-100 transition-opacity duration-300 bg-[rgba(0,0,0,0.5)] flex flex-col items-center justify-center gap-4"
9983
10282
  }, /*#__PURE__*/React__default.createElement(LinkToPage, {
9984
- href: getLinkProductDetail(product)
10283
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
9985
10284
  }, /*#__PURE__*/React__default.createElement(Button, {
9986
10285
  label: /*#__PURE__*/React__default.createElement("div", {
9987
10286
  className: "flex items-center gap-2"
9988
10287
  }, "Xem chi ti\u1EBFt ", /*#__PURE__*/React__default.createElement(FaArrowRight, null))
9989
10288
  })), /*#__PURE__*/React__default.createElement(LinkToPage, {
9990
- href: getLinkProductDetail(product)
10289
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
9991
10290
  }, /*#__PURE__*/React__default.createElement(Button, {
9992
10291
  label: /*#__PURE__*/React__default.createElement("div", {
9993
10292
  className: "flex items-center gap-2"
@@ -9997,7 +10296,7 @@ var ProductItem2 = function ProductItem2(props) {
9997
10296
  type: "outline",
9998
10297
  className: "!border-white !text-white hover:!border-gray5"
9999
10298
  })), /*#__PURE__*/React__default.createElement(LinkToPage, {
10000
- href: getLinkProductDetail(product)
10299
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10001
10300
  }, /*#__PURE__*/React__default.createElement(Button, {
10002
10301
  label: /*#__PURE__*/React__default.createElement("div", {
10003
10302
  className: "flex items-center gap-2"
@@ -10008,6 +10307,7 @@ var ProductItem2 = function ProductItem2(props) {
10008
10307
  };
10009
10308
 
10010
10309
  var ProductItem3 = function ProductItem3(props) {
10310
+ var _product$productInfo;
10011
10311
  var product = props.product,
10012
10312
  _props$Link = props.Link,
10013
10313
  Link = _props$Link === void 0 ? null : _props$Link,
@@ -10015,23 +10315,24 @@ var ProductItem3 = function ProductItem3(props) {
10015
10315
  className = _props$className === void 0 ? "" : _props$className;
10016
10316
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
10017
10317
  Link: Link,
10018
- href: getLinkProductDetail(product)
10318
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10019
10319
  }, /*#__PURE__*/React__default.createElement("div", {
10020
10320
  className: "w-full border border-stroke rounded-2xl " + className
10021
10321
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10022
- product: product,
10322
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10023
10323
  className: "w-full h-48 md:h-60 xl:h-[304px] rounded-t-2xl"
10024
10324
  }), /*#__PURE__*/React__default.createElement("div", {
10025
10325
  className: "p-4 flex flex-col gap-2 md:gap-4 items-start"
10026
10326
  }, /*#__PURE__*/React__default.createElement("div", {
10027
10327
  className: "line-clamp-1 w-full overflow-hidden text-ellipsis"
10028
- }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10029
- product: product,
10030
- className: "text-lg text-start"
10328
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10329
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10330
+ className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10031
10331
  }))));
10032
10332
  };
10033
10333
 
10034
10334
  var ProductItem4 = function ProductItem4(props) {
10335
+ var _product$productInfo;
10035
10336
  var _props$shopConfigStyl = props.shopConfigStyle,
10036
10337
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
10037
10338
  product = props.product,
@@ -10041,17 +10342,17 @@ var ProductItem4 = function ProductItem4(props) {
10041
10342
  className = _props$className === void 0 ? "" : _props$className;
10042
10343
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
10043
10344
  Link: Link,
10044
- href: getLinkProductDetail(product)
10345
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10045
10346
  }, /*#__PURE__*/React__default.createElement("div", {
10046
10347
  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
10047
10348
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10048
- product: product,
10349
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10049
10350
  className: "w-full h-40 sm:h-56 lg:h-60 xl:h-64 bg-cover bg-no-repeat rounded-2xl"
10050
10351
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10051
10352
  className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis text-lg"
10052
- }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10053
- product: product,
10054
- className: "text-lg text-start mt-2"
10353
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10354
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10355
+ className: "text-lg text-start mt-2 " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10055
10356
  })), /*#__PURE__*/React__default.createElement("div", {
10056
10357
  className: "flex pt-2 md:pt-4 gap-2 md:gap-4 border-t items-center"
10057
10358
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10065,7 +10366,272 @@ var ProductItem4 = function ProductItem4(props) {
10065
10366
  }))));
10066
10367
  };
10067
10368
 
10068
- var ProductItem5 = function ProductItem5(props) {
10369
+ var ProductItem5 = function ProductItem5(props) {
10370
+ var _product$productInfo;
10371
+ var product = props.product,
10372
+ _props$Link = props.Link,
10373
+ Link = _props$Link === void 0 ? null : _props$Link,
10374
+ _props$shopConfigStyl = props.shopConfigStyle,
10375
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
10376
+ _props$className = props.className,
10377
+ className = _props$className === void 0 ? "" : _props$className;
10378
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
10379
+ Link: Link,
10380
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10381
+ }, /*#__PURE__*/React__default.createElement("div", {
10382
+ className: "w-full flex flex-col gap-4 rounded-2xl p-1 " + className
10383
+ }, /*#__PURE__*/React__default.createElement(ProductImage, {
10384
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10385
+ className: "w-full w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
10386
+ }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10387
+ className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis mb-2"
10388
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10389
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10390
+ className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10391
+ })), /*#__PURE__*/React__default.createElement("div", {
10392
+ className: "flex gap-2 md:gap-4 "
10393
+ }, /*#__PURE__*/React__default.createElement(AiOutlineShoppingCart, {
10394
+ className: "text-primary p-2.5 h-10 w-12 border border-primary rounded-lg hover:bg-primary hover:text-textButton " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass)
10395
+ }), /*#__PURE__*/React__default.createElement(Button, {
10396
+ label: "Mua ngay",
10397
+ className: "w-full",
10398
+ shopConfigStyle: shopConfigStyle
10399
+ }))));
10400
+ };
10401
+
10402
+ var ProductItem6 = function ProductItem6(props) {
10403
+ var _product$productInfo;
10404
+ var product = props.product,
10405
+ _props$shopConfigStyl = props.shopConfigStyle,
10406
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
10407
+ _props$Link = props.Link,
10408
+ Link = _props$Link === void 0 ? null : _props$Link,
10409
+ _props$className = props.className,
10410
+ className = _props$className === void 0 ? "" : _props$className;
10411
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
10412
+ Link: Link,
10413
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10414
+ }, /*#__PURE__*/React__default.createElement("div", {
10415
+ 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
10416
+ }, /*#__PURE__*/React__default.createElement(ProductImage, {
10417
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10418
+ className: "w-full h-48 md:h-60 xl:h-72 rounded-2xl"
10419
+ }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10420
+ className: "text start line-clamp-1 w-full overflow-hidden text-ellipsis"
10421
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10422
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10423
+ className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10424
+ })), /*#__PURE__*/React__default.createElement("div", {
10425
+ className: "flex pt-4 gap-2 md:gap-4 border-t items-center"
10426
+ }, /*#__PURE__*/React__default.createElement("div", {
10427
+ className: "p-2 md:p-[10px] text-primary rounded-lg hover:bg-primary hover:text-textButton hover:opacity-80 border border-primary h-full w-auto flex items-center justify-center " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass) + " "
10428
+ }, /*#__PURE__*/React__default.createElement(FiShoppingCart, null)), /*#__PURE__*/React__default.createElement(Button, {
10429
+ label: "Mua ngay",
10430
+ className: "w-full",
10431
+ shopConfigStyle: shopConfigStyle
10432
+ }))));
10433
+ };
10434
+
10435
+ var ProductItem7 = function ProductItem7(props) {
10436
+ var _product$productInfo, _product$productInfo2, _product$productInfo3, _product$productInfo4, _product$productInfo5, _product$productInfo6, _product$productInfo7, _product$productInfo8, _product$productInfo9, _product$productInfo10, _product$productInfo11;
10437
+ var product = props.product,
10438
+ _props$Link = props.Link,
10439
+ Link = _props$Link === void 0 ? null : _props$Link,
10440
+ _props$className = props.className,
10441
+ className = _props$className === void 0 ? "" : _props$className;
10442
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
10443
+ Link: Link,
10444
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10445
+ }, /*#__PURE__*/React__default.createElement("div", {
10446
+ className: "w-full bg-bgSecondary relative p-2 md:p-4 rounded-2xl " + className
10447
+ }, /*#__PURE__*/React__default.createElement("div", {
10448
+ className: "relative"
10449
+ }, /*#__PURE__*/React__default.createElement("div", {
10450
+ className: "px-2 md:px-4 xl:px-6"
10451
+ }, /*#__PURE__*/React__default.createElement(ProductImage, {
10452
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10453
+ className: "w-full hover:scale-105 transition duration-300 ease-in-out rounded-2xl"
10454
+ })), (product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.price) !== (product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.priceBeforeDiscount) && product !== null && product !== void 0 && (_product$productInfo3 = product.productInfo) !== null && _product$productInfo3 !== void 0 && _product$productInfo3.priceBeforeDiscount ? /*#__PURE__*/React__default.createElement("div", {
10455
+ className: "absolute top-4 left-0 py-1 px-4 rounded-r-2xl bg-danger text-textButton font-semibold shadow-lg"
10456
+ }, "-", Math.round(100 - (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.price) / (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.priceBeforeDiscount) * 100)) : null), /*#__PURE__*/React__default.createElement("div", {
10457
+ className: "flex flex-col mt-4 gap-4 items-start"
10458
+ }, /*#__PURE__*/React__default.createElement("div", {
10459
+ className: "line-clamp-2 min-h-12 w-full overflow-hidden text-ellipsis"
10460
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo6 = product.productInfo) === null || _product$productInfo6 === void 0 ? void 0 : _product$productInfo6.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10461
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10462
+ className: "text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10463
+ })), product !== null && product !== void 0 && product.isShowProductPriceOnLanding && product !== null && product !== void 0 && (_product$productInfo7 = product.productInfo) !== null && _product$productInfo7 !== void 0 && _product$productInfo7.priceBeforeDiscount && (product === null || product === void 0 ? void 0 : (_product$productInfo8 = product.productInfo) === null || _product$productInfo8 === void 0 ? void 0 : _product$productInfo8.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo9 = product.productInfo) === null || _product$productInfo9 === void 0 ? void 0 : _product$productInfo9.price) ? /*#__PURE__*/React__default.createElement("div", {
10464
+ className: "absolute top-5 left-0 font-semibold px-3 py-1 bg-danger text-textButton rounded-r-2xl shadow-lg v-max"
10465
+ }, 1 - 100 * (product === null || product === void 0 ? void 0 : (_product$productInfo10 = product.productInfo) === null || _product$productInfo10 === void 0 ? void 0 : _product$productInfo10.price) / (product === null || product === void 0 ? void 0 : (_product$productInfo11 = product.productInfo) === null || _product$productInfo11 === void 0 ? void 0 : _product$productInfo11.priceBeforeDiscount)) : null));
10466
+ };
10467
+
10468
+ var ProductItem8 = function ProductItem8(props) {
10469
+ var _product$productInfo;
10470
+ var product = props.product,
10471
+ _props$Link = props.Link,
10472
+ Link = _props$Link === void 0 ? null : _props$Link,
10473
+ _props$className = props.className,
10474
+ className = _props$className === void 0 ? "" : _props$className,
10475
+ _props$shopConfigStyl = props.shopConfigStyle,
10476
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
10477
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
10478
+ Link: Link,
10479
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10480
+ }, /*#__PURE__*/React__default.createElement("div", {
10481
+ className: "text-center rounded relative group " + className
10482
+ }, /*#__PURE__*/React__default.createElement("div", {
10483
+ className: "relative "
10484
+ }, /*#__PURE__*/React__default.createElement(ProductImage, {
10485
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10486
+ className: "h-[340px] md:h-[400px] xl:h-[460px] rounded"
10487
+ }), /*#__PURE__*/React__default.createElement("div", {
10488
+ className: "absolute bottom-0 rounded-b pb-6 px-4 bg-gradient-to-t from-black/50 to-transparent flex flex-col items-center h-1/2 gap-2 w-full justify-end "
10489
+ }, /*#__PURE__*/React__default.createElement("div", {
10490
+ className: "text-lg text-textButton"
10491
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10492
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10493
+ className: !(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "",
10494
+ priceClassName: "text-textButton !font-normal",
10495
+ priceBeforeDiscountClassName: "text-textButton !font-normal"
10496
+ }), /*#__PURE__*/React__default.createElement(Button, {
10497
+ label: "Th\xEAm v\xE0o gi\u1ECF",
10498
+ shopConfigStyle: shopConfigStyle,
10499
+ className: "hidden group-hover:block transition-all duration-300 !font-normal"
10500
+ })))));
10501
+ };
10502
+
10503
+ var ProductItem9 = function ProductItem9(props) {
10504
+ var _product$productInfo;
10505
+ var product = props.product,
10506
+ _props$Link = props.Link,
10507
+ Link = _props$Link === void 0 ? null : _props$Link,
10508
+ _props$shopConfigStyl = props.shopConfigStyle,
10509
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
10510
+ _props$className = props.className,
10511
+ className = _props$className === void 0 ? "" : _props$className;
10512
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
10513
+ Link: Link,
10514
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10515
+ }, /*#__PURE__*/React__default.createElement("div", {
10516
+ className: "w-full flex flex-col gap-4 rounded-2xl p-2 md:p-6 bg-bgSecondary " + className
10517
+ }, /*#__PURE__*/React__default.createElement(ProductImage, {
10518
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10519
+ className: "hover:scale-105 transition duration-300 ease-in-out w-full h-44 md:h-56 xl:h-60"
10520
+ }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10521
+ className: "text-start line-clamp-2 font-medium min-h-12 w-full overflow-hidden text-ellipsis mb-2"
10522
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10523
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10524
+ priceClassName: "!text-secondary !text-base !font-normal",
10525
+ className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10526
+ })), /*#__PURE__*/React__default.createElement("div", {
10527
+ className: "flex gap-2 md:gap-4 "
10528
+ }, /*#__PURE__*/React__default.createElement(AiOutlineShoppingCart, {
10529
+ className: "text-primary p-2.5 h-10 w-12 border border-primary rounded-lg hover:bg-primary hover:text-textButton " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass)
10530
+ }), /*#__PURE__*/React__default.createElement(Button, {
10531
+ label: "Mua ngay",
10532
+ className: "w-full",
10533
+ shopConfigStyle: shopConfigStyle
10534
+ }))));
10535
+ };
10536
+
10537
+ var ProductItem10 = function ProductItem10(props) {
10538
+ var _product$productInfo;
10539
+ var product = props.product;
10540
+ return /*#__PURE__*/React__default.createElement("div", {
10541
+ className: "flex border-b border-stroke items-center py-4"
10542
+ }, /*#__PURE__*/React__default.createElement("div", {
10543
+ className: "mb-auto"
10544
+ }, /*#__PURE__*/React__default.createElement(ProductImage, {
10545
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10546
+ className: "!w-24 rounded-lg"
10547
+ })), /*#__PURE__*/React__default.createElement("div", {
10548
+ className: "ml-4 flex-1"
10549
+ }, /*#__PURE__*/React__default.createElement("div", {
10550
+ className: "text-xl"
10551
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), product !== null && product !== void 0 && product.isShowProductPriceOnLanding ? /*#__PURE__*/React__default.createElement("div", {
10552
+ className: "mt-2"
10553
+ }, /*#__PURE__*/React__default.createElement(ProductPrice, {
10554
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10555
+ priceClassName: "!font-normal text-lg"
10556
+ })) : null));
10557
+ };
10558
+
10559
+ function getMinMax$1(array, field) {
10560
+ if (!(array !== null && array !== void 0 && array.length) || !array[0].hasOwnProperty(field)) {
10561
+ return null;
10562
+ }
10563
+ var _array$reduce = array.reduce(function (acc, obj) {
10564
+ var value = obj[field];
10565
+ return {
10566
+ min: value < acc.min ? value : acc.min,
10567
+ max: value > acc.max ? value : acc.max
10568
+ };
10569
+ }, {
10570
+ min: array[0][field],
10571
+ max: array[0][field]
10572
+ }),
10573
+ min = _array$reduce.min,
10574
+ max = _array$reduce.max;
10575
+ return {
10576
+ min: min,
10577
+ max: max
10578
+ };
10579
+ }
10580
+ var ProductPrice2 = function ProductPrice2(props) {
10581
+ var product = props.product,
10582
+ variant = props.variant,
10583
+ _props$className = props.className,
10584
+ className = _props$className === void 0 ? "" : _props$className,
10585
+ _props$style = props.style,
10586
+ style = _props$style === void 0 ? {} : _props$style,
10587
+ _props$priceClassName = props.priceClassName,
10588
+ priceClassName = _props$priceClassName === void 0 ? "" : _props$priceClassName,
10589
+ _props$priceBeforeDis = props.priceBeforeDiscountClassName,
10590
+ priceBeforeDiscountClassName = _props$priceBeforeDis === void 0 ? "" : _props$priceBeforeDis;
10591
+ var _useState = useState(),
10592
+ displayPrice = _useState[0],
10593
+ setDisplayPrice = _useState[1];
10594
+ var _useState2 = useState(),
10595
+ displayPriceBeforeDiscount = _useState2[0],
10596
+ setDisplayPriceBeforeDiscount = _useState2[1];
10597
+ useEffect(function () {
10598
+ if (variant) {
10599
+ genProductPrice([variant]);
10600
+ } else if (product) {
10601
+ genProductPrice(product.variants);
10602
+ }
10603
+ }, [product, variant]);
10604
+ var genProductPrice = function genProductPrice(variants) {
10605
+ var mPrice = getMinMax$1(variants, 'price');
10606
+ var mPriceBeforeDiscount = getMinMax$1(variants, 'priceBeforeDiscount');
10607
+ if (mPrice && mPriceBeforeDiscount) {
10608
+ var _displayPriceBeforeDiscount = formatCurrency2(mPriceBeforeDiscount.min);
10609
+ var _displayPrice = formatCurrency2(mPrice.min);
10610
+ if (mPrice.min !== mPrice.max) {
10611
+ _displayPrice += " - " + formatCurrency2(mPrice.max);
10612
+ }
10613
+ if (mPriceBeforeDiscount.min !== mPriceBeforeDiscount.max) {
10614
+ _displayPriceBeforeDiscount += " - " + formatCurrency2(mPriceBeforeDiscount.max);
10615
+ }
10616
+ setDisplayPrice(_displayPrice);
10617
+ setDisplayPriceBeforeDiscount(_displayPriceBeforeDiscount);
10618
+ } else {
10619
+ var _displayPrice2 = formatCurrency2(product === null || product === void 0 ? void 0 : product.price);
10620
+ setDisplayPrice(_displayPrice2);
10621
+ }
10622
+ };
10623
+ return /*#__PURE__*/React__default.createElement("div", {
10624
+ className: "flex gap-4 flex-wrap " + className
10625
+ }, /*#__PURE__*/React__default.createElement("span", {
10626
+ className: "text-primary font-semibold " + priceClassName,
10627
+ style: style
10628
+ }, displayPrice), displayPriceBeforeDiscount !== displayPrice && displayPriceBeforeDiscount != null ? /*#__PURE__*/React__default.createElement("span", {
10629
+ className: "text-gray3 line-through " + priceBeforeDiscountClassName + " "
10630
+ }, displayPriceBeforeDiscount) : null);
10631
+ };
10632
+
10633
+ var ProductItem11 = function ProductItem11(props) {
10634
+ var _product$productInfo;
10069
10635
  var product = props.product,
10070
10636
  _props$Link = props.Link,
10071
10637
  Link = _props$Link === void 0 ? null : _props$Link,
@@ -10075,17 +10641,22 @@ var ProductItem5 = function ProductItem5(props) {
10075
10641
  className = _props$className === void 0 ? "" : _props$className;
10076
10642
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
10077
10643
  Link: Link,
10078
- href: getLinkProductDetail(product)
10644
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10079
10645
  }, /*#__PURE__*/React__default.createElement("div", {
10080
- className: "w-full flex flex-col gap-4 rounded-2xl p-1 " + className
10646
+ className: "w-full bg-bgSecondary " + className
10647
+ }, /*#__PURE__*/React__default.createElement("div", {
10648
+ className: "overflow-hidden"
10081
10649
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10082
- product: product,
10083
- className: "w-full w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
10084
- }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10650
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10651
+ className: "hover:scale-105 transition duration-300 ease-in-out w-full h-56 sm:h-64 lg:h-72 xl:h-[302px]"
10652
+ })), /*#__PURE__*/React__default.createElement("div", {
10653
+ className: "p-4 flex flex-col gap-4"
10654
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10085
10655
  className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis mb-2"
10086
- }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10087
- product: product,
10088
- className: "text-lg text-start"
10656
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice2, {
10657
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10658
+ priceClassName: "!font-normal",
10659
+ className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10089
10660
  })), /*#__PURE__*/React__default.createElement("div", {
10090
10661
  className: "flex gap-2 md:gap-4 "
10091
10662
  }, /*#__PURE__*/React__default.createElement(AiOutlineShoppingCart, {
@@ -10094,101 +10665,11 @@ var ProductItem5 = function ProductItem5(props) {
10094
10665
  label: "Mua ngay",
10095
10666
  className: "w-full",
10096
10667
  shopConfigStyle: shopConfigStyle
10097
- }))));
10098
- };
10099
-
10100
- var ProductItem6 = function ProductItem6(props) {
10101
- var product = props.product,
10102
- _props$shopConfigStyl = props.shopConfigStyle,
10103
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
10104
- _props$Link = props.Link,
10105
- Link = _props$Link === void 0 ? null : _props$Link,
10106
- _props$className = props.className,
10107
- className = _props$className === void 0 ? "" : _props$className;
10108
- return /*#__PURE__*/React__default.createElement(LinkToPage, {
10109
- Link: Link,
10110
- href: getLinkProductDetail(product)
10111
- }, /*#__PURE__*/React__default.createElement("div", {
10112
- 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
10113
- }, /*#__PURE__*/React__default.createElement(ProductImage, {
10114
- product: product,
10115
- className: "w-full h-48 md:h-60 xl:h-72 rounded-2xl"
10116
- }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10117
- className: "text start line-clamp-1 w-full overflow-hidden text-ellipsis"
10118
- }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10119
- product: product,
10120
- className: "text-lg text-start"
10121
- })), /*#__PURE__*/React__default.createElement("div", {
10122
- className: "flex pt-4 gap-2 md:gap-4 border-t items-center"
10123
- }, /*#__PURE__*/React__default.createElement("div", {
10124
- className: "p-2 md:p-[10px] text-primary rounded-lg hover:bg-primary hover:text-textButton hover:opacity-80 border border-primary h-full w-auto flex items-center justify-center " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass) + " "
10125
- }, /*#__PURE__*/React__default.createElement(FiShoppingCart, null)), /*#__PURE__*/React__default.createElement(Button, {
10126
- label: "Mua ngay",
10127
- className: "w-full",
10128
- shopConfigStyle: shopConfigStyle
10129
- }))));
10130
- };
10131
-
10132
- var ProductItem7 = function ProductItem7(props) {
10133
- var product = props.product,
10134
- _props$Link = props.Link,
10135
- Link = _props$Link === void 0 ? null : _props$Link,
10136
- _props$className = props.className,
10137
- className = _props$className === void 0 ? "" : _props$className;
10138
- return /*#__PURE__*/React__default.createElement(LinkToPage, {
10139
- Link: Link,
10140
- href: getLinkProductDetail(product)
10141
- }, /*#__PURE__*/React__default.createElement("div", {
10142
- className: "w-full bg-bgSecondary relative rounded-2xl " + className
10143
- }, /*#__PURE__*/React__default.createElement(ProductImage, {
10144
- product: product,
10145
- className: "w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-t-2xl"
10146
- }), /*#__PURE__*/React__default.createElement("div", {
10147
- className: "p-4 flex flex-col gap-4 items-start"
10148
- }, /*#__PURE__*/React__default.createElement("div", {
10149
- className: "line-clamp-1 w-full overflow-hidden text-ellipsis"
10150
- }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10151
- product: product,
10152
- className: "text-lg text-start"
10153
- })), product !== null && product !== void 0 && product.priceBeforeDiscount && (product === null || product === void 0 ? void 0 : product.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : product.price) ? /*#__PURE__*/React__default.createElement("div", {
10154
- className: "absolute top-5 left-0 font-semibold px-3 py-1 bg-danger text-textButton rounded-r-2xl shadow-lg v-max"
10155
- }, 1 - 100 * (product === null || product === void 0 ? void 0 : product.price) / (product === null || product === void 0 ? void 0 : product.priceBeforeDiscount)) : null));
10156
- };
10157
-
10158
- var ProductItem8 = function ProductItem8(props) {
10159
- var product = props.product,
10160
- _props$Link = props.Link,
10161
- Link = _props$Link === void 0 ? null : _props$Link,
10162
- _props$className = props.className,
10163
- className = _props$className === void 0 ? "" : _props$className,
10164
- _props$shopConfigStyl = props.shopConfigStyle,
10165
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
10166
- return /*#__PURE__*/React__default.createElement(LinkToPage, {
10167
- Link: Link,
10168
- href: getLinkProductDetail(product)
10169
- }, /*#__PURE__*/React__default.createElement("div", {
10170
- className: "text-center rounded relative group " + className
10171
- }, /*#__PURE__*/React__default.createElement("div", {
10172
- className: "relative "
10173
- }, /*#__PURE__*/React__default.createElement(ProductImage, {
10174
- product: product,
10175
- className: "min-h-[360px] md:min-h-[400px] xl:min-h-[440px] !object-cover !rounded"
10176
- }), /*#__PURE__*/React__default.createElement("div", {
10177
- className: "absolute bottom-0 rounded-b pb-6 px-4 bg-gradient-to-t from-black/50 to-transparent flex flex-col items-center h-1/2 gap-2 w-full justify-end "
10178
- }, /*#__PURE__*/React__default.createElement("div", {
10179
- className: "text-lg text-textButton"
10180
- }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10181
- product: product,
10182
- priceClassName: "text-textButton !font-normal",
10183
- priceBeforeDiscountClassName: "text-textButton !font-normal"
10184
- }), /*#__PURE__*/React__default.createElement(Button, {
10185
- label: "Th\xEAm v\xE0o gi\u1ECF",
10186
- shopConfigStyle: shopConfigStyle,
10187
- className: "hidden group-hover:block transition-all duration-300 !font-normal"
10188
10668
  })))));
10189
10669
  };
10190
10670
 
10191
10671
  var TreatmentItem1 = function TreatmentItem1(props) {
10672
+ var _product$productInfo;
10192
10673
  var product = props.product,
10193
10674
  _props$Link = props.Link,
10194
10675
  Link = _props$Link === void 0 ? null : _props$Link,
@@ -10196,17 +10677,17 @@ var TreatmentItem1 = function TreatmentItem1(props) {
10196
10677
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
10197
10678
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
10198
10679
  Link: Link,
10199
- href: getLinkServiceDetail(product)
10680
+ href: getLinkServiceDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10200
10681
  }, /*#__PURE__*/React__default.createElement("div", {
10201
10682
  className: "w-full flex flex-col gap-4 rounded-2xl p-1"
10202
10683
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10203
- product: product,
10684
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10204
10685
  className: "w-full w-full h-[189px] md:h-[238px] xl:h-[304px] rounded-2xl"
10205
10686
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10206
10687
  className: "line-clamp-1 mb-2 font-medium text-lg"
10207
- }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10208
- product: product,
10209
- className: "text-lg text-start"
10688
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10689
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10690
+ className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10210
10691
  })), /*#__PURE__*/React__default.createElement("div", {
10211
10692
  className: "flex flex-col md:flex-row gap-2 md:items-center md:gap-6 "
10212
10693
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10254,7 +10735,7 @@ var ProductList7 = function ProductList7(props) {
10254
10735
  Link: Link,
10255
10736
  shopConfigStyle: shopConfigStyle,
10256
10737
  key: index,
10257
- product: product === null || product === void 0 ? void 0 : product.productInfo
10738
+ product: product
10258
10739
  });
10259
10740
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), (products === null || products === void 0 ? void 0 : products.length) > 4 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
10260
10741
  href: "/san-pham",
@@ -10312,13 +10793,13 @@ var Products2 = function Products2(props) {
10312
10793
  breakpoint: 1024,
10313
10794
  settings: {
10314
10795
  slidesToShow: 4,
10315
- slidesToScroll: 4
10796
+ slidesToScroll: 1
10316
10797
  }
10317
10798
  }, {
10318
10799
  breakpoint: 1023,
10319
10800
  settings: {
10320
10801
  slidesToShow: 3,
10321
- slidesToScroll: 3
10802
+ slidesToScroll: 1
10322
10803
  }
10323
10804
  }, {
10324
10805
  breakpoint: 635,
@@ -10326,6 +10807,12 @@ var Products2 = function Products2(props) {
10326
10807
  slidesToShow: 2,
10327
10808
  slidesToScroll: 2
10328
10809
  }
10810
+ }, {
10811
+ breakpoint: 370,
10812
+ settings: {
10813
+ slidesToShow: 1,
10814
+ slidesToScroll: 1
10815
+ }
10329
10816
  }]
10330
10817
  };
10331
10818
  useEffect(function () {
@@ -10359,12 +10846,12 @@ var Products2 = function Products2(props) {
10359
10846
  color: textBody
10360
10847
  }
10361
10848
  }, /*#__PURE__*/React__default.createElement("div", {
10362
- className: "relative rounded-3xl w-full py-10 md:px-10 sm:px-6 px-4",
10849
+ className: "relative rounded-3xl w-full py-6 md:py-10 md:px-6 px-3 xl:px-10",
10363
10850
  style: {
10364
10851
  background: secondary
10365
10852
  }
10366
10853
  }, /*#__PURE__*/React__default.createElement("h2", {
10367
- className: "font-semibold text-2xl md:text-4xl lg:text-4xl ps-5 pb-4",
10854
+ className: "font-semibold text-2xl md:text-4xl lg:text-4xl ps-5 pb-6",
10368
10855
  style: {
10369
10856
  color: textButton
10370
10857
  }
@@ -10378,15 +10865,15 @@ var Products2 = function Products2(props) {
10378
10865
  beforeChange: handleBeforeChange
10379
10866
  }), products === null || products === void 0 ? void 0 : products.map(function (product, index) {
10380
10867
  return /*#__PURE__*/React__default.createElement("div", {
10381
- className: "px-2 lg:px-3",
10868
+ className: "px-1 md:px-2 lg:px-3",
10382
10869
  key: "dfg-" + index
10383
10870
  }, /*#__PURE__*/React__default.createElement(ProductItem, {
10384
- product: product === null || product === void 0 ? void 0 : product.productInfo,
10871
+ product: product,
10385
10872
  Link: Link,
10386
10873
  shopConfigStyle: shopConfigStyle
10387
10874
  }));
10388
10875
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null)), /*#__PURE__*/React__default.createElement("div", {
10389
- className: "absolute left-0 top-1/2 w-full flex justify-between px-2 md:px-4 lg:px-6"
10876
+ className: "absolute left-0 top-[45%] w-full flex justify-between px-2 md:px-4 lg:px-6"
10390
10877
  }, /*#__PURE__*/React__default.createElement("button", {
10391
10878
  onClick: goToPrev,
10392
10879
  className: (canGoPrev ? "bg-primary" : "bg-gray5 cursor-not-allowed") + " p-2 rounded-full"
@@ -10431,7 +10918,7 @@ var Pagination = function Pagination(_ref) {
10431
10918
  for (var i = start; i <= end; i++) {
10432
10919
  pages.push(i);
10433
10920
  }
10434
- if (current_page < total_pages - 2) pages.push("...");
10921
+ if (current_page < total_pages - 3) pages.push("...");
10435
10922
  pages.push(total_pages);
10436
10923
  return pages;
10437
10924
  };
@@ -10451,7 +10938,7 @@ var Pagination = function Pagination(_ref) {
10451
10938
  onClick: function onClick() {
10452
10939
  return typeof page === "number" && handlePageChange(page - 1);
10453
10940
  },
10454
- className: "px-4 py-1 rounded-md " + (page === current_page + 1 ? "bg-primary text-white" : "bg-transparent text-primary") + " hover:opacity-80 " + (page === "..." ? "cursor-default text-gray-500" : ""),
10941
+ className: "px-2 md:px-4 py-1 rounded-md " + (page === current_page + 1 ? "bg-primary text-white" : "bg-transparent text-primary") + " hover:opacity-80 " + (page === "..." ? "cursor-default text-gray-500" : ""),
10455
10942
  disabled: page === "..."
10456
10943
  }, page);
10457
10944
  })), /*#__PURE__*/React__default.createElement(IoChevronForwardOutline, {
@@ -10493,9 +10980,7 @@ var Products3 = function Products3(props) {
10493
10980
  loading = _ProductController.loading,
10494
10981
  page = _ProductController.page;
10495
10982
  var _CategoryController = CategoryController(_extends({}, props, {
10496
- params: {
10497
- type: "0"
10498
- }
10983
+ types: "0"
10499
10984
  })),
10500
10985
  categories = _CategoryController.categories;
10501
10986
  useEffect(function () {
@@ -10505,118 +10990,292 @@ var Products3 = function Products3(props) {
10505
10990
  categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId
10506
10991
  }));
10507
10992
  }
10508
- }, [categorySelected]);
10509
- var onSelectCategory = function onSelectCategory(category) {
10510
- setCategorySelected(category);
10993
+ }, [categorySelected]);
10994
+ var onSelectCategory = function onSelectCategory(category) {
10995
+ setCategorySelected(category);
10996
+ };
10997
+ var onPageChange = function onPageChange(pageNum) {
10998
+ setProductParams(_extends({}, productParams, {
10999
+ page: pageNum
11000
+ }));
11001
+ };
11002
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
11003
+ className: "" + SECTION_DEFAULT_CLASS
11004
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
11005
+ data: data,
11006
+ shopConfigStyle: shopConfigStyle
11007
+ }), /*#__PURE__*/React__default.createElement("div", {
11008
+ className: "grid grid-cols-1 md:grid-cols-4 gap-12"
11009
+ }, /*#__PURE__*/React__default.createElement("div", {
11010
+ className: "hidden md:block"
11011
+ }, /*#__PURE__*/React__default.createElement("div", {
11012
+ className: "text-xl"
11013
+ }, "Danh m\u1EE5c s\u1EA3n ph\u1EA9m"), /*#__PURE__*/React__default.createElement("div", {
11014
+ className: "overflow-y-auto max-h-96 scroll-container pr-3"
11015
+ }, /*#__PURE__*/React__default.createElement("div", {
11016
+ className: "flex gap-2 py-4 border-b border-stroke cursor-pointer hover:text-primary " + (!(categorySelected !== null && categorySelected !== void 0 && categorySelected.categoryId) ? "text-primary" : "text-textSecondary"),
11017
+ onClick: function onClick() {
11018
+ return onSelectCategory({
11019
+ categoryId: undefined
11020
+ });
11021
+ }
11022
+ }, /*#__PURE__*/React__default.createElement(IoIosHeartEmpty, {
11023
+ size: 24
11024
+ }), /*#__PURE__*/React__default.createElement("div", null, "T\u1EA5t c\u1EA3")), categories === null || categories === void 0 ? void 0 : categories.map(function (category, index) {
11025
+ return /*#__PURE__*/React__default.createElement("div", {
11026
+ className: "flex gap-2 py-4 border-b border-stroke cursor-pointer hover:text-primary " + ((categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId) === (category === null || category === void 0 ? void 0 : category.categoryId) ? "text-primary" : "text-textSecondary"),
11027
+ key: index,
11028
+ onClick: function onClick() {
11029
+ return onSelectCategory(category);
11030
+ }
11031
+ }, /*#__PURE__*/React__default.createElement(IoIosHeartEmpty, {
11032
+ size: 24
11033
+ }), /*#__PURE__*/React__default.createElement("div", null, category === null || category === void 0 ? void 0 : category.cateName));
11034
+ }))), /*#__PURE__*/React__default.createElement("div", {
11035
+ className: "md:hidden"
11036
+ }), /*#__PURE__*/React__default.createElement("div", {
11037
+ className: "col-span-3 text-center"
11038
+ }, loading ? /*#__PURE__*/React__default.createElement("div", {
11039
+ className: "flex w-full justify-center items-center p-12 h-[700px]"
11040
+ }, /*#__PURE__*/React__default.createElement(Loading, {
11041
+ size: 32
11042
+ })) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
11043
+ className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-12 mt-12"
11044
+ }, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
11045
+ return /*#__PURE__*/React__default.createElement(ProductItem, {
11046
+ Link: Link,
11047
+ key: index,
11048
+ shopConfigStyle: shopConfigStyle,
11049
+ product: product
11050
+ });
11051
+ })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), (page === null || page === void 0 ? void 0 : page.total_pages) > 1 ? /*#__PURE__*/React__default.createElement(Pagination, _extends({
11052
+ className: "mt-12"
11053
+ }, page, {
11054
+ onPageChange: onPageChange
11055
+ })) : null))), /*#__PURE__*/React__default.createElement(Dash, {
11056
+ color: secondary
11057
+ }));
11058
+ };
11059
+
11060
+ var CarouselItem = function CarouselItem(props) {
11061
+ var _Object$keys;
11062
+ var _props$data = props.data,
11063
+ data = _props$data === void 0 ? [] : _props$data,
11064
+ _props$className = props.className,
11065
+ className = _props$className === void 0 ? "" : _props$className,
11066
+ _props$style = props.style,
11067
+ style = _props$style === void 0 ? {} : _props$style,
11068
+ _props$onClick = props.onClick,
11069
+ onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
11070
+ _props$isAll = props.isAll,
11071
+ isAll = _props$isAll === void 0 ? true : _props$isAll,
11072
+ _props$isNavigateButt = props.isNavigateButton,
11073
+ isNavigateButton = _props$isNavigateButt === void 0 ? true : _props$isNavigateButt,
11074
+ _props$itemClassName = props.itemClassName,
11075
+ itemClassName = _props$itemClassName === void 0 ? "" : _props$itemClassName;
11076
+ var listRef = useRef(null);
11077
+ var _useState = useState(false),
11078
+ canScrollLeft = _useState[0],
11079
+ setCanScrollLeft = _useState[1];
11080
+ var _useState2 = useState(false),
11081
+ canScrollRight = _useState2[0],
11082
+ setCanScrollRight = _useState2[1];
11083
+ var _useState3 = useState({}),
11084
+ value = _useState3[0],
11085
+ setValue = _useState3[1];
11086
+ useEffect(function () {
11087
+ var _listRef$current;
11088
+ checkScroll();
11089
+ (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.addEventListener("scroll", checkScroll);
11090
+ return function () {
11091
+ var _listRef$current2;
11092
+ return (_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.removeEventListener("scroll", checkScroll);
11093
+ };
11094
+ }, [data]);
11095
+ var checkScroll = function checkScroll() {
11096
+ if (listRef.current) {
11097
+ var _listRef$current3 = listRef.current,
11098
+ scrollLeft = _listRef$current3.scrollLeft,
11099
+ scrollWidth = _listRef$current3.scrollWidth,
11100
+ clientWidth = _listRef$current3.clientWidth;
11101
+ setCanScrollLeft(scrollLeft > 0);
11102
+ setCanScrollRight(scrollLeft + clientWidth < scrollWidth - 1);
11103
+ }
11104
+ };
11105
+ var handleClickPrevImg = function handleClickPrevImg() {
11106
+ if (listRef.current) {
11107
+ checkScroll();
11108
+ listRef.current.scrollBy({
11109
+ left: -300,
11110
+ behavior: "smooth"
11111
+ });
11112
+ }
11113
+ };
11114
+ var handleClickNextImg = function handleClickNextImg() {
11115
+ if (listRef.current) {
11116
+ checkScroll();
11117
+ listRef.current.scrollBy({
11118
+ left: 300,
11119
+ behavior: "smooth"
11120
+ });
11121
+ }
10511
11122
  };
10512
- var onPageChange = function onPageChange(pageNum) {
10513
- setProductParams(_extends({}, productParams, {
10514
- page: pageNum
10515
- }));
11123
+ var handleOnClick = function handleOnClick(item) {
11124
+ setValue(item);
11125
+ onClick === null || onClick === void 0 ? void 0 : onClick(item);
10516
11126
  };
10517
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
10518
- className: "" + SECTION_DEFAULT_CLASS
10519
- }, /*#__PURE__*/React__default.createElement(SectionTitle, {
10520
- data: data,
10521
- shopConfigStyle: shopConfigStyle
10522
- }), /*#__PURE__*/React__default.createElement("div", {
10523
- className: "grid grid-cols-1 md:grid-cols-4 gap-12"
10524
- }, /*#__PURE__*/React__default.createElement("div", {
10525
- className: "hidden md:block"
11127
+ return /*#__PURE__*/React__default.createElement("div", {
11128
+ className: "h-10 md:h-12 flex justify-between items-center " + className,
11129
+ style: style
10526
11130
  }, /*#__PURE__*/React__default.createElement("div", {
10527
- className: "text-xl"
10528
- }, "Danh m\u1EE5c s\u1EA3n ph\u1EA9m"), /*#__PURE__*/React__default.createElement("div", {
10529
- className: "overflow-y-auto max-h-96 scroll-container pr-3"
11131
+ className: "w-full overflow-hidden "
10530
11132
  }, /*#__PURE__*/React__default.createElement("div", {
10531
- className: "flex gap-2 py-4 border-b border-stroke cursor-pointer hover:text-primary " + (!(categorySelected !== null && categorySelected !== void 0 && categorySelected.categoryId) ? "text-primary" : "text-textSecondary"),
11133
+ className: "flex overflow-x-auto gap-2 " + (isNavigateButton ? "no-scrollbar" : "scroll-custom pb-2") + " items-center",
11134
+ ref: listRef
11135
+ }, isAll ? /*#__PURE__*/React__default.createElement("div", {
11136
+ className: " " + ((Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(value)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0 ? "bg-primary text-textButton" : "bg-background") + " text-primary w-max border border-primary p-1 md:p-2 rounded-lg cursor-pointer whitespace-nowrap",
10532
11137
  onClick: function onClick() {
10533
- return onSelectCategory({
10534
- categoryId: undefined
10535
- });
11138
+ handleOnClick({});
10536
11139
  }
10537
- }, /*#__PURE__*/React__default.createElement(IoIosHeartEmpty, {
10538
- size: 24
10539
- }), /*#__PURE__*/React__default.createElement("div", null, "T\u1EA5t c\u1EA3")), categories === null || categories === void 0 ? void 0 : categories.map(function (category, index) {
11140
+ }, "T\u1EA5t c\u1EA3") : null, data && (data === null || data === void 0 ? void 0 : data.length) > 0 && (data === null || data === void 0 ? void 0 : data.map(function (item, index) {
10540
11141
  return /*#__PURE__*/React__default.createElement("div", {
10541
- className: "flex gap-2 py-4 border-b border-stroke cursor-pointer hover:text-primary " + ((categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId) === (category === null || category === void 0 ? void 0 : category.categoryId) ? "text-primary" : "text-textSecondary"),
10542
- key: index,
11142
+ className: ((value === null || value === void 0 ? void 0 : value.value) === (item === null || item === void 0 ? void 0 : item.value) ? "bg-primary text-textButton" : "bg-background") + " w-max border text-primary border-primary py-1 px-2 md:py-2 md:px-3 rounded-lg cursor-pointer whitespace-nowrap " + itemClassName,
11143
+ key: "carousel-" + index,
10543
11144
  onClick: function onClick() {
10544
- return onSelectCategory(category);
11145
+ handleOnClick(item);
10545
11146
  }
10546
- }, /*#__PURE__*/React__default.createElement(IoIosHeartEmpty, {
10547
- size: 24
10548
- }), /*#__PURE__*/React__default.createElement("div", null, category === null || category === void 0 ? void 0 : category.cateName));
10549
- }))), /*#__PURE__*/React__default.createElement("div", {
10550
- className: "md:hidden"
10551
- }), /*#__PURE__*/React__default.createElement("div", {
10552
- className: "col-span-3 text-center"
10553
- }, loading ? /*#__PURE__*/React__default.createElement("div", {
10554
- className: "flex w-full justify-center items-center p-12 h-[700px]"
10555
- }, /*#__PURE__*/React__default.createElement(Loading, {
10556
- size: 32
10557
- })) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
10558
- className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-12 mt-12"
10559
- }, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
10560
- return /*#__PURE__*/React__default.createElement(ProductItem, {
10561
- Link: Link,
10562
- key: index,
10563
- shopConfigStyle: shopConfigStyle,
10564
- product: product === null || product === void 0 ? void 0 : product.productInfo
10565
- });
10566
- })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), (page === null || page === void 0 ? void 0 : page.total_pages) > 1 ? /*#__PURE__*/React__default.createElement(Pagination, _extends({
10567
- className: "mt-12"
10568
- }, page, {
10569
- onPageChange: onPageChange
10570
- })) : null))), /*#__PURE__*/React__default.createElement(Dash, {
10571
- color: secondary
10572
- }));
11147
+ }, item === null || item === void 0 ? void 0 : item.label);
11148
+ })))), isNavigateButton ? /*#__PURE__*/React__default.createElement("div", {
11149
+ className: "hidden my-auto gap-4 md:flex justify-end ps-10"
11150
+ }, /*#__PURE__*/React__default.createElement("button", {
11151
+ className: "h-full w-9 h-9 md:h-11 md:w-11 items-center justify-center rounded-full " + (canScrollLeft ? "bg-primary cursor-pointer text-textButton" : "bg-gray5 text-gray3 cursor-not-allowed"),
11152
+ onClick: handleClickPrevImg,
11153
+ disabled: !canScrollLeft
11154
+ }, /*#__PURE__*/React__default.createElement(IoIosArrowBack, {
11155
+ size: 24,
11156
+ className: "inline-block text-lg"
11157
+ })), /*#__PURE__*/React__default.createElement("button", {
11158
+ className: "h-full w-9 h-9 md:h-11 md:w-11 flex items-center justify-center rounded-full " + (canScrollRight ? "bg-primary cursor-pointer text-textButton" : "bg-gray5 text-gray3 cursor-not-allowed"),
11159
+ onClick: handleClickNextImg,
11160
+ disabled: !canScrollRight
11161
+ }, /*#__PURE__*/React__default.createElement(IoIosArrowForward, {
11162
+ size: 24,
11163
+ className: "inline-block text-lg "
11164
+ }))) : null);
10573
11165
  };
10574
11166
 
10575
11167
  var Products9 = function Products9(props) {
10576
- var _Object$keys;
11168
+ var _Object$keys2;
10577
11169
  var _props$Link = props.Link,
10578
11170
  Link = _props$Link === void 0 ? null : _props$Link,
10579
11171
  shopConfigStyle = props.shopConfigStyle,
10580
11172
  _props$ProductItem = props.ProductItem,
10581
11173
  ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
10582
- var _useState = useState({
11174
+ var _useState = useState(true),
11175
+ loading = _useState[0],
11176
+ setLoading = _useState[1];
11177
+ var _useState2 = useState({
10583
11178
  size: 12
10584
11179
  }),
10585
- params = _useState[0],
10586
- setParams = _useState[1];
10587
- var _CategoryController = CategoryController(_extends({}, props)),
11180
+ params = _useState2[0];
11181
+ var _useState3 = useState(false),
11182
+ isAutoGetList = _useState3[0];
11183
+ var _CategoryController = CategoryController(_extends({}, props, {
11184
+ types: "0"
11185
+ })),
10588
11186
  _CategoryController$c = _CategoryController.categories,
10589
11187
  categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
10590
11188
  var _ProductController = ProductController(_extends({}, props, {
10591
- params: params
11189
+ params: params,
11190
+ isAutoGetList: isAutoGetList
10592
11191
  })),
10593
- _ProductController$pr = _ProductController.products,
10594
- products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
10595
- loading = _ProductController.loading;
11192
+ getProductListSearch = _ProductController.getProductListSearch;
11193
+ var _useState4 = useState([]),
11194
+ categoryProducts = _useState4[0],
11195
+ setCategoryProducts = _useState4[1];
11196
+ useEffect(function () {
11197
+ if ((categories === null || categories === void 0 ? void 0 : categories.length) > 0) {
11198
+ fetchAll();
11199
+ }
11200
+ }, [categories]);
11201
+ var fetchAll = function fetchAll() {
11202
+ try {
11203
+ setLoading(true);
11204
+ var _temp = _finallyRethrows(function () {
11205
+ return _catch(function () {
11206
+ var _categories$slice;
11207
+ var result = {};
11208
+ return Promise.resolve(Promise.all(categories === null || categories === void 0 ? void 0 : (_categories$slice = categories.slice(0, 4)) === null || _categories$slice === void 0 ? void 0 : _categories$slice.map(function (cat) {
11209
+ try {
11210
+ return Promise.resolve(getProductListSearch({
11211
+ categoryId: cat === null || cat === void 0 ? void 0 : cat.categoryId,
11212
+ size: 4
11213
+ })).then(function (products) {
11214
+ if ((products === null || products === void 0 ? void 0 : products.length) > 0) {
11215
+ result[cat === null || cat === void 0 ? void 0 : cat.cateName] = products;
11216
+ }
11217
+ });
11218
+ } catch (e) {
11219
+ return Promise.reject(e);
11220
+ }
11221
+ }))).then(function () {
11222
+ setCategoryProducts(result);
11223
+ });
11224
+ }, function (error) {
11225
+ console.log(error);
11226
+ });
11227
+ }, function (_wasThrown, _result) {
11228
+ setLoading(false);
11229
+ if (_wasThrown) throw _result;
11230
+ return _result;
11231
+ });
11232
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
11233
+ } catch (e) {
11234
+ return Promise.reject(e);
11235
+ }
11236
+ };
10596
11237
  var handleChooseCategory = function handleChooseCategory(item) {
10597
- setParams(_extends({}, params, {
10598
- categoryId: item === null || item === void 0 ? void 0 : item.categoryId,
10599
- size: 12
10600
- }));
11238
+ var _Object$keys;
11239
+ if ((Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(item)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0) {
11240
+ fetchAll();
11241
+ } else {
11242
+ fetchOne(item);
11243
+ }
10601
11244
  };
10602
- var groupedProducts = products === null || products === void 0 ? void 0 : products.reduce(function (acc, product) {
10603
- var _product$productInfo = product === null || product === void 0 ? void 0 : product.productInfo,
10604
- categoryName = _product$productInfo.categoryName;
10605
- if (!acc[categoryName]) {
10606
- acc[categoryName] = [];
11245
+ var fetchOne = function fetchOne(item) {
11246
+ try {
11247
+ setLoading(true);
11248
+ var _temp2 = _finallyRethrows(function () {
11249
+ return _catch(function () {
11250
+ return Promise.resolve(getProductListSearch({
11251
+ categoryId: item === null || item === void 0 ? void 0 : item.categoryId,
11252
+ size: 12
11253
+ })).then(function (products) {
11254
+ var _setCategoryProducts, _console$log;
11255
+ setCategoryProducts((_setCategoryProducts = {}, _setCategoryProducts[item === null || item === void 0 ? void 0 : item.cateName] = products, _setCategoryProducts));
11256
+ console.log("check::::", (_console$log = {}, _console$log[item === null || item === void 0 ? void 0 : item.cateName] = products, _console$log));
11257
+ });
11258
+ }, function (error) {
11259
+ console.log(error);
11260
+ });
11261
+ }, function (_wasThrown2, _result2) {
11262
+ setLoading(false);
11263
+ if (_wasThrown2) throw _result2;
11264
+ return _result2;
11265
+ });
11266
+ return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
11267
+ } catch (e) {
11268
+ return Promise.reject(e);
10607
11269
  }
10608
- acc[categoryName].push(product);
10609
- return acc;
10610
- }, {});
10611
- console.log(groupedProducts);
11270
+ };
10612
11271
  return /*#__PURE__*/React__default.createElement("div", {
10613
- className: SECTION_CLASS + " flex flex-col gap-4 mt-0 md:gap-6 "
11272
+ className: SECTION_CLASS + " flex flex-col gap-4 md:!my-6 md:gap-6 "
10614
11273
  }, /*#__PURE__*/React__default.createElement(CarouselItem, {
10615
11274
  data: categories,
10616
11275
  onClick: handleChooseCategory
10617
11276
  }), loading ? /*#__PURE__*/React__default.createElement("div", {
10618
11277
  className: "m-auto mt-20 min-h-32"
10619
- }, /*#__PURE__*/React__default.createElement(Loading, null)) : (Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(groupedProducts)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) > 0 ? Object.entries(groupedProducts).map(function (_ref, index) {
11278
+ }, /*#__PURE__*/React__default.createElement(Loading, null)) : (Object === null || Object === void 0 ? void 0 : (_Object$keys2 = Object.keys(categoryProducts)) === null || _Object$keys2 === void 0 ? void 0 : _Object$keys2.length) > 0 ? Object.entries(categoryProducts).map(function (_ref, index) {
10620
11279
  var _products$;
10621
11280
  var categoryName = _ref[0],
10622
11281
  products = _ref[1];
@@ -10637,10 +11296,12 @@ var Products9 = function Products9(props) {
10637
11296
  return /*#__PURE__*/React__default.createElement(ProductItem, {
10638
11297
  Link: Link,
10639
11298
  shopConfigStyle: shopConfigStyle,
10640
- product: product === null || product === void 0 ? void 0 : product.productInfo,
11299
+ product: product,
10641
11300
  key: product === null || product === void 0 ? void 0 : product.landingShopProductId
10642
11301
  });
10643
- }) : null));
11302
+ }) : /*#__PURE__*/React__default.createElement("div", {
11303
+ className: "col-span-2 sm:col-span-3 lg:col-span-4"
11304
+ }, /*#__PURE__*/React__default.createElement(NotFoundProduct, null))));
10644
11305
  }) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
10645
11306
  };
10646
11307
 
@@ -10658,7 +11319,9 @@ var Products10 = function Products10(props) {
10658
11319
  ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem,
10659
11320
  _props$Link = props.Link,
10660
11321
  Link = _props$Link === void 0 ? null : _props$Link;
10661
- var _CategoryController = CategoryController(props),
11322
+ var _CategoryController = CategoryController(_extends({}, props, {
11323
+ types: "0"
11324
+ })),
10662
11325
  _CategoryController$c = _CategoryController.categories,
10663
11326
  categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
10664
11327
  var _ProductController = ProductController(_extends({}, props, {
@@ -10689,7 +11352,7 @@ var Products10 = function Products10(props) {
10689
11352
  Link: Link,
10690
11353
  className: "border-0 bg-bgSecondary",
10691
11354
  shopConfigStyle: shopConfigStyle,
10692
- product: product === null || product === void 0 ? void 0 : product.productInfo,
11355
+ product: product,
10693
11356
  key: "zjk-" + idx
10694
11357
  });
10695
11358
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
@@ -10709,7 +11372,6 @@ var listFilter = [{
10709
11372
  value: "sortPriceDESC"
10710
11373
  }];
10711
11374
  var Products11 = function Products11(props) {
10712
- var _productsFilter$slice;
10713
11375
  var _props$shopConfigStyl = props.shopConfigStyle,
10714
11376
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
10715
11377
  _props$Link = props.Link,
@@ -10721,24 +11383,21 @@ var Products11 = function Products11(props) {
10721
11383
  var _useState = useState({
10722
11384
  page: 0,
10723
11385
  size: 12,
10724
- categoryId: categoryId
11386
+ categoryId: categoryId || ""
10725
11387
  }),
10726
11388
  params = _useState[0],
10727
11389
  setParams = _useState[1];
10728
- var _useState2 = useState(true),
10729
- firstLoading = _useState2[0],
10730
- setFirstLoading = _useState2[1];
10731
- var _useState3 = useState({}),
10732
- categorySelected = _useState3[0],
10733
- setCategorySelected = _useState3[1];
10734
- var _useState4 = useState([]),
10735
- productsFilter = _useState4[0],
10736
- setProductsFilter = _useState4[1];
10737
- var _useState5 = useState(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]),
10738
- filterItem = _useState5[0],
10739
- setFilterItem = _useState5[1];
11390
+ var _useState2 = useState({}),
11391
+ categorySelected = _useState2[0],
11392
+ setCategorySelected = _useState2[1];
11393
+ var _useState3 = useState([]),
11394
+ productsFilter = _useState3[0],
11395
+ setProductsFilter = _useState3[1];
11396
+ var _useState4 = useState(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]),
11397
+ filterItem = _useState4[0],
11398
+ setFilterItem = _useState4[1];
10740
11399
  var _CategoryController = CategoryController(_extends({}, props, {
10741
- params: params
11400
+ types: "0"
10742
11401
  })),
10743
11402
  _CategoryController$c = _CategoryController.categories,
10744
11403
  categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
@@ -10750,16 +11409,18 @@ var Products11 = function Products11(props) {
10750
11409
  loading = _ProductController.loading,
10751
11410
  page = _ProductController.page;
10752
11411
  var handleOnChangePage = function handleOnChangePage(pageIndex) {
10753
- setFirstLoading(false);
10754
11412
  setParams(function (prev) {
10755
11413
  return _extends({}, prev, {
10756
11414
  page: pageIndex
10757
11415
  });
10758
11416
  });
11417
+ window.scrollTo({
11418
+ top: 0,
11419
+ behavior: 'smooth'
11420
+ });
10759
11421
  };
10760
11422
  var handleChooseCategory = function handleChooseCategory(category) {
10761
11423
  setCategorySelected(category);
10762
- setFirstLoading(true);
10763
11424
  setFilterItem(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]);
10764
11425
  setParams(function (prev) {
10765
11426
  return _extends({}, prev, {
@@ -10767,6 +11428,10 @@ var Products11 = function Products11(props) {
10767
11428
  size: 12
10768
11429
  });
10769
11430
  });
11431
+ window.scrollTo({
11432
+ top: 0,
11433
+ behavior: 'smooth'
11434
+ });
10770
11435
  };
10771
11436
  useEffect(function () {
10772
11437
  if ((categories === null || categories === void 0 ? void 0 : categories.length) > 0 && params !== null && params !== void 0 && params.categoryId) {
@@ -10777,23 +11442,42 @@ var Products11 = function Products11(props) {
10777
11442
  }
10778
11443
  }, [categories]);
10779
11444
  useEffect(function () {
10780
- setProductsFilter(products);
11445
+ if ((filterItem === null || filterItem === void 0 ? void 0 : filterItem.value) === "sortPriceDESC") {
11446
+ var productsCopy = [].concat(products);
11447
+ productsCopy === null || productsCopy === void 0 ? void 0 : productsCopy.sort(function (a, b) {
11448
+ var _a$productInfo, _b$productInfo;
11449
+ return (a === null || a === void 0 ? void 0 : (_a$productInfo = a.productInfo) === null || _a$productInfo === void 0 ? void 0 : _a$productInfo.price) - (b === null || b === void 0 ? void 0 : (_b$productInfo = b.productInfo) === null || _b$productInfo === void 0 ? void 0 : _b$productInfo.price);
11450
+ });
11451
+ setProductsFilter(productsCopy);
11452
+ } else if ((filterItem === null || filterItem === void 0 ? void 0 : filterItem.value) === "discount") {
11453
+ var _productsCopy2;
11454
+ var _productsCopy = [].concat(products);
11455
+ _productsCopy = (_productsCopy2 = _productsCopy) === null || _productsCopy2 === void 0 ? void 0 : _productsCopy2.filter(function (product) {
11456
+ var _product$productInfo, _product$productInfo2, _product$productInfo3;
11457
+ return (product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo3 = product.productInfo) === null || _product$productInfo3 === void 0 ? void 0 : _product$productInfo3.price);
11458
+ });
11459
+ setProductsFilter(_productsCopy);
11460
+ } else {
11461
+ setProductsFilter(products);
11462
+ }
10781
11463
  }, [products, categorySelected]);
10782
11464
  var handleFilter = function handleFilter(item) {
10783
11465
  setFilterItem(item);
10784
- if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC") {
11466
+ if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC" && !(params !== null && params !== void 0 && params.isHighlight)) {
10785
11467
  var productsCopy = [].concat(products);
10786
11468
  productsCopy === null || productsCopy === void 0 ? void 0 : productsCopy.sort(function (a, b) {
10787
- var _b$productInfo, _a$productInfo;
10788
- return +(b === null || b === void 0 ? void 0 : (_b$productInfo = b.productInfo) === null || _b$productInfo === void 0 ? void 0 : _b$productInfo.price) - (a === null || a === void 0 ? void 0 : (_a$productInfo = a.productInfo) === null || _a$productInfo === void 0 ? void 0 : _a$productInfo.price);
11469
+ var _a$productInfo2, _b$productInfo2;
11470
+ return (a === null || a === void 0 ? void 0 : (_a$productInfo2 = a.productInfo) === null || _a$productInfo2 === void 0 ? void 0 : _a$productInfo2.price) - (b === null || b === void 0 ? void 0 : (_b$productInfo2 = b.productInfo) === null || _b$productInfo2 === void 0 ? void 0 : _b$productInfo2.price);
10789
11471
  });
10790
11472
  setProductsFilter(productsCopy);
10791
- } else if ((item === null || item === void 0 ? void 0 : item.value) === "discount") {
10792
- var _productsCopy = [].concat(products);
10793
- _productsCopy === null || _productsCopy === void 0 ? void 0 : _productsCopy.filter(function (product) {
10794
- return (product === null || product === void 0 ? void 0 : product.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : product.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : product.price);
11473
+ } else if ((item === null || item === void 0 ? void 0 : item.value) === "discount" && !(params !== null && params !== void 0 && params.isHighlight)) {
11474
+ var _productsCopy4;
11475
+ var _productsCopy3 = [].concat(products);
11476
+ _productsCopy3 = (_productsCopy4 = _productsCopy3) === null || _productsCopy4 === void 0 ? void 0 : _productsCopy4.filter(function (product) {
11477
+ var _product$productInfo4, _product$productInfo5, _product$productInfo6;
11478
+ return (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo6 = product.productInfo) === null || _product$productInfo6 === void 0 ? void 0 : _product$productInfo6.price);
10795
11479
  });
10796
- setProductsFilter(_productsCopy);
11480
+ setProductsFilter(_productsCopy3);
10797
11481
  } else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
10798
11482
  setParams(function (prev) {
10799
11483
  return _extends({}, prev, {
@@ -10802,19 +11486,20 @@ var Products11 = function Products11(props) {
10802
11486
  });
10803
11487
  } else {
10804
11488
  setParams(function (prev) {
10805
- return _extends({}, prev, {
11489
+ return {
11490
+ page: 0,
10806
11491
  categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
10807
11492
  size: 12
10808
- });
11493
+ };
10809
11494
  });
10810
11495
  }
10811
11496
  };
10812
11497
  return /*#__PURE__*/React__default.createElement("div", {
10813
- className: SECTION_CLASS + " grid grid-cols-1 !mt-0 md:grid-cols-4 gap-6"
11498
+ className: SECTION_CLASS + " grid grid-cols-1 !my-6 !md:my-6 md:grid-cols-4 gap-6"
10814
11499
  }, /*#__PURE__*/React__default.createElement("div", {
10815
- className: "md:sticky top-0 self-start"
10816
- }, /*#__PURE__*/React__default.createElement("div", {
10817
- className: " flex flex-col gap-2 rounded-3xl bg-bgSecondary p-4 max-h-96 overflow-y-auto"
11500
+ className: "md:sticky top-16 self-start"
11501
+ }, (categories === null || categories === void 0 ? void 0 : categories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
11502
+ className: " flex flex-col gap-2 rounded-2xl bg-bgSecondary p-4 max-h-96 overflow-y-auto"
10818
11503
  }, categories === null || categories === void 0 ? void 0 : categories.map(function (item, index) {
10819
11504
  return /*#__PURE__*/React__default.createElement("div", {
10820
11505
  className: "px-6 py-2 hover:bg-gray-100 hover:text-primary cursor-pointer rounded-lg " + ((categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId) === (item === null || item === void 0 ? void 0 : item.categoryId) ? " bg-primary text-textButton" : ""),
@@ -10822,11 +11507,13 @@ var Products11 = function Products11(props) {
10822
11507
  onClick: function onClick() {
10823
11508
  handleChooseCategory(item);
10824
11509
  }
10825
- }, item === null || item === void 0 ? void 0 : item.cateName);
10826
- }))), /*#__PURE__*/React__default.createElement("div", {
11510
+ }, /*#__PURE__*/React__default.createElement("div", {
11511
+ className: "line-clamp-2"
11512
+ }, item === null || item === void 0 ? void 0 : item.cateName));
11513
+ })) : null), /*#__PURE__*/React__default.createElement("div", {
10827
11514
  className: "md:col-span-3 flex flex-col gap-6"
10828
11515
  }, /*#__PURE__*/React__default.createElement("div", {
10829
- className: "flex gap-4"
11516
+ className: "flex gap-4 flex-wrap"
10830
11517
  }, listFilter === null || listFilter === void 0 ? void 0 : listFilter.map(function (item, index) {
10831
11518
  return /*#__PURE__*/React__default.createElement("div", {
10832
11519
  key: "kgkf-" + index,
@@ -10835,11 +11522,11 @@ var Products11 = function Products11(props) {
10835
11522
  handleFilter(item);
10836
11523
  }
10837
11524
  }, item === null || item === void 0 ? void 0 : item.label);
10838
- })), loading && firstLoading ? /*#__PURE__*/React__default.createElement("div", {
11525
+ })), loading ? /*#__PURE__*/React__default.createElement("div", {
10839
11526
  className: "w-full h-96 mb-1 flex justify-center items-center"
10840
11527
  }, /*#__PURE__*/React__default.createElement(Loading, null)) : /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10841
- className: "grid grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-3 md:gap-6 lg:gap-8"
10842
- }, (productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.length) > 0 ? productsFilter === null || productsFilter === void 0 ? void 0 : (_productsFilter$slice = productsFilter.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _productsFilter$slice === void 0 ? void 0 : _productsFilter$slice.map(function (product, index) {
11528
+ className: "grid grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-3 md:gap-6 xl:gap-8"
11529
+ }, (productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.length) > 0 ? productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.map(function (product, index) {
10843
11530
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
10844
11531
  href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo),
10845
11532
  Link: Link,
@@ -10847,11 +11534,11 @@ var Products11 = function Products11(props) {
10847
11534
  }, /*#__PURE__*/React__default.createElement(ProductItem, {
10848
11535
  Link: Link,
10849
11536
  shopConfigStyle: shopConfigStyle,
10850
- product: product === null || product === void 0 ? void 0 : product.productInfo,
11537
+ product: product,
10851
11538
  key: product === null || product === void 0 ? void 0 : product.landingShopProductId
10852
11539
  }));
10853
11540
  }) : /*#__PURE__*/React__default.createElement("div", {
10854
- className: "md:col-span-2 lg:col-span-3 mt-20 m-auto"
11541
+ className: "col-span-2 lg:col-span-3 mt-20 m-auto"
10855
11542
  }, /*#__PURE__*/React__default.createElement(NotFoundProduct, null)))), /*#__PURE__*/React__default.createElement("div", {
10856
11543
  className: "w-full m-auto"
10857
11544
  }, (page === null || page === void 0 ? void 0 : page.total_pages) > 1 ? /*#__PURE__*/React__default.createElement(Pagination, {
@@ -10863,25 +11550,6 @@ var Products11 = function Products11(props) {
10863
11550
  }) : null)));
10864
11551
  };
10865
11552
 
10866
- var ProductItem9 = function ProductItem9(props) {
10867
- var product = props.product;
10868
- return /*#__PURE__*/React__default.createElement("div", {
10869
- className: "flex border-b border-stroke items-center py-4"
10870
- }, /*#__PURE__*/React__default.createElement(ProductImage, {
10871
- product: product,
10872
- className: "!w-24 rounded-lg"
10873
- }), /*#__PURE__*/React__default.createElement("div", {
10874
- className: "ml-4 flex-1"
10875
- }, /*#__PURE__*/React__default.createElement("div", {
10876
- className: "text-xl"
10877
- }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement("div", {
10878
- className: "mt-2"
10879
- }, /*#__PURE__*/React__default.createElement(ProductPrice, {
10880
- product: product,
10881
- priceClassName: "!font-normal text-lg"
10882
- }))));
10883
- };
10884
-
10885
11553
  var Products12 = function Products12(props) {
10886
11554
  var _props$shopConfigStyl = props.shopConfigStyle,
10887
11555
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
@@ -10914,15 +11582,19 @@ var Products12 = function Products12(props) {
10914
11582
  });
10915
11583
  };
10916
11584
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
10917
- className: SECTION_DEFAULT_CLASS + " flex flex-col gap-6"
11585
+ className: SECTION_CLASS + " w-full flex flex-col gap-6"
10918
11586
  }, /*#__PURE__*/React__default.createElement(SectionTitle, {
10919
11587
  data: data,
10920
11588
  shopConfigStyle: shopConfigStyle
10921
- }), /*#__PURE__*/React__default.createElement(CarouselItem, {
11589
+ }), /*#__PURE__*/React__default.createElement("div", {
11590
+ className: "flex justify-center"
11591
+ }, /*#__PURE__*/React__default.createElement("div", {
11592
+ className: "!overflow-hidden max-w-[80%] md:max-w-[67%] pt-2"
11593
+ }, /*#__PURE__*/React__default.createElement(CarouselItem, {
10922
11594
  isNavigateButton: false,
10923
11595
  data: categories,
10924
11596
  onClick: handleFilterByCategory
10925
- }), loading ? /*#__PURE__*/React__default.createElement("div", {
11597
+ }))), loading ? /*#__PURE__*/React__default.createElement("div", {
10926
11598
  className: "flex w-full justify-center p-12"
10927
11599
  }, /*#__PURE__*/React__default.createElement(Loading, null)) : products !== null && products !== void 0 && products.length ? /*#__PURE__*/React__default.createElement("div", {
10928
11600
  className: "grid grid-cols-1 md:grid-cols-2 gap-x-12"
@@ -10931,12 +11603,70 @@ var Products12 = function Products12(props) {
10931
11603
  key: index,
10932
11604
  Link: Link,
10933
11605
  href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10934
- }, /*#__PURE__*/React__default.createElement(ProductItem9, {
10935
- product: product === null || product === void 0 ? void 0 : product.productInfo
11606
+ }, /*#__PURE__*/React__default.createElement(ProductItem10, {
11607
+ product: product
10936
11608
  }));
10937
11609
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null)));
10938
11610
  };
10939
11611
 
11612
+ var Products14 = function Products14(props) {
11613
+ var _products$slice;
11614
+ var _props$Link = props.Link,
11615
+ Link = _props$Link === void 0 ? null : _props$Link,
11616
+ data = props.data,
11617
+ _props$shopConfigStyl = props.shopConfigStyle,
11618
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
11619
+ _props$SectionTitle = props.SectionTitle,
11620
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
11621
+ _props$ProductItem = props.ProductItem,
11622
+ ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
11623
+ var _ProductDetailControl = ProductDetailController(props),
11624
+ product = _ProductDetailControl.product;
11625
+ var _useState = useState(false),
11626
+ isAutoGetList = _useState[0],
11627
+ setIsAutoGetList = _useState[1];
11628
+ var _useState2 = useState({
11629
+ size: 12,
11630
+ categoryId: product === null || product === void 0 ? void 0 : product.categoryId
11631
+ }),
11632
+ params = _useState2[0],
11633
+ setParams = _useState2[1];
11634
+ var _ProductController = ProductController(_extends({}, props, {
11635
+ params: params,
11636
+ isAutoGetList: isAutoGetList
11637
+ })),
11638
+ _ProductController$pr = _ProductController.products,
11639
+ products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
11640
+ loading = _ProductController.loading;
11641
+ useEffect(function () {
11642
+ if (product !== null && product !== void 0 && product.categoryId) {
11643
+ setParams(function (prev) {
11644
+ return _extends({}, prev, {
11645
+ categoryId: product === null || product === void 0 ? void 0 : product.categoryId
11646
+ });
11647
+ });
11648
+ setIsAutoGetList(true);
11649
+ }
11650
+ }, [product]);
11651
+ return /*#__PURE__*/React__default.createElement("div", {
11652
+ className: SECTION_CLASS + " flex flex-col gap-6 md:gap-12"
11653
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
11654
+ data: data,
11655
+ shopConfigStyle: shopConfigStyle
11656
+ }), loading ? /*#__PURE__*/React__default.createElement("div", {
11657
+ className: "m-auto mt-20 min-h-32"
11658
+ }, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
11659
+ className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-x-2 gap-y-4 md:gap-4 xl:gap-6"
11660
+ }, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, idx) {
11661
+ return /*#__PURE__*/React__default.createElement(ProductItem, {
11662
+ Link: Link,
11663
+ shopConfigStyle: shopConfigStyle,
11664
+ product: product,
11665
+ key: "zjk-" + idx
11666
+ });
11667
+ })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
11668
+ };
11669
+
10940
11670
  var ProductCategory2 = function ProductCategory2(props) {
10941
11671
  var _products$slice;
10942
11672
  var _props$Link = props.Link,
@@ -10952,7 +11682,9 @@ var ProductCategory2 = function ProductCategory2(props) {
10952
11682
  }),
10953
11683
  params = _useState[0],
10954
11684
  setParams = _useState[1];
10955
- var _CategoryController = CategoryController(_extends({}, props)),
11685
+ var _CategoryController = CategoryController(_extends({}, props, {
11686
+ types: "0"
11687
+ })),
10956
11688
  _CategoryController$c = _CategoryController.categories,
10957
11689
  categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
10958
11690
  var _ProductController = ProductController(_extends({}, props, {
@@ -10993,7 +11725,7 @@ var ProductCategory2 = function ProductCategory2(props) {
10993
11725
  return /*#__PURE__*/React__default.createElement(ProductItem, {
10994
11726
  Link: Link,
10995
11727
  shopConfigStyle: shopConfigStyle,
10996
- product: product === null || product === void 0 ? void 0 : product.productInfo,
11728
+ product: product,
10997
11729
  key: "zjk-" + idx
10998
11730
  });
10999
11731
  })) : /*#__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, {
@@ -11031,7 +11763,7 @@ var ProductSale2 = function ProductSale2(props) {
11031
11763
  }, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
11032
11764
  return /*#__PURE__*/React__default.createElement(ProductItem, {
11033
11765
  key: index,
11034
- product: product === null || product === void 0 ? void 0 : product.productInfo
11766
+ product: product
11035
11767
  });
11036
11768
  })), /*#__PURE__*/React__default.createElement(Button, {
11037
11769
  label: "Xem tất cả",
@@ -11086,7 +11818,11 @@ var ProductSearch1 = function ProductSearch1(props) {
11086
11818
  isAutoGetList: isAutoGetList
11087
11819
  })),
11088
11820
  products = _ProductController.products,
11089
- loading = _ProductController.loading;
11821
+ loading = _ProductController.loading,
11822
+ page = _ProductController.page;
11823
+ var _useState5 = useState({}),
11824
+ filterValue = _useState5[0],
11825
+ setFilterValue = _useState5[1];
11090
11826
  useEffect(function () {
11091
11827
  setIsAutoGetList(true);
11092
11828
  setParams(function (prev) {
@@ -11096,7 +11832,17 @@ var ProductSearch1 = function ProductSearch1(props) {
11096
11832
  });
11097
11833
  }, [keywordValue]);
11098
11834
  useEffect(function () {
11099
- if ((products === null || products === void 0 ? void 0 : products.length) > 0) setProductsFilter(products);
11835
+ if ((filterValue === null || filterValue === void 0 ? void 0 : filterValue.value) === "discount") {
11836
+ var _productsCopy;
11837
+ var productsCopy = [].concat(products);
11838
+ productsCopy = (_productsCopy = productsCopy) === null || _productsCopy === void 0 ? void 0 : _productsCopy.filter(function (product) {
11839
+ var _product$productInfo, _product$productInfo2, _product$productInfo3;
11840
+ return (product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo3 = product.productInfo) === null || _product$productInfo3 === void 0 ? void 0 : _product$productInfo3.price);
11841
+ });
11842
+ setProductsFilter(productsCopy);
11843
+ } else {
11844
+ setProductsFilter(products);
11845
+ }
11100
11846
  }, [products]);
11101
11847
  var handleGetMoreProducts = function handleGetMoreProducts() {
11102
11848
  setIsGetMore(false);
@@ -11107,10 +11853,13 @@ var ProductSearch1 = function ProductSearch1(props) {
11107
11853
  });
11108
11854
  };
11109
11855
  var handleFilter = function handleFilter(item) {
11110
- if ((item === null || item === void 0 ? void 0 : item.value) === "discount") {
11856
+ setFilterValue(item);
11857
+ if ((item === null || item === void 0 ? void 0 : item.value) === "discount" && !(params !== null && params !== void 0 && params.isHighlight)) {
11858
+ var _productsCopy2;
11111
11859
  var productsCopy = [].concat(products);
11112
- productsCopy === null || productsCopy === void 0 ? void 0 : productsCopy.filter(function (product) {
11113
- return (product === null || product === void 0 ? void 0 : product.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : product.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : product.price);
11860
+ productsCopy = (_productsCopy2 = productsCopy) === null || _productsCopy2 === void 0 ? void 0 : _productsCopy2.filter(function (product) {
11861
+ var _product$productInfo4, _product$productInfo5, _product$productInfo6;
11862
+ return (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo6 = product.productInfo) === null || _product$productInfo6 === void 0 ? void 0 : _product$productInfo6.price);
11114
11863
  });
11115
11864
  setProductsFilter(productsCopy);
11116
11865
  } else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
@@ -11135,7 +11884,7 @@ var ProductSearch1 = function ProductSearch1(props) {
11135
11884
  shopConfigStyle: shopConfigStyle
11136
11885
  }), /*#__PURE__*/React__default.createElement("div", {
11137
11886
  className: "text-lg"
11138
- }, "T\u1EEB kh\xF3a \"", keywordValue, "\" (", products === null || products === void 0 ? void 0 : products.length, " s\u1EA3n ph\u1EA9m)"), /*#__PURE__*/React__default.createElement(CarouselItem, {
11887
+ }, "T\u1EEB kh\xF3a \"", keywordValue, "\" (", page === null || page === void 0 ? void 0 : page.total_elements, " s\u1EA3n ph\u1EA9m)"), /*#__PURE__*/React__default.createElement(CarouselItem, {
11139
11888
  data: listFilter$1,
11140
11889
  isNavigateButton: false,
11141
11890
  onClick: handleFilter
@@ -11146,7 +11895,7 @@ var ProductSearch1 = function ProductSearch1(props) {
11146
11895
  }, productsFilter === null || productsFilter === void 0 ? void 0 : (_productsFilter$slice = productsFilter.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _productsFilter$slice === void 0 ? void 0 : _productsFilter$slice.map(function (product, idx) {
11147
11896
  return /*#__PURE__*/React__default.createElement(ProductItem, {
11148
11897
  Link: Link,
11149
- product: product === null || product === void 0 ? void 0 : product.productInfo,
11898
+ product: product,
11150
11899
  key: "htrhr-" + idx
11151
11900
  });
11152
11901
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
@@ -11202,7 +11951,7 @@ var ProductHot1 = function ProductHot1(props) {
11202
11951
  return /*#__PURE__*/React__default.createElement(ProductItem, {
11203
11952
  Link: Link,
11204
11953
  shopConfigStyle: shopConfigStyle,
11205
- product: product === null || product === void 0 ? void 0 : product.productInfo,
11954
+ product: product,
11206
11955
  key: "zjk-" + idx
11207
11956
  });
11208
11957
  })) : /*#__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, {
@@ -11251,7 +12000,7 @@ var ProductHot3 = function ProductHot3(props) {
11251
12000
  Link: Link,
11252
12001
  shopConfigStyle: shopConfigStyle,
11253
12002
  key: "htjtr-" + index,
11254
- product: product === null || product === void 0 ? void 0 : product.productInfo
12003
+ product: product
11255
12004
  });
11256
12005
  }))), /*#__PURE__*/React__default.createElement(Dash, {
11257
12006
  color: secondary
@@ -11293,7 +12042,7 @@ var ProductsTop1 = function ProductsTop1(props) {
11293
12042
  Link: Link,
11294
12043
  className: "border-0",
11295
12044
  shopConfigStyle: shopConfigStyle,
11296
- product: product === null || product === void 0 ? void 0 : product.productInfo,
12045
+ product: product,
11297
12046
  key: "htrhr-" + idx
11298
12047
  });
11299
12048
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
@@ -11343,7 +12092,7 @@ var ProductList5 = function ProductList5(props) {
11343
12092
  return /*#__PURE__*/React__default.createElement(ProductItem, {
11344
12093
  Link: Link,
11345
12094
  shopConfigStyle: shopConfigStyle,
11346
- product: product === null || product === void 0 ? void 0 : product.productInfo,
12095
+ product: product,
11347
12096
  key: "htrhr-" + idx
11348
12097
  });
11349
12098
  })) : /*#__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, {
@@ -11398,7 +12147,7 @@ var ProductHighlight1 = function ProductHighlight1(props) {
11398
12147
  }, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, idx) {
11399
12148
  return /*#__PURE__*/React__default.createElement(ProductItem, {
11400
12149
  Link: Link,
11401
- product: product === null || product === void 0 ? void 0 : product.productInfo,
12150
+ product: product,
11402
12151
  shopConfigStyle: shopConfigStyle,
11403
12152
  key: "zjk-" + idx
11404
12153
  });
@@ -11932,7 +12681,7 @@ var Booking1 = function Booking1(props) {
11932
12681
  shopConfigStyle: shopConfigStyle
11933
12682
  }), /*#__PURE__*/React__default.createElement("div", {
11934
12683
  className: "mt-12 grid grid-cols-1 gap-6 md:grid-cols-2 md:gap-12"
11935
- }, /*#__PURE__*/React__default.createElement(BookingForm, {
12684
+ }, /*#__PURE__*/React__default.createElement(BookingForm$1, {
11936
12685
  shopConfigStyle: shopConfigStyle,
11937
12686
  shopConfig: shopConfig,
11938
12687
  className: "!bg-bgSecondary"
@@ -11974,7 +12723,7 @@ var BookingForm6 = function BookingForm6(props) {
11974
12723
  className: "w-full h-auto"
11975
12724
  }), /*#__PURE__*/React__default.createElement("div", {
11976
12725
  className: "mt-4 whitespace-pre-line"
11977
- }, 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, {
12726
+ }, 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$1, {
11978
12727
  shopConfigStyle: shopConfigStyle,
11979
12728
  shopConfig: shopConfig,
11980
12729
  className: "col-span-2"
@@ -12218,7 +12967,7 @@ var BookingFoodForm = function BookingFoodForm(props) {
12218
12967
  })), /*#__PURE__*/React__default.createElement("div", {
12219
12968
  className: "text-center"
12220
12969
  }, /*#__PURE__*/React__default.createElement(Button, {
12221
- label: "Đặt lịch ngay",
12970
+ label: "Đặt bàn ngay",
12222
12971
  shopConfigStyle: shopConfigStyle,
12223
12972
  onClick: handleSubmit
12224
12973
  }))) : null, isOpenPopup && /*#__PURE__*/React__default.createElement(ModalNotification, {
@@ -12235,7 +12984,7 @@ var BookingFoodForm = function BookingFoodForm(props) {
12235
12984
  }
12236
12985
  })), /*#__PURE__*/React__default.createElement("div", {
12237
12986
  className: "font-medium text-2xl"
12238
- }, "\u0110\u1EB7t l\u1ECBch th\xE0nh c\xF4ng"), /*#__PURE__*/React__default.createElement("div", {
12987
+ }, "\u0110\u1EB7t b\xE0n th\xE0nh c\xF4ng"), /*#__PURE__*/React__default.createElement("div", {
12239
12988
  className: "text-center"
12240
12989
  }, "Ch\xFAng t\xF4i \u0111\xE3 ghi nh\u1EADn th\xF4ng tin c\u1EE7a b\u1EA1n v\xE0 s\u1EBD li\xEAn h\u1EC7 l\u1EA1i ngay"))));
12241
12990
  };
@@ -12257,7 +13006,7 @@ var BookingTable1 = function BookingTable1(props) {
12257
13006
  data: data,
12258
13007
  shopConfigStyle: shopConfigStyle
12259
13008
  }), /*#__PURE__*/React__default.createElement("div", {
12260
- className: "mt-6 md:mt-12 grid grid-cols-1 gap-6 md:grid-cols-3 md:gap-12"
13009
+ className: "mt-6 md:mt-12 grid grid-cols-1 gap-6 md:grid-cols-3 lg:gap-12"
12261
13010
  }, /*#__PURE__*/React__default.createElement(LinkToPage, {
12262
13011
  href: convertURL(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) || "#"
12263
13012
  }, 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", {
@@ -12268,13 +13017,13 @@ var BookingTable1 = function BookingTable1(props) {
12268
13017
  }
12269
13018
  })) : /*#__PURE__*/React__default.createElement("img", {
12270
13019
  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,
12271
- className: "w-full h-auto"
13020
+ className: "w-full h-full lg:h-auto object-cover rounded-2xl"
12272
13021
  }), /*#__PURE__*/React__default.createElement("div", {
12273
13022
  className: "mt-4 whitespace-pre-line"
12274
13023
  }, 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(BookingFoodForm, {
12275
13024
  shopConfigStyle: shopConfigStyle,
12276
13025
  shopConfig: shopConfig,
12277
- className: "col-span-2"
13026
+ className: "md:col-span-2"
12278
13027
  })));
12279
13028
  };
12280
13029
 
@@ -12386,6 +13135,30 @@ var Banner3 = function Banner3(props) {
12386
13135
  }));
12387
13136
  };
12388
13137
 
13138
+ var Banner4 = function Banner4(props) {
13139
+ var _data$data, _data$data$, _data$data2, _data$data2$slice;
13140
+ var data = props.data,
13141
+ _props$Link = props.Link,
13142
+ Link = _props$Link === void 0 ? null : _props$Link;
13143
+ return /*#__PURE__*/React__default.createElement("div", {
13144
+ className: SECTION_CLASS_PADDING + " grid grid-cols-1 bg-bgSecondary md:grid-cols-3 gap-6"
13145
+ }, /*#__PURE__*/React__default.createElement("img", {
13146
+ 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,
13147
+ className: "md:col-span-2 object-cover w-full h-full rounded-[10px]"
13148
+ }), /*#__PURE__*/React__default.createElement("div", {
13149
+ className: "flex flex-col gap-6"
13150
+ }, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$slice = _data$data2.slice(1, 3)) === null || _data$data2$slice === void 0 ? void 0 : _data$data2$slice.map(function (item, index) {
13151
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
13152
+ Link: Link,
13153
+ href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
13154
+ key: "djsd-" + index
13155
+ }, /*#__PURE__*/React__default.createElement("img", {
13156
+ src: item === null || item === void 0 ? void 0 : item.srcImage,
13157
+ className: "object-cover w-full h-full rounded-xl"
13158
+ }));
13159
+ })));
13160
+ };
13161
+
12389
13162
  var Banner7 = function Banner7(props) {
12390
13163
  var _data$data;
12391
13164
  var _props$shopConfigStyl = props.shopConfigStyle,
@@ -12457,7 +13230,7 @@ var Partner1 = function Partner1(props) {
12457
13230
  data: data,
12458
13231
  shopConfigStyle: shopConfigStyle
12459
13232
  }), /*#__PURE__*/React__default.createElement("div", {
12460
- className: "grid grid-cols-4 md:grid-cols-6 gap-6 mt-4 md:mt-6 p-6 rounded-xl",
13233
+ className: "grid grid-cols-4 md:grid-cols-6 gap-6 mt-4 md:mt-6 p-4 md:p-6 rounded-xl",
12461
13234
  style: {
12462
13235
  background: bgSecondary
12463
13236
  }
@@ -12622,7 +13395,7 @@ var dataFake = [{
12622
13395
  title: "Đa dạng thanh toán",
12623
13396
  data: [{
12624
13397
  svgImage: "",
12625
- srcImage: /*#__PURE__*/React__default.createElement(FaArrowsRotate, null),
13398
+ srcImage: /*#__PURE__*/React__default.createElement(GrPowerCycle, null),
12626
13399
  label: "Chuyển khoản",
12627
13400
  link: ""
12628
13401
  }, {
@@ -12659,7 +13432,7 @@ var dataFake = [{
12659
13432
  label: "Chính sách bảo hành",
12660
13433
  link: ""
12661
13434
  }, {
12662
- srcImage: /*#__PURE__*/React__default.createElement(FaArrowsRotate, null),
13435
+ srcImage: /*#__PURE__*/React__default.createElement(GrPowerCycle, null),
12663
13436
  svgImage: "",
12664
13437
  label: "Chính sách đổi trả",
12665
13438
  link: ""
@@ -12896,7 +13669,6 @@ var Footer7 = function Footer7(props) {
12896
13669
  textButton = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
12897
13670
  _shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
12898
13671
  bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
12899
- console.log("Footer7 shopConfig", shopConfig);
12900
13672
  var _useState = useState([]),
12901
13673
  shopAddressList = _useState[0],
12902
13674
  setShopAddressList = _useState[1];
@@ -13012,7 +13784,9 @@ var Footer7 = function Footer7(props) {
13012
13784
  style: {
13013
13785
  background: primary
13014
13786
  }
13015
- }))))), /*#__PURE__*/React__default.createElement("hr", null), /*#__PURE__*/React__default.createElement("div", {
13787
+ }))))), /*#__PURE__*/React__default.createElement("hr", {
13788
+ className: "mt-12"
13789
+ }), /*#__PURE__*/React__default.createElement("div", {
13016
13790
  className: "py-4"
13017
13791
  }, /*#__PURE__*/React__default.createElement("small", {
13018
13792
  className: "me-5"
@@ -13032,23 +13806,26 @@ var RatingStar = function RatingStar(props) {
13032
13806
  star = _props$star === void 0 ? 5 : _props$star,
13033
13807
  _props$style = props.style,
13034
13808
  style = _props$style === void 0 ? {} : _props$style,
13809
+ _props$color = props.color,
13810
+ color = _props$color === void 0 ? "#E2B93B" : _props$color,
13035
13811
  _props$className = props.className,
13036
13812
  className = _props$className === void 0 ? "" : _props$className;
13037
13813
  var res = [];
13038
- for (var i = 1; i < star; i++) {
13814
+ for (var i = 1; i <= star; i++) {
13039
13815
  res.push(/*#__PURE__*/React__default.createElement(FaStar, {
13040
- color: "#E2B93B"
13816
+ color: color
13041
13817
  }));
13818
+ if (i >= 5) break;
13042
13819
  }
13043
13820
  var decimalPart = star % 1;
13044
13821
  if (decimalPart && decimalPart >= 0.5) {
13045
13822
  res.push(/*#__PURE__*/React__default.createElement(FaRegStarHalfStroke, {
13046
- color: "#E2B93B"
13823
+ color: color
13047
13824
  }));
13048
13825
  }
13049
13826
  for (var _i = res === null || res === void 0 ? void 0 : res.length; _i < 5; _i++) {
13050
13827
  res.push(/*#__PURE__*/React__default.createElement(FaRegStar, {
13051
- color: "#E2B93B"
13828
+ color: color
13052
13829
  }));
13053
13830
  }
13054
13831
  return /*#__PURE__*/React__default.createElement("div", {
@@ -13218,9 +13995,9 @@ var CustomerRating8 = function CustomerRating8(props) {
13218
13995
  src: item === null || item === void 0 ? void 0 : item.avatar,
13219
13996
  className: "w-40 h-40 rounded-full object-cover border-8 border-stroke"
13220
13997
  }), /*#__PURE__*/React__default.createElement("div", {
13221
- className: "text-xl text-primary"
13998
+ className: "text-xl text-primary text-center"
13222
13999
  }, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
13223
- className: "text-gray3"
14000
+ className: "text-gray3 text-center"
13224
14001
  }, item === null || item === void 0 ? void 0 : item.description), /*#__PURE__*/React__default.createElement("div", {
13225
14002
  className: "flex gap-2 "
13226
14003
  }, /*#__PURE__*/React__default.createElement(RiDoubleQuotesL, {
@@ -13235,6 +14012,58 @@ var CustomerRating8 = function CustomerRating8(props) {
13235
14012
  }))));
13236
14013
  };
13237
14014
 
14015
+ var CustomerRating9 = function CustomerRating9(props) {
14016
+ var _data$data;
14017
+ var _props$shopConfigStyl = props.shopConfigStyle,
14018
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
14019
+ _props$data = props.data,
14020
+ data = _props$data === void 0 ? {} : _props$data,
14021
+ _props$SectionTitle = props.SectionTitle,
14022
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
14023
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
14024
+ className: SECTION_DEFAULT_CLASS
14025
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
14026
+ data: data,
14027
+ shopConfigStyle: shopConfigStyle
14028
+ }), /*#__PURE__*/React__default.createElement("div", {
14029
+ className: "mt-12 grid grid-cols-1 lg:grid-cols-3 gap-6"
14030
+ }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, index) {
14031
+ return /*#__PURE__*/React__default.createElement("div", {
14032
+ key: index,
14033
+ className: "flex bg-primary pt-16 px-6 pb-6"
14034
+ }, /*#__PURE__*/React__default.createElement("div", {
14035
+ className: "bg-background relative"
14036
+ }, /*#__PURE__*/React__default.createElement("div", {
14037
+ className: "flex justify-between items-center pr-4 w-full absolute top-[-40px]"
14038
+ }, /*#__PURE__*/React__default.createElement("div", {
14039
+ className: "text-[#A85A09]"
14040
+ }, /*#__PURE__*/React__default.createElement("svg", {
14041
+ width: "39",
14042
+ height: "28",
14043
+ viewBox: "0 0 39 28",
14044
+ fill: "none",
14045
+ xmlns: "http://www.w3.org/2000/svg"
14046
+ }, /*#__PURE__*/React__default.createElement("path", {
14047
+ d: "M34.5852 25.8793C34.9242 26.5446 34.4409 27.3333 33.6942 27.3333H27.7867C27.4106 27.3333 27.0664 27.1223 26.8957 26.7873L21.7391 16.6666V3.66663C21.7391 2.00977 23.0822 0.666626 24.7391 0.666626H35.0435C36.7003 0.666626 38.0435 2.00977 38.0435 3.66663V16.6666H29.8913L34.5852 25.8793ZM12.8461 25.8793C13.185 26.5446 12.7017 27.3333 11.955 27.3333H6.0475C5.67146 27.3333 5.3272 27.1223 5.15649 26.7873L-0.000110626 16.6666V3.66663C-0.000110626 2.00977 1.34304 0.666626 2.99989 0.666626H13.3043C14.9611 0.666626 16.3043 2.00977 16.3043 3.66663V16.6666H8.15208L12.8461 25.8793Z",
14048
+ fill: "currentColor"
14049
+ }))), /*#__PURE__*/React__default.createElement("img", {
14050
+ src: item === null || item === void 0 ? void 0 : item.avatar,
14051
+ className: " w-20 object-cover h-20 rounded-full"
14052
+ })), /*#__PURE__*/React__default.createElement("div", {
14053
+ className: "p-4 flex flex-col gap-2"
14054
+ }, /*#__PURE__*/React__default.createElement("div", {
14055
+ className: "text-lg text-textHeading md:text-2xl"
14056
+ }, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
14057
+ className: "w-full border border-secondary"
14058
+ }), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.content), /*#__PURE__*/React__default.createElement("div", {
14059
+ className: "ms-auto"
14060
+ }, /*#__PURE__*/React__default.createElement(RatingStar, {
14061
+ star: (item === null || item === void 0 ? void 0 : item.rate) || 5,
14062
+ color: "#A85A09"
14063
+ })))));
14064
+ }))));
14065
+ };
14066
+
13238
14067
  var CustomerRating10 = function CustomerRating10(props) {
13239
14068
  var _data$data;
13240
14069
  var _props$shopConfigStyl = props.shopConfigStyle,
@@ -13409,7 +14238,7 @@ var Gallery1 = function Gallery1(props) {
13409
14238
  }));
13410
14239
  };
13411
14240
 
13412
- var Gallery1$1 = function Gallery1(props) {
14241
+ var Gallery2 = function Gallery2(props) {
13413
14242
  var _data$data, _data$data$slice, _data$data2, _data$data2$slice, _data$data3, _data$data3$slice;
13414
14243
  var _props$shopConfigStyl = props.shopConfigStyle,
13415
14244
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
@@ -13448,6 +14277,30 @@ var Gallery1$1 = function Gallery1(props) {
13448
14277
  })))));
13449
14278
  };
13450
14279
 
14280
+ var Gallery3 = function Gallery3(props) {
14281
+ var _data$data;
14282
+ var _props$shopConfigStyl = props.shopConfigStyle,
14283
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
14284
+ _props$data = props.data,
14285
+ data = _props$data === void 0 ? {} : _props$data,
14286
+ _props$SectionTitle = props.SectionTitle,
14287
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
14288
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
14289
+ className: "" + SECTION_DEFAULT_CLASS
14290
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
14291
+ data: data,
14292
+ shopConfigStyle: shopConfigStyle
14293
+ }), /*#__PURE__*/React__default.createElement("div", {
14294
+ className: "grid grid-cols-3 gap-2 md:gap-6 mt-6 md:mt-12"
14295
+ }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, index) {
14296
+ return /*#__PURE__*/React__default.createElement("img", {
14297
+ src: item === null || item === void 0 ? void 0 : item.srcImage,
14298
+ key: "iggdf-" + index,
14299
+ className: (index === 1 || index === 5 ? "col-span-2" : "") + " w-full h-full object-cover"
14300
+ });
14301
+ }))));
14302
+ };
14303
+
13451
14304
  var PageTitle1 = function PageTitle1(props) {
13452
14305
  var _sectionData$;
13453
14306
  var data = props.data,
@@ -13478,13 +14331,13 @@ var PageTitle2 = function PageTitle2(props) {
13478
14331
  backgroundImage: "url(" + (sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage) + ")"
13479
14332
  }
13480
14333
  }, /*#__PURE__*/React__default.createElement("div", {
13481
- className: "absolute top-0 w-full h-full bg-black opacity-40 z-0"
14334
+ className: "absolute top-0 w-full h-full bg-black/60 z-0"
13482
14335
  }), /*#__PURE__*/React__default.createElement("div", {
13483
- className: "relative w-full p-20 z-10 flex flex-col gap-6 items-center justify-center"
14336
+ className: "relative w-full p-10 lg:p-20 z-10 flex flex-col gap-6 items-center justify-center"
13484
14337
  }, /*#__PURE__*/React__default.createElement("h2", {
13485
14338
  className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
13486
14339
  }, data !== null && data !== void 0 && data.sectionTitle ? data === null || data === void 0 ? void 0 : data.sectionTitle : route === null || route === void 0 ? void 0 : route.label), data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("div", {
13487
- className: "text-lg md:text-2xl text-white"
14340
+ className: "text-lg md:text-2xl text-white text-center"
13488
14341
  }, data === null || data === void 0 ? void 0 : data.sectionDescription) : null));
13489
14342
  };
13490
14343
 
@@ -13565,9 +14418,9 @@ var PageTitle3 = function PageTitle3(props) {
13565
14418
  backgroundImage: "url(" + (sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage) + ")"
13566
14419
  }
13567
14420
  }, /*#__PURE__*/React__default.createElement("div", {
13568
- className: "absolute top-0 w-full h-full bg-black opacity-60 z-0"
14421
+ className: "absolute top-0 w-full h-full bg-black/60 z-0"
13569
14422
  }), /*#__PURE__*/React__default.createElement("div", {
13570
- className: "relative w-full p-20 z-10 flex flex-col items-center justify-center"
14423
+ className: "relative w-full pt-8 md:p-2 md:p-12 lg:p-20 z-10 flex flex-col items-center justify-center"
13571
14424
  }, /*#__PURE__*/React__default.createElement("h2", {
13572
14425
  className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
13573
14426
  }, route === null || route === void 0 ? void 0 : (_route$route = route.route) === null || _route$route === void 0 ? void 0 : (_route$route$split = _route$route.split("/")) === null || _route$route$split === void 0 ? void 0 : (_route$route$split$fi = _route$route$split.filter(function (e) {
@@ -13589,7 +14442,7 @@ var About1 = function About1(props) {
13589
14442
  _props$SectionTitle = props.SectionTitle,
13590
14443
  SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
13591
14444
  return /*#__PURE__*/React__default.createElement("div", {
13592
- className: SECTION_CLASS + " flex flex-col gap-4"
14445
+ className: SECTION_CLASS + " flex flex-col gap-6"
13593
14446
  }, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement(SectionTitle, {
13594
14447
  data: data,
13595
14448
  shopConfigStyle: shopConfigStyle
@@ -13609,13 +14462,14 @@ var About5 = function About5(props) {
13609
14462
  SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
13610
14463
  data = props.data;
13611
14464
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
13612
- console.log("About5 sectionData", sectionData);
13613
14465
  return /*#__PURE__*/React__default.createElement("div", {
13614
14466
  className: SECTION_DEFAULT_CLASS + " "
13615
- }, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement(SectionTitle, {
14467
+ }, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement("div", {
14468
+ className: "mb-6"
14469
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
13616
14470
  data: data,
13617
14471
  shopConfigStyle: shopConfigStyle
13618
- }) : null, /*#__PURE__*/React__default.createElement("div", {
14472
+ })) : null, /*#__PURE__*/React__default.createElement("div", {
13619
14473
  className: "grid grid-cols-1 lg:grid-cols-2 gap-12 mt-4 md:mt-6"
13620
14474
  }, /*#__PURE__*/React__default.createElement("img", {
13621
14475
  src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage,
@@ -13633,25 +14487,28 @@ var About5 = function About5(props) {
13633
14487
 
13634
14488
  var About6 = function About6(props) {
13635
14489
  var _sectionData$, _sectionData$2;
13636
- var shopConfig = props.shopConfig,
13637
- data = props.data;
14490
+ var shopConfigStyle = props.shopConfigStyle,
14491
+ shopConfig = props.shopConfig,
14492
+ data = props.data,
14493
+ _props$SectionTitle = props.SectionTitle,
14494
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
13638
14495
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
13639
- console.log("About5 sectionData", sectionData);
13640
14496
  return /*#__PURE__*/React__default.createElement("div", {
13641
14497
  className: SECTION_DEFAULT_CLASS + " mt-0"
13642
- }, /*#__PURE__*/React__default.createElement("h2", {
13643
- className: "text-2xl md:text-4xl text-textHeading font-semibold mb-6 lg:mb-8"
13644
- }, data === null || data === void 0 ? void 0 : data.sectionTitle) , /*#__PURE__*/React__default.createElement("div", {
13645
- className: "grid grid-cols-1 lg:grid-cols-5 gap-6 lg:gap-10"
14498
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
14499
+ data: data,
14500
+ shopConfigStyle: shopConfigStyle
14501
+ }), /*#__PURE__*/React__default.createElement("div", {
14502
+ className: "grid grid-cols-1 lg:grid-cols-5 gap-6 lg:gap-10 " + (data !== null && data !== void 0 && data.sectionTitle ? "mt-6" : "mt-0")
13646
14503
  }, /*#__PURE__*/React__default.createElement("img", {
13647
14504
  src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage,
13648
14505
  className: "w-full h-auto object-cover lg:hidden block rounded-xl"
13649
- }), /*#__PURE__*/React__default.createElement("div", {
14506
+ }), shopConfig !== null && shopConfig !== void 0 && shopConfig.shopAbout ? /*#__PURE__*/React__default.createElement("div", {
13650
14507
  className: "ck-content text-wrap lg:col-span-3 bg-bgSecondary p-4 lg:p-6 rounded-2xl",
13651
14508
  dangerouslySetInnerHTML: {
13652
14509
  __html: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopAbout
13653
14510
  }
13654
- }), /*#__PURE__*/React__default.createElement("img", {
14511
+ }) : null, /*#__PURE__*/React__default.createElement("img", {
13655
14512
  src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$2 = sectionData[0]) === null || _sectionData$2 === void 0 ? void 0 : _sectionData$2.srcImage,
13656
14513
  className: "w-full h-auto object-cover lg:col-span-2 lg:block hidden rounded-xl"
13657
14514
  })));
@@ -14036,6 +14893,10 @@ var FormCheckout = forwardRef(function (props, ref) {
14036
14893
  })));
14037
14894
  });
14038
14895
 
14896
+ var dayjs_min = createCommonjsModule(function (module, exports) {
14897
+ !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
14898
+ });
14899
+
14039
14900
  var OrderControllerWithoutLogin = function OrderControllerWithoutLogin(props) {
14040
14901
  _objectDestructuringEmpty(props);
14041
14902
  var draftOrderWithoutLogin = function draftOrderWithoutLogin(shopId, dataOrder) {
@@ -14471,7 +15332,7 @@ var SearchProduct1 = function SearchProduct1(props) {
14471
15332
  } else {
14472
15333
  var delayDebounceFn = setTimeout(function () {
14473
15334
  handleSearch(valueSearch);
14474
- }, 500);
15335
+ }, 600);
14475
15336
  return function () {
14476
15337
  return clearTimeout(delayDebounceFn);
14477
15338
  };
@@ -14530,9 +15391,9 @@ var SearchProduct1 = function SearchProduct1(props) {
14530
15391
  className: "flex flex-col px-1 gap-2 border-b w-full"
14531
15392
  }, /*#__PURE__*/React__default.createElement("div", {
14532
15393
  className: "mt-1 text-lg font-medium\t"
14533
- }, item === null || item === void 0 ? void 0 : (_item$productInfo = item.productInfo) === null || _item$productInfo === void 0 ? void 0 : _item$productInfo.productName), /*#__PURE__*/React__default.createElement("div", {
14534
- className: " text-lg font-medium\t"
14535
- }, formatCurrency(item === null || item === void 0 ? void 0 : (_item$productInfo2 = item.productInfo) === null || _item$productInfo2 === void 0 ? void 0 : _item$productInfo2.price))));
15394
+ }, item === null || item === void 0 ? void 0 : (_item$productInfo = item.productInfo) === null || _item$productInfo === void 0 ? void 0 : _item$productInfo.productName), item !== null && item !== void 0 && item.isShowProductPriceOnLanding ? /*#__PURE__*/React__default.createElement("div", {
15395
+ className: " text-lg font-medium"
15396
+ }, formatCurrency(item === null || item === void 0 ? void 0 : (_item$productInfo2 = item.productInfo) === null || _item$productInfo2 === void 0 ? void 0 : _item$productInfo2.price)) : null));
14536
15397
  })) : /*#__PURE__*/React__default.createElement("div", {
14537
15398
  className: "text-center"
14538
15399
  }, data === null || data === void 0 ? void 0 : data.sectionDescription));
@@ -14561,7 +15422,7 @@ var SearchBar2 = function SearchBar2(props) {
14561
15422
  } else {
14562
15423
  var delayDebounceFn = setTimeout(function () {
14563
15424
  handleSearch(valueSearch);
14564
- }, 500);
15425
+ }, 600);
14565
15426
  return function () {
14566
15427
  return clearTimeout(delayDebounceFn);
14567
15428
  };
@@ -14623,9 +15484,9 @@ var SearchBar2 = function SearchBar2(props) {
14623
15484
  className: "flex flex-col px-1 gap-2 border-b w-full"
14624
15485
  }, /*#__PURE__*/React__default.createElement("div", {
14625
15486
  className: "mt-1 text-lg font-medium\t"
14626
- }, item === null || item === void 0 ? void 0 : (_item$productInfo = item.productInfo) === null || _item$productInfo === void 0 ? void 0 : _item$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
15487
+ }, item === null || item === void 0 ? void 0 : (_item$productInfo = item.productInfo) === null || _item$productInfo === void 0 ? void 0 : _item$productInfo.productName), item !== null && item !== void 0 && item.isShowProductPriceOnLanding ? /*#__PURE__*/React__default.createElement(ProductPrice, {
14627
15488
  product: item === null || item === void 0 ? void 0 : item.productInfo
14628
- })));
15489
+ }) : null));
14629
15490
  })) : null)));
14630
15491
  };
14631
15492
 
@@ -14656,7 +15517,7 @@ var SearchBar5 = function SearchBar5(props) {
14656
15517
  }, /*#__PURE__*/React__default.createElement("div", {
14657
15518
  className: "absolute inset-0 bg-black/45 rounded-xl md:rounded-3xl"
14658
15519
  }), /*#__PURE__*/React__default.createElement("div", {
14659
- className: "flex flex-col relative gap-2 md:gap-4 items-center justify-center"
15520
+ className: "flex flex-col relative gap-2 md:gap-4 items-center justify-center w-full sm:min-w-2/3 lg:min-w-1/2"
14660
15521
  }, data !== null && data !== void 0 && (_data$data2 = data.data) !== null && _data$data2 !== void 0 && _data$data2.title ? /*#__PURE__*/React__default.createElement("div", {
14661
15522
  className: "text-lg font-semibold md:text-3xl lg:text-4xl text-textButton text-center"
14662
15523
  }, 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", {
@@ -14666,7 +15527,7 @@ var SearchBar5 = function SearchBar5(props) {
14666
15527
  icons: /*#__PURE__*/React__default.createElement(IoSearchOutline, {
14667
15528
  className: "text-gray3 ps-1 text-xl md:text-2xl"
14668
15529
  }),
14669
- wrapClassName: "w-full md:w-[80%] ",
15530
+ wrapClassName: "w-[90%] sm:w-1/2 lg:w-[40%] ",
14670
15531
  className: "w-full bg-bgSecondary mb-2 md:h-12",
14671
15532
  onKeyDown: function onKeyDown(e) {
14672
15533
  handleSearch(e);
@@ -14705,7 +15566,7 @@ var SearchBar6 = function SearchBar6(props) {
14705
15566
  }
14706
15567
  };
14707
15568
  return /*#__PURE__*/React__default.createElement("div", {
14708
- className: "w-full flex flex-col justify-center px-3 md:px-6 gap-2 md:gap-4 lg:gap-6 items-center h-40 lg:h-52 ",
15569
+ className: "w-full flex flex-col justify-center px-3 md:px-6 gap-2 md:gap-4 lg:gap-6 items-center py-6 md:py-12 lg:px-20",
14709
15570
  style: {
14710
15571
  background: "url(" + (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.srcImage) + ")",
14711
15572
  backgroundPosition: "center",
@@ -14918,7 +15779,7 @@ var ShopHighlights8 = function ShopHighlights8(props) {
14918
15779
  className: "flex flex-col h-full gap-3"
14919
15780
  }, /*#__PURE__*/React__default.createElement("img", {
14920
15781
  src: item === null || item === void 0 ? void 0 : item.srcImage,
14921
- className: "object-cover"
15782
+ className: "object-cover rounded-lg"
14922
15783
  }), /*#__PURE__*/React__default.createElement("div", {
14923
15784
  className: "text-2xl text-textBody"
14924
15785
  }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
@@ -14927,6 +15788,89 @@ var ShopHighlights8 = function ShopHighlights8(props) {
14927
15788
  })));
14928
15789
  };
14929
15790
 
15791
+ var ShopHighlights9 = function ShopHighlights9(props) {
15792
+ var data = props.data,
15793
+ _props$Link = props.Link,
15794
+ Link = _props$Link === void 0 ? null : _props$Link,
15795
+ _props$SectionTitle = props.SectionTitle,
15796
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
15797
+ var sectionData = data === null || data === void 0 ? void 0 : data.data;
15798
+ return /*#__PURE__*/React__default.createElement("div", {
15799
+ className: SECTION_CLASS + " flex flex-col gap-6 md:gap-10"
15800
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
15801
+ data: data
15802
+ }), /*#__PURE__*/React__default.createElement("div", {
15803
+ className: "grid grid-cols-1 lg:grid-cols-2 gap-4 lg:gap-x-12 lg:gap-y-6"
15804
+ }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
15805
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
15806
+ Link: Link,
15807
+ href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
15808
+ key: "kdf-" + index
15809
+ }, /*#__PURE__*/React__default.createElement("div", {
15810
+ className: "flex flex-col md:flex-row h-full gap-4"
15811
+ }, /*#__PURE__*/React__default.createElement("img", {
15812
+ src: item === null || item === void 0 ? void 0 : item.srcImage,
15813
+ className: "object-cover rounded-lg w-full md:min-w-60 md:max-w-60"
15814
+ }), /*#__PURE__*/React__default.createElement("div", {
15815
+ className: "flex flex-col gap-2"
15816
+ }, /*#__PURE__*/React__default.createElement("div", {
15817
+ className: "text-lg font-semibold text-textHeading"
15818
+ }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
15819
+ className: "w-1/3 border border-stroke"
15820
+ }), /*#__PURE__*/React__default.createElement("div", {
15821
+ className: "flex-grow text-textBody leading-relaxed"
15822
+ }, item === null || item === void 0 ? void 0 : item.description))));
15823
+ })));
15824
+ };
15825
+
15826
+ var ShopHighlights10 = function ShopHighlights10(props) {
15827
+ var data = props.data,
15828
+ _props$Link = props.Link,
15829
+ Link = _props$Link === void 0 ? null : _props$Link;
15830
+ var sectionData = data === null || data === void 0 ? void 0 : data.data;
15831
+ return /*#__PURE__*/React__default.createElement("div", {
15832
+ className: "pt-10"
15833
+ }, /*#__PURE__*/React__default.createElement("div", {
15834
+ className: "relative overflow-hidden w-full"
15835
+ }, /*#__PURE__*/React__default.createElement("svg", {
15836
+ viewBox: "0 0 1440 105",
15837
+ className: "text-[#FFE7CC] w-[105%]",
15838
+ fill: "none",
15839
+ xmlns: "http://www.w3.org/2000/svg"
15840
+ }, /*#__PURE__*/React__default.createElement("path", {
15841
+ d: "M439.5 55.3739C216.5 71.3734 77 37.8735 0 0.747667V104.606H1440C1410.56 83.7584 1313.93 35.6959 1162.92 10.2239C974.151 -21.6161 726.714 34.7672 439.5 55.3739Z",
15842
+ fill: "currentColor"
15843
+ })), /*#__PURE__*/React__default.createElement("div", {
15844
+ className: "text-primary w-[105%] absolute top-2"
15845
+ }, /*#__PURE__*/React__default.createElement("svg", {
15846
+ viewBox: "0 0 1440 104",
15847
+ fill: "none",
15848
+ xmlns: "http://www.w3.org/2000/svg"
15849
+ }, /*#__PURE__*/React__default.createElement("path", {
15850
+ d: "M439.5 54.6864C216.5 70.6859 77 37.186 0 0.0601582V103.918H1440C1410.56 83.0709 1313.93 35.0084 1162.92 9.53638C974.151 -22.3036 726.714 34.0797 439.5 54.6864Z",
15851
+ fill: "currentColor"
15852
+ })))), /*#__PURE__*/React__default.createElement("div", {
15853
+ className: SECTION_CLASS + " mt-0 md:mt-0 grid grid-cols-1 md:grid-cols-3 gap-4 md:gap-4 bg-primary py-10"
15854
+ }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
15855
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
15856
+ Link: Link,
15857
+ href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
15858
+ key: "kdf-" + index
15859
+ }, /*#__PURE__*/React__default.createElement("div", {
15860
+ className: "flex flex-col h-full gap-6"
15861
+ }, /*#__PURE__*/React__default.createElement("div", {
15862
+ className: "flex flex-col gap-3 items-center"
15863
+ }, /*#__PURE__*/React__default.createElement("div", {
15864
+ className: "text-2xl text-center text-textButton"
15865
+ }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
15866
+ className: "flex-grow text-lg leading-relaxed text-center text-textSecondary"
15867
+ }, item === null || item === void 0 ? void 0 : item.description)), /*#__PURE__*/React__default.createElement("img", {
15868
+ src: item === null || item === void 0 ? void 0 : item.srcImage,
15869
+ className: "h-56 lg:h-72 object-cover mt-auto border-4 border-secondary"
15870
+ })));
15871
+ })));
15872
+ };
15873
+
14930
15874
  var VideoFull1 = function VideoFull1(props) {
14931
15875
  var _data$data, _data$data$;
14932
15876
  var shopConfigStyle = props.shopConfigStyle,
@@ -15041,7 +15985,7 @@ var DefaultImage$1 = function DefaultImage(props) {
15041
15985
  var _props$className = props.className,
15042
15986
  className = _props$className === void 0 ? "" : _props$className;
15043
15987
  return /*#__PURE__*/React__default.createElement("div", {
15044
- className: "flex justify-center items-center max-w-full h-full aspect-video rounded-lg " + className,
15988
+ className: "flex justify-center items-center w-full h-full aspect-video object-cover rounded-lg " + className,
15045
15989
  style: {
15046
15990
  backgroundColor: "#FAFAFA"
15047
15991
  }
@@ -15069,7 +16013,7 @@ var NewsImage = function NewsImage(props) {
15069
16013
  };
15070
16014
  return src ? /*#__PURE__*/React__default.createElement("img", {
15071
16015
  src: src,
15072
- className: "h-full rounded-lg max-w-full aspect-video " + className,
16016
+ className: "h-full rounded-lg w-full aspect-video object-cover " + className,
15073
16017
  style: size ? {
15074
16018
  width: size,
15075
16019
  height: size
@@ -15080,8 +16024,56 @@ var NewsImage = function NewsImage(props) {
15080
16024
  });
15081
16025
  };
15082
16026
 
16027
+ var NewsItem2 = function NewsItem2(_ref) {
16028
+ var newsArticle = _ref.newsArticle;
16029
+ return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(NewsImage, {
16030
+ news: newsArticle
16031
+ }), /*#__PURE__*/React__default.createElement("div", {
16032
+ className: "pt-3 font-medium text-lg line-clamp-3",
16033
+ style: {
16034
+ lineHeight: 1.6
16035
+ }
16036
+ }, newsArticle === null || newsArticle === void 0 ? void 0 : newsArticle.title));
16037
+ };
16038
+
16039
+ var relativeTime = createCommonjsModule(function (module, exports) {
16040
+ !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)};}}));
16041
+ });
16042
+
16043
+ var vi = createCommonjsModule(function (module, exports) {
16044
+ !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),_}));
16045
+ });
16046
+
16047
+ dayjs_min.extend(relativeTime);
16048
+ dayjs_min.locale("vi");
16049
+ var NewsItem1 = function NewsItem1(_ref) {
16050
+ var _dayjs;
16051
+ var newsArticle = _ref.newsArticle,
16052
+ _ref$isHidden = _ref.isHidden,
16053
+ isHidden = _ref$isHidden === void 0 ? false : _ref$isHidden;
16054
+ return /*#__PURE__*/React__default.createElement("div", {
16055
+ className: "grid grid-cols-1 md:grid-cols-2 gap-4 "
16056
+ }, /*#__PURE__*/React__default.createElement(NewsImage, {
16057
+ news: newsArticle
16058
+ }), /*#__PURE__*/React__default.createElement("div", {
16059
+ className: "flex flex-col gap-4 md:gap-3 pb-4"
16060
+ }, /*#__PURE__*/React__default.createElement("div", {
16061
+ className: "font-medium text-lg line-clamp-3 md:line-clamp-2 lg:line-clamp-3",
16062
+ style: {
16063
+ lineHeight: 1.6
16064
+ }
16065
+ }, newsArticle === null || newsArticle === void 0 ? void 0 : newsArticle.title), !isHidden ? /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
16066
+ className: "line-clamp-4 md:line-clamp-3 lg:line-clamp-4 font-normal min-h-6 md:min-h-20 text-gray3",
16067
+ style: {
16068
+ lineHeight: 1.6
16069
+ }
16070
+ }, newsArticle === null || newsArticle === void 0 ? void 0 : newsArticle.shortDescription), /*#__PURE__*/React__default.createElement("div", {
16071
+ className: "text-gray3 mt-4"
16072
+ }, (_dayjs = dayjs_min(newsArticle === null || newsArticle === void 0 ? void 0 : newsArticle.timeUpdate)) === null || _dayjs === void 0 ? void 0 : _dayjs.fromNow())) : null));
16073
+ };
16074
+
15083
16075
  var NewsHighlight1 = function NewsHighlight1(props) {
15084
- var _newsArticles$, _newsArticles$2, _newsArticles$3, _newsArticles$slice;
16076
+ var _newsArticles$slice;
15085
16077
  var _props$SectionTitle = props.SectionTitle,
15086
16078
  SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
15087
16079
  _props$shopConfigStyl = props.shopConfigStyle,
@@ -15106,34 +16098,34 @@ var NewsHighlight1 = function NewsHighlight1(props) {
15106
16098
  }, /*#__PURE__*/React__default.createElement(SectionTitle, {
15107
16099
  data: data,
15108
16100
  shopConfigStyle: shopConfigStyle
15109
- }), /*#__PURE__*/React__default.createElement("div", {
16101
+ }), (newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
15110
16102
  className: "mt-12 mb-6 grid grid-cols-1 md:grid-cols-2 gap-6 "
15111
16103
  }, /*#__PURE__*/React__default.createElement(LinkToPage, {
15112
16104
  href: getLinkNewsDetail(newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[0]),
15113
16105
  Link: Link
15114
- }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(NewsImage, {
15115
- news: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[0]
15116
- }), /*#__PURE__*/React__default.createElement("div", {
15117
- className: "pt-3 font-medium text-lg"
15118
- }, newsArticles === null || newsArticles === void 0 ? void 0 : (_newsArticles$ = newsArticles[0]) === null || _newsArticles$ === void 0 ? void 0 : _newsArticles$.title))), /*#__PURE__*/React__default.createElement("div", {
16106
+ }, /*#__PURE__*/React__default.createElement(NewsItem2, {
16107
+ newsArticle: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[0]
16108
+ })), /*#__PURE__*/React__default.createElement("div", {
15119
16109
  className: "flex flex-col gap-6"
15120
- }, /*#__PURE__*/React__default.createElement(LinkToPage, {
15121
- className: "grid grid-cols-1 md:grid-cols-2 gap-4 ",
16110
+ }, newsArticles !== null && newsArticles !== void 0 && newsArticles[1] ? /*#__PURE__*/React__default.createElement(LinkToPage, {
15122
16111
  href: getLinkNewsDetail(newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[1]),
15123
16112
  Link: Link
15124
- }, /*#__PURE__*/React__default.createElement(NewsImage, {
15125
- news: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[1]
15126
- }), /*#__PURE__*/React__default.createElement("div", {
15127
- className: "font-medium text-lg"
15128
- }, 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, {
15129
- className: "grid grid-cols-1 md:grid-cols-2 gap-4",
16113
+ }, newsArticles !== null && newsArticles !== void 0 && newsArticles[2] ? /*#__PURE__*/React__default.createElement(NewsItem1, {
16114
+ newsArticle: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[1],
16115
+ isHidden: true
16116
+ }) : /*#__PURE__*/React__default.createElement(NewsItem2, {
16117
+ newsArticle: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[1]
16118
+ })) : null, newsArticles !== null && newsArticles !== void 0 && newsArticles[2] ? /*#__PURE__*/React__default.createElement(LinkToPage, {
15130
16119
  href: getLinkNewsDetail(newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[2]),
15131
16120
  Link: Link
15132
- }, /*#__PURE__*/React__default.createElement(NewsImage, {
15133
- news: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[2]
15134
- }), /*#__PURE__*/React__default.createElement("div", {
15135
- className: "font-medium text-lg"
15136
- }, 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", {
16121
+ }, /*#__PURE__*/React__default.createElement(NewsItem1, {
16122
+ newsArticle: newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles[2],
16123
+ isHidden: true
16124
+ })) : null)) : /*#__PURE__*/React__default.createElement("div", {
16125
+ className: "w-full h-64 flex flex-col justify-center items-center text-gray3"
16126
+ }, /*#__PURE__*/React__default.createElement(GiNewspaper, {
16127
+ size: 80
16128
+ }), " Kh\xF4ng c\xF3 tin t\u1EE9c n\xE0o"), /*#__PURE__*/React__default.createElement("div", {
15137
16129
  className: "grid grid-cols-1 md:grid-cols-3 gap-6 mt-6 "
15138
16130
  }, 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) {
15139
16131
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
@@ -15142,22 +16134,12 @@ var NewsHighlight1 = function NewsHighlight1(props) {
15142
16134
  key: "kdjf-" + index
15143
16135
  }, /*#__PURE__*/React__default.createElement("div", {
15144
16136
  className: "jgdfg-" + index
15145
- }, /*#__PURE__*/React__default.createElement(NewsImage, {
15146
- news: item
15147
- }), /*#__PURE__*/React__default.createElement("div", {
15148
- className: "font-medium text-lg py-2"
15149
- }, item === null || item === void 0 ? void 0 : item.title)));
16137
+ }, /*#__PURE__*/React__default.createElement(NewsItem2, {
16138
+ newsArticle: item
16139
+ })));
15150
16140
  })));
15151
16141
  };
15152
16142
 
15153
- var relativeTime = createCommonjsModule(function (module, exports) {
15154
- !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)};}}));
15155
- });
15156
-
15157
- var vi = createCommonjsModule(function (module, exports) {
15158
- !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),_}));
15159
- });
15160
-
15161
16143
  var getAllNewsCategoriesApi = function getAllNewsCategoriesApi(shopId, landingShopConfigId, appId) {
15162
16144
  if (appId === void 0) {
15163
16145
  appId = "SSPA";
@@ -15268,10 +16250,10 @@ var News1 = function News1(props) {
15268
16250
  });
15269
16251
  }
15270
16252
  }, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
15271
- className: "rounded-b-lg bg-bgSecondary"
16253
+ className: "rounded-b-lg bg-bgSecondary overflow-y-auto scroll-container max-h-[700px]"
15272
16254
  }, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {
15273
16255
  return /*#__PURE__*/React__default.createElement("div", {
15274
- className: "px-6 py-3 hover:bg-gray-100 hover:text-primary cursor-pointer",
16256
+ className: "px-6 hover:bg-gray-100 hover:text-primary cursor-pointer " + ((item === null || item === void 0 ? void 0 : item.catId) === (categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catId) ? "bg-gray-100 text-primary" : "") + " ",
15275
16257
  key: "sdjfdh-" + index,
15276
16258
  onClick: function onClick() {
15277
16259
  setCategorySelected(item);
@@ -15281,39 +16263,33 @@ var News1 = function News1(props) {
15281
16263
  });
15282
16264
  });
15283
16265
  }
15284
- }, item === null || item === void 0 ? void 0 : item.catName);
16266
+ }, /*#__PURE__*/React__default.createElement("div", {
16267
+ className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
16268
+ }, /*#__PURE__*/React__default.createElement("div", {
16269
+ className: "line-clamp-3"
16270
+ }, item === null || item === void 0 ? void 0 : item.catName)));
15285
16271
  }))), /*#__PURE__*/React__default.createElement("div", {
15286
16272
  className: "md:col-span-2 flex flex-col gap-8"
15287
16273
  }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
15288
- className: "px-6 py-3 text-textButton text-lg rounded-t-lg bg-primary w-max"
15289
- }, params !== null && params !== void 0 && params.catId ? categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catName : "Tin mới"), /*#__PURE__*/React__default.createElement("div", {
16274
+ className: "px-6 py-3 text-textButton text-lg rounded-t-lg bg-primary w-max max-w-full"
16275
+ }, /*#__PURE__*/React__default.createElement("div", {
16276
+ className: "line-clamp-1"
16277
+ }, params !== null && params !== void 0 && params.catId ? categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catName : "Tin mới")), /*#__PURE__*/React__default.createElement("div", {
15290
16278
  className: "w-full border border-primary"
15291
16279
  })), loading & isSeeMore ? /*#__PURE__*/React__default.createElement("div", {
15292
16280
  className: "w-full h-80 flex justify-center items-center"
15293
16281
  }, /*#__PURE__*/React__default.createElement(Loading, null)) : /*#__PURE__*/React__default.createElement("div", {
15294
16282
  className: "flex flex-col gap-8"
15295
16283
  }, (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) {
15296
- var _dayjs;
15297
16284
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
15298
16285
  href: getLinkNewsDetail(item),
15299
16286
  Link: Link,
15300
16287
  key: "kghf-" + index
15301
- }, /*#__PURE__*/React__default.createElement("div", {
15302
- className: "grid grid-cols-2 gap-2 md:gap-4 cursor-pointer",
15303
- key: "djfsdf-" + index
15304
- }, /*#__PURE__*/React__default.createElement(NewsImage, {
15305
- news: item
15306
- }), /*#__PURE__*/React__default.createElement("div", {
15307
- className: "flex flex-col gap-2 md:gap-3 pb-4"
15308
- }, /*#__PURE__*/React__default.createElement("div", {
15309
- className: "font-medium text-lg md:text-xl line-clamp-2"
15310
- }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
15311
- className: "line-clamp-3 font-normal min-h-6 md:min-h-20 text-gray3"
15312
- }, item === null || item === void 0 ? void 0 : item.shortDescription), /*#__PURE__*/React__default.createElement("div", {
15313
- className: " text-gray3"
15314
- }, (_dayjs = dayjs_min(item === null || item === void 0 ? void 0 : item.timeUpdate)) === null || _dayjs === void 0 ? void 0 : _dayjs.fromNow()))));
16288
+ }, /*#__PURE__*/React__default.createElement(NewsItem1, {
16289
+ newsArticle: item
16290
+ }));
15315
16291
  }) : /*#__PURE__*/React__default.createElement("div", {
15316
- className: "w-full h-64 flex flex-col justify-center items-center text-gray3"
16292
+ className: "w-full h-64 flex flex-col justify-center items-center text-gray3 "
15317
16293
  }, /*#__PURE__*/React__default.createElement(GiNewspaper, {
15318
16294
  size: 80
15319
16295
  }), " 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, {
@@ -15333,10 +16309,10 @@ var News1 = function News1(props) {
15333
16309
  });
15334
16310
  }
15335
16311
  }, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
15336
- className: "rounded-b-lg bg-bgSecondary"
16312
+ className: "rounded-b-lg bg-bgSecondary overflow-y-auto scroll-container max-h-[700px]"
15337
16313
  }, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {
15338
16314
  return /*#__PURE__*/React__default.createElement("div", {
15339
- className: "px-6 py-3 hover:bg-gray-100 hover:text-primary cursor-pointer",
16315
+ className: "px-4 hover:bg-gray-100 hover:text-primary cursor-pointer " + ((item === null || item === void 0 ? void 0 : item.catId) === (categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catId) ? "bg-gray-100 text-primary" : "") + " ",
15340
16316
  key: "sdjfdh-" + index,
15341
16317
  onClick: function onClick() {
15342
16318
  setCategorySelected(item);
@@ -15346,7 +16322,11 @@ var News1 = function News1(props) {
15346
16322
  });
15347
16323
  });
15348
16324
  }
15349
- }, item === null || item === void 0 ? void 0 : item.catName);
16325
+ }, /*#__PURE__*/React__default.createElement("div", {
16326
+ className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
16327
+ }, /*#__PURE__*/React__default.createElement("div", {
16328
+ className: "line-clamp-3"
16329
+ }, item === null || item === void 0 ? void 0 : item.catName)));
15350
16330
  }))));
15351
16331
  };
15352
16332
 
@@ -15395,7 +16375,7 @@ var NewsDetail1 = function NewsDetail1(props) {
15395
16375
  Link = _props$Link === void 0 ? null : _props$Link;
15396
16376
  var _useState = useState({
15397
16377
  catId: catId,
15398
- szie: 10
16378
+ size: 10
15399
16379
  }),
15400
16380
  params = _useState[0],
15401
16381
  setParams = _useState[1];
@@ -15433,10 +16413,10 @@ var NewsDetail1 = function NewsDetail1(props) {
15433
16413
  dangerouslySetInnerHTML: {
15434
16414
  __html: article === null || article === void 0 ? void 0 : article.content
15435
16415
  }
15436
- }), /*#__PURE__*/React__default.createElement("div", {
16416
+ }), (newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
15437
16417
  className: "top-6 block md:hidden"
15438
16418
  }, /*#__PURE__*/React__default.createElement("div", {
15439
- className: "px-6 py-3 bg-primary rounded-t-lg text-lg text-textButton text-center"
16419
+ className: "px-6 bg-primary rounded-t-lg text-lg text-textButton text-center"
15440
16420
  }, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
15441
16421
  className: "rounded-b-lg bg-bgSecondary"
15442
16422
  }, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {
@@ -15444,10 +16424,14 @@ var NewsDetail1 = function NewsDetail1(props) {
15444
16424
  href: getLinkNewsByCategory(item),
15445
16425
  Link: Link
15446
16426
  }, /*#__PURE__*/React__default.createElement("div", {
15447
- className: "px-6 py-3 hover:bg-gray-100 hover:text-primary cursor-pointer",
16427
+ className: "px-4 hover:bg-gray-100 hover:text-primary cursor-pointer",
15448
16428
  key: "sdjfdh-" + index
15449
- }, item === null || item === void 0 ? void 0 : item.catName));
15450
- }))), /*#__PURE__*/React__default.createElement("div", {
16429
+ }, /*#__PURE__*/React__default.createElement("div", {
16430
+ className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
16431
+ }, /*#__PURE__*/React__default.createElement("div", {
16432
+ className: "line-clamp-3"
16433
+ }, item === null || item === void 0 ? void 0 : item.catName))));
16434
+ }))) : null, (newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
15451
16435
  className: "mt-6"
15452
16436
  }, /*#__PURE__*/React__default.createElement("div", {
15453
16437
  className: "font-medium text-2xl mb-4"
@@ -15458,19 +16442,17 @@ var NewsDetail1 = function NewsDetail1(props) {
15458
16442
  href: getLinkNewsDetail(item),
15459
16443
  Link: Link,
15460
16444
  key: "kghf-" + index
15461
- }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(NewsImage, {
15462
- news: item
15463
- }), /*#__PURE__*/React__default.createElement("div", {
15464
- className: "font-medium text-lg line-clamp-2"
15465
- }, item === null || item === void 0 ? void 0 : item.title)));
16445
+ }, /*#__PURE__*/React__default.createElement(NewsItem2, {
16446
+ newsArticle: item
16447
+ }));
15466
16448
  })), (newsArticles === null || newsArticles === void 0 ? void 0 : newsArticles.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement("div", {
15467
16449
  className: "flex justify-center mt-4 w-full"
15468
16450
  }, /*#__PURE__*/React__default.createElement(Button, {
15469
16451
  label: "Xem thêm",
15470
16452
  onClick: handleSeeMore,
15471
16453
  shopConfigStyle: shopConfigStyle
15472
- })) : null)), /*#__PURE__*/React__default.createElement("div", {
15473
- className: "sticky top-20 self-start hidden md:block"
16454
+ })) : null) : null), (newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
16455
+ className: "sticky top-20 self-start hidden md:block overflow-y-auto scroll-container max-h-[700px]"
15474
16456
  }, /*#__PURE__*/React__default.createElement("div", {
15475
16457
  className: "px-6 py-3 bg-primary rounded-t-lg text-lg text-textButton text-center"
15476
16458
  }, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
@@ -15480,11 +16462,15 @@ var NewsDetail1 = function NewsDetail1(props) {
15480
16462
  href: getLinkNewsByCategory(item),
15481
16463
  Link: Link
15482
16464
  }, /*#__PURE__*/React__default.createElement("div", {
15483
- className: "px-6 py-3 hover:bg-gray-100 hover:text-primary cursor-pointer",
16465
+ className: "px-4 hover:bg-gray-100 hover:text-primary cursor-pointer",
15484
16466
  key: "sdjfdh-" + index
15485
- }, item === null || item === void 0 ? void 0 : item.catName));
15486
- }))));
16467
+ }, /*#__PURE__*/React__default.createElement("div", {
16468
+ className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
16469
+ }, /*#__PURE__*/React__default.createElement("div", {
16470
+ className: "line-clamp-3"
16471
+ }, item === null || item === void 0 ? void 0 : item.catName))));
16472
+ }))) : null);
15487
16473
  };
15488
16474
 
15489
- export { About1, About5, About6, Address1, Banner1, Banner2, Banner3, Banner7, BannerFull1, BannerFull2, Booking1, BookingForm6, BookingTable1, Breadcrumb1, Button, Carts1, Contact1, CustomerRating1, CustomerRating10, CustomerRating5, CustomerRating6, CustomerRating8, DateTimePicker, Employees1, Features2, Features3, Footer1, Footer7, Gallery1, Gallery1$1 as Gallery2, Hero1, Hero10, Hero11, Hero12, Hero13, Hero2, Hero5, Hero6, Input, InputPhoneNumber, Links1, ModalNotification, NavBar1, NavBar7, News1, NewsDetail1, NewsHighlight1, PageTitle1, PageTitle2, PageTitle3, Partner1, ProductCategory2, ProductDetail10, ProductDetail11, ProductHighlight1, ProductHot1, ProductHot3, ProductImage, ProductItem2, ProductItem3, ProductItem4, ProductItem5, ProductItem6, ProductItem7, ProductItem8, ProductList5, ProductList7, ProductSale2, ProductSearch1, Products10, Products11, Products12, Products2, Products3, Products9, ProductsTop1, SearchBar2, SearchBar5, SearchBar6, SearchProduct1, SectionTitle1, SectionTitle2, SectionTitle3, SectionTitle4, Select$1 as Select, ServiceDetail1, ShopHighlights2, ShopHighlights5, ShopHighlights6, ShopHighlights7, ShopHighlights8, TextArea, TreatmentDetail1, TreatmentItem1, TreatmentsCategory7, TreatmentsList6, TreatmentsList7, VideoFull1 };
16475
+ export { About1, About5, About6, Address1, Banner1, Banner2, Banner3, Banner4, Banner7, BannerFull1, BannerFull2, Booking1, BookingForm6, BookingTable1, Breadcrumb1, Button, Carts1, Contact1, CustomerRating1, CustomerRating10, CustomerRating5, CustomerRating6, CustomerRating8, CustomerRating9, DateTimePicker, Employees1, Features2, Features3, Footer1, Footer7, Gallery1, Gallery2, Gallery3, Hero1, Hero10, Hero11, Hero12, Hero13, Hero14, Hero15, Hero16, Hero2, Hero5, Hero6, Input, InputPhoneNumber, Links1, ModalNotification, NavBar1, NavBar7, News1, NewsDetail1, NewsHighlight1, PageTitle1, PageTitle2, PageTitle3, Partner1, ProductCategory2, ProductDetail10, ProductDetail11, ProductHighlight1, ProductHot1, ProductHot3, ProductImage, ProductItem10, ProductItem11, ProductItem2, ProductItem3, ProductItem4, ProductItem5, ProductItem6, ProductItem7, ProductItem8, ProductItem9, ProductList5, ProductList7, ProductSale2, ProductSearch1, Products10, Products11, Products12, Products14, Products2, Products3, Products9, ProductsTop1, SearchBar2, SearchBar5, SearchBar6, SearchProduct1, SectionTitle1, SectionTitle2, SectionTitle3, SectionTitle4, SectionTitle5, Select$1 as Select, ServiceDetail1, ShopHighlights10, ShopHighlights2, ShopHighlights5, ShopHighlights6, ShopHighlights7, ShopHighlights8, ShopHighlights9, TextArea, TreatmentDetail1, TreatmentItem1, TreatmentsCategory7, TreatmentsList6, TreatmentsList7, VideoFull1 };
15490
16476
  //# sourceMappingURL=index.modern.js.map