s-platform-landing-section 0.1.11 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -765,15 +765,15 @@ var Input = React.forwardRef(function (props, ref) {
765
765
  for (var _iterator = _createForOfIteratorHelperLoose(rules), _step; !(_step = _iterator()).done;) {
766
766
  var _e$pattern, _e$validate;
767
767
  var e = _step.value;
768
- if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
768
+ if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && (value === '' || value === null)) {
769
769
  _setError(e === null || e === void 0 ? void 0 : e.message);
770
770
  count++;
771
771
  break;
772
- } 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))) {
772
+ } else if (value !== "" && (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))) {
773
773
  _setError(e === null || e === void 0 ? void 0 : e.message);
774
774
  count++;
775
775
  break;
776
- } else if ((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))) {
776
+ } 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))) {
777
777
  _setError(e === null || e === void 0 ? void 0 : e.message);
778
778
  count++;
779
779
  break;
@@ -988,54 +988,7 @@ var Hero10 = function Hero10(props) {
988
988
  })));
989
989
  };
990
990
 
991
- var Dash = function Dash(props) {
992
- var _props$color = props.color,
993
- color = _props$color === void 0 ? "#ccc" : _props$color,
994
- _props$className = props.className,
995
- className = _props$className === void 0 ? "" : _props$className;
996
- return /*#__PURE__*/React__default.createElement("div", {
997
- className: "mx-auto w-full max-w-[240px] md:max-w-[720px] border-b-0 " + className,
998
- style: {
999
- backgroundImage: "repeating-linear-gradient(to right, " + color + " 0, " + color + " 10px, transparent 10px, transparent 20px)",
1000
- height: "1px"
1001
- }
1002
- });
1003
- };
1004
-
1005
- var SECTION_DEFAULT_CLASS = "my-12 mx-4 xl:mx-20 bg-background";
1006
- var SECTION_CLASS = "my-6 md:my-12 px-4 xl:px-20 bg-background";
1007
-
1008
991
  var Hero11 = function Hero11(props) {
1009
- var _data$data;
1010
- var _props$shopConfigStyl = props.shopConfigStyle,
1011
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
1012
- _props$data = props.data,
1013
- data = _props$data === void 0 ? {} : _props$data,
1014
- _props$SectionTitle = props.SectionTitle,
1015
- SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
1016
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
1017
- _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
1018
- secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
1019
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
1020
- className: "" + SECTION_DEFAULT_CLASS
1021
- }, /*#__PURE__*/React__default.createElement(SectionTitle, {
1022
- data: data,
1023
- shopConfigStyle: shopConfigStyle
1024
- }), /*#__PURE__*/React__default.createElement("div", {
1025
- className: "mt-6 grid grid-cols-2 md:grid-cols-4 gap-1 md:gap-2"
1026
- }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
1027
- var _it$srcImages;
1028
- return /*#__PURE__*/React__default.createElement("div", {
1029
- key: index
1030
- }, /*#__PURE__*/React__default.createElement("img", {
1031
- src: it === null || it === void 0 ? void 0 : (_it$srcImages = it.srcImages) === null || _it$srcImages === void 0 ? void 0 : _it$srcImages[0]
1032
- }));
1033
- }))), /*#__PURE__*/React__default.createElement(Dash, {
1034
- color: secondary
1035
- }));
1036
- };
1037
-
1038
- var Hero11$1 = function Hero11(props) {
1039
992
  var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$;
1040
993
  var _props$data = props.data,
1041
994
  data = _props$data === void 0 ? {} : _props$data;
@@ -7334,55 +7287,8 @@ var Hero13 = function Hero13(props) {
7334
7287
  }));
7335
7288
  };
7336
7289
 
7337
- var Features1 = function Features1(props) {
7338
- var _data$data;
7339
- var _props$shopConfigStyl = props.shopConfigStyle,
7340
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
7341
- _props$data = props.data,
7342
- data = _props$data === void 0 ? {} : _props$data,
7343
- _props$SectionTitle = props.SectionTitle,
7344
- SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
7345
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
7346
- _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
7347
- secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
7348
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
7349
- className: SECTION_DEFAULT_CLASS + " relative"
7350
- }, /*#__PURE__*/React__default.createElement(SectionTitle, {
7351
- data: data
7352
- }), /*#__PURE__*/React__default.createElement("div", {
7353
- className: "mt-6 grid grid-cols-3 gap-4 md:gap-8"
7354
- }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
7355
- return /*#__PURE__*/React__default.createElement("div", {
7356
- key: index,
7357
- className: "pt-6 col-span-3 md:col-span-1"
7358
- }, /*#__PURE__*/React__default.createElement("div", {
7359
- className: "relative w-40 h-24 flex items-center justify-center m-auto md:m-0"
7360
- }, /*#__PURE__*/React__default.createElement("div", {
7361
- className: "absolute w-40 h-24 rounded-2xl z-10 bg-primary"
7362
- }), /*#__PURE__*/React__default.createElement("div", {
7363
- className: "absolute w-24 h-16 rounded-2xl -right-2 -top-2 z-0 bg-secondary"
7364
- }), it !== null && it !== void 0 && it.svgImage ? /*#__PURE__*/React__default.createElement("div", {
7365
- className: "w-12 text-primary h-16 w-16 z-20 m-auto"
7366
- }, /*#__PURE__*/React__default.createElement("div", {
7367
- dangerouslySetInnerHTML: {
7368
- __html: configSvg(it === null || it === void 0 ? void 0 : it.svgImage)
7369
- }
7370
- })) : /*#__PURE__*/React__default.createElement("div", {
7371
- className: "h-16 m-auto bg-center w-16 bg-cover bg-no-repeat z-20",
7372
- style: {
7373
- backgroundImage: "url(" + it.srcImage + ")"
7374
- }
7375
- })), /*#__PURE__*/React__default.createElement("p", {
7376
- className: "mx-auto md:mt-3 md:mx-0 text-xl py-2 font-medium w-fit rounded-lg"
7377
- }, it.title), /*#__PURE__*/React__default.createElement("div", {
7378
- className: "mx-auto md:mx-0 mb-2 w-28 h-2px rounded-full bg-secondary"
7379
- }), /*#__PURE__*/React__default.createElement("p", {
7380
- className: "text-base mx-auto md:mx-0 text-center md:text-start"
7381
- }, it.description));
7382
- }))), /*#__PURE__*/React__default.createElement(Dash, {
7383
- color: secondary
7384
- }));
7385
- };
7290
+ var SECTION_DEFAULT_CLASS = "my-12 mx-4 xl:mx-20 bg-background";
7291
+ var SECTION_CLASS = "my-6 md:my-12 px-4 xl:px-20 bg-background";
7386
7292
 
7387
7293
  var Features2 = function Features2(props) {
7388
7294
  var data = props.data;
@@ -7542,7 +7448,7 @@ var ProductController = function ProductController(props) {
7542
7448
  };
7543
7449
  };
7544
7450
 
7545
- var _path, _path2, _path3;
7451
+ var _path;
7546
7452
  function _extends$1() {
7547
7453
  return _extends$1 = Object.assign ? Object.assign.bind() : function (n) {
7548
7454
  for (var e = 1; e < arguments.length; e++) {
@@ -7552,13 +7458,130 @@ function _extends$1() {
7552
7458
  return n;
7553
7459
  }, _extends$1.apply(null, arguments);
7554
7460
  }
7555
- function SvgImageGallery(props) {
7461
+ function SvgAngleSmallLeft(props) {
7556
7462
  return /*#__PURE__*/React.createElement("svg", _extends$1({
7463
+ xmlns: "http://www.w3.org/2000/svg",
7464
+ viewBox: "0 0 24 24",
7465
+ width: 512,
7466
+ height: 512
7467
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
7468
+ d: "M10.6 12.71a1 1 0 010-1.42l4.59-4.58a1 1 0 000-1.42 1 1 0 00-1.41 0L9.19 9.88a3 3 0 000 4.24l4.59 4.59a1 1 0 00.7.29 1 1 0 00.71-.29 1 1 0 000-1.42z"
7469
+ })));
7470
+ }
7471
+
7472
+ var _path$1;
7473
+ function _extends$2() {
7474
+ return _extends$2 = Object.assign ? Object.assign.bind() : function (n) {
7475
+ for (var e = 1; e < arguments.length; e++) {
7476
+ var t = arguments[e];
7477
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
7478
+ }
7479
+ return n;
7480
+ }, _extends$2.apply(null, arguments);
7481
+ }
7482
+ function SvgAngleSmallRight(props) {
7483
+ return /*#__PURE__*/React.createElement("svg", _extends$2({
7484
+ xmlns: "http://www.w3.org/2000/svg",
7485
+ viewBox: "0 0 24 24",
7486
+ width: 512,
7487
+ height: 512
7488
+ }, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
7489
+ d: "M15.4 9.88l-4.59-4.59a1 1 0 00-1.41 0 1 1 0 000 1.42l4.6 4.58a1 1 0 010 1.42l-4.6 4.58a1 1 0 001.41 1.42l4.59-4.59a3 3 0 000-4.24z"
7490
+ })));
7491
+ }
7492
+
7493
+ var ScrollHorizontal = function ScrollHorizontal(props) {
7494
+ var _props$datas = props.datas,
7495
+ datas = _props$datas === void 0 ? [] : _props$datas,
7496
+ _props$className = props.className,
7497
+ className = _props$className === void 0 ? "" : _props$className,
7498
+ _props$style = props.style,
7499
+ style = _props$style === void 0 ? {} : _props$style,
7500
+ _props$renderItem = props.renderItem,
7501
+ renderItem = _props$renderItem === void 0 ? function () {} : _props$renderItem;
7502
+ var scrollContainerRef = React.useRef(null);
7503
+ var _useState = React.useState(true),
7504
+ isScrolledToLeft = _useState[0],
7505
+ setIsScrolledToLeft = _useState[1];
7506
+ var _useState2 = React.useState(false),
7507
+ isScrolledToRight = _useState2[0],
7508
+ setIsScrolledToRight = _useState2[1];
7509
+ var checkScrollPosition = function checkScrollPosition() {
7510
+ if (scrollContainerRef.current) {
7511
+ var _scrollContainerRef$c = scrollContainerRef.current,
7512
+ _scrollLeft = _scrollContainerRef$c.scrollLeft,
7513
+ scrollWidth = _scrollContainerRef$c.scrollWidth,
7514
+ clientWidth = _scrollContainerRef$c.clientWidth;
7515
+ setIsScrolledToLeft(_scrollLeft === 0);
7516
+ setIsScrolledToRight(_scrollLeft + clientWidth >= scrollWidth);
7517
+ }
7518
+ };
7519
+ var scrollLeft = function scrollLeft() {
7520
+ if (scrollContainerRef.current) {
7521
+ scrollContainerRef.current.scrollBy({
7522
+ left: -200,
7523
+ behavior: "smooth"
7524
+ });
7525
+ setTimeout(checkScrollPosition, 300);
7526
+ }
7527
+ };
7528
+ var scrollRight = function scrollRight() {
7529
+ if (scrollContainerRef.current) {
7530
+ scrollContainerRef.current.scrollBy({
7531
+ left: 200,
7532
+ behavior: "smooth"
7533
+ });
7534
+ setTimeout(checkScrollPosition, 300);
7535
+ }
7536
+ };
7537
+ React.useEffect(function () {
7538
+ checkScrollPosition();
7539
+ }, [datas]);
7540
+ return /*#__PURE__*/React__default.createElement("div", {
7541
+ className: "flex " + className,
7542
+ style: style
7543
+ }, /*#__PURE__*/React__default.createElement("div", {
7544
+ className: "flex w-full overflow-x-hidden",
7545
+ ref: scrollContainerRef,
7546
+ onScroll: checkScrollPosition
7547
+ }, datas === null || datas === void 0 ? void 0 : datas.map(function (item, index) {
7548
+ return renderItem(item, index);
7549
+ })), /*#__PURE__*/React__default.createElement("div", {
7550
+ className: "flex gap-2 items-center px-4"
7551
+ }, /*#__PURE__*/React__default.createElement("div", {
7552
+ onClick: scrollLeft,
7553
+ className: "cursor-pointer w-8 h-8 rounded-full flex justify-center items-center " + (isScrolledToLeft ? "bg-gray4" : "bg-primary")
7554
+ }, /*#__PURE__*/React__default.createElement(SvgAngleSmallLeft, {
7555
+ width: 24,
7556
+ height: 24,
7557
+ fill: "#fff"
7558
+ })), /*#__PURE__*/React__default.createElement("div", {
7559
+ onClick: scrollRight,
7560
+ className: "cursor-pointer w-8 h-8 rounded-full flex justify-center items-center " + (isScrolledToRight ? "bg-gray4" : "bg-primary")
7561
+ }, /*#__PURE__*/React__default.createElement(SvgAngleSmallRight, {
7562
+ width: 24,
7563
+ height: 24,
7564
+ fill: "#fff"
7565
+ }))));
7566
+ };
7567
+
7568
+ var _path$2, _path2, _path3;
7569
+ function _extends$3() {
7570
+ return _extends$3 = Object.assign ? Object.assign.bind() : function (n) {
7571
+ for (var e = 1; e < arguments.length; e++) {
7572
+ var t = arguments[e];
7573
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
7574
+ }
7575
+ return n;
7576
+ }, _extends$3.apply(null, arguments);
7577
+ }
7578
+ function SvgImageGallery(props) {
7579
+ return /*#__PURE__*/React.createElement("svg", _extends$3({
7557
7580
  height: 512,
7558
7581
  viewBox: "0 0 24 24",
7559
7582
  width: 512,
7560
7583
  xmlns: "http://www.w3.org/2000/svg"
7561
- }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
7584
+ }, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
7562
7585
  d: "M17.453 24c-.168 0-.34-.021-.51-.066L1.48 19.793a2.018 2.018 0 01-1.414-2.45l1.951-7.272a.5.5 0 01.966.258l-1.95 7.27c-.139.53.179 1.082.71 1.229L17.2 22.967a.995.995 0 001.217-.704l.781-2.894a.499.499 0 11.966.26l-.78 2.89A1.997 1.997 0 0117.453 24z"
7563
7586
  })), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
7564
7587
  d: "M22 18H6c-1.103 0-2-.897-2-2V4c0-1.103.897-2 2-2h16c1.103 0 2 .897 2 2v12c0 1.103-.897 2-2 2zM6 3c-.551 0-1 .449-1 1v12c0 .551.449 1 1 1h16c.551 0 1-.449 1-1V4c0-.551-.449-1-1-1z"
@@ -7611,233 +7634,285 @@ var ProductImage = function ProductImage(props) {
7611
7634
  });
7612
7635
  };
7613
7636
 
7614
- var ModalNotification = function ModalNotification(props) {
7615
- var modalRef = React.useRef(null);
7616
- var onClose = props.onClose,
7617
- onCloseFormBooking = props.onCloseFormBooking,
7618
- _props$isButtonClose = props.isButtonClose,
7619
- isButtonClose = _props$isButtonClose === void 0 ? true : _props$isButtonClose;
7620
- var handleClickOutside = function handleClickOutside(event) {
7621
- if (modalRef.current && !modalRef.current.contains(event.target)) {
7622
- if (onClose) onClose();
7623
- if (onCloseFormBooking && typeof onCloseFormBooking === 'function') {
7624
- onCloseFormBooking();
7625
- }
7626
- }
7627
- };
7628
- React.useEffect(function () {
7629
- document.addEventListener('click', handleClickOutside);
7630
- return function () {
7631
- document.removeEventListener('click', handleClickOutside);
7632
- };
7633
- }, []);
7634
- return /*#__PURE__*/React__default.createElement("div", {
7635
- className: "fixed inset-0 bg-black flex items-center justify-center bg-opacity-50 z-50 "
7636
- }, /*#__PURE__*/React__default.createElement("div", {
7637
- className: " flex items-center justify-center relative bg-red",
7638
- ref: modalRef
7639
- }, props === null || props === void 0 ? void 0 : props.children, isButtonClose && /*#__PURE__*/React__default.createElement("button", {
7640
- className: "absolute top-4 right-4",
7641
- onClick: onClose
7642
- }, /*#__PURE__*/React__default.createElement(rx.RxCross2, null))));
7637
+ var formatCurrency = function formatCurrency(amount) {
7638
+ if (isNaN(amount)) {
7639
+ return '0 ₫';
7640
+ }
7641
+ var roundedAmount = Math.round(amount);
7642
+ var formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
7643
+ return formattedAmount + " \u20AB";
7643
7644
  };
7644
-
7645
- var getEmployeeListApi = function getEmployeeListApi(shopId) {
7646
- return api({
7647
- method: "get",
7648
- url: "/chain-employment-profile/filter-employ-by-customer",
7649
- params: {
7650
- shopIds: shopId
7651
- },
7652
- headers: {
7653
- shopId: shopId
7654
- }
7655
- });
7645
+ var pattern = {
7646
+ phoneNumberPattern: /^(?:\+84|0)\d{9}$/
7656
7647
  };
7648
+ var numberPattern = /^\d+$/;
7657
7649
 
7658
- var EmployeeController = function EmployeeController(props) {
7659
- var _props$isAutoGetList = props.isAutoGetList,
7660
- isAutoGetList = _props$isAutoGetList === void 0 ? true : _props$isAutoGetList,
7661
- shopConfig = props.shopConfig;
7662
- var _useState = React.useState([]),
7663
- listEmployment = _useState[0],
7664
- setListEmployment = _useState[1];
7650
+ function getMinMax(array, field) {
7651
+ if (!(array !== null && array !== void 0 && array.length) || !array[0].hasOwnProperty(field)) {
7652
+ return null;
7653
+ }
7654
+ var _array$reduce = array.reduce(function (acc, obj) {
7655
+ var value = obj[field];
7656
+ return {
7657
+ min: value < acc.min ? value : acc.min,
7658
+ max: value > acc.max ? value : acc.max
7659
+ };
7660
+ }, {
7661
+ min: array[0][field],
7662
+ max: array[0][field]
7663
+ }),
7664
+ min = _array$reduce.min,
7665
+ max = _array$reduce.max;
7666
+ return {
7667
+ min: min,
7668
+ max: max
7669
+ };
7670
+ }
7671
+ var ProductPrice = function ProductPrice(props) {
7672
+ var product = props.product,
7673
+ variant = props.variant,
7674
+ _props$className = props.className,
7675
+ className = _props$className === void 0 ? "" : _props$className,
7676
+ _props$style = props.style,
7677
+ style = _props$style === void 0 ? {} : _props$style;
7678
+ var _useState = React.useState(),
7679
+ displayPrice = _useState[0],
7680
+ setDisplayPrice = _useState[1];
7681
+ var _useState2 = React.useState(),
7682
+ displayPriceBeforeDiscount = _useState2[0],
7683
+ setDisplayPriceBeforeDiscount = _useState2[1];
7665
7684
  React.useEffect(function () {
7666
- if (isAutoGetList) {
7667
- getListEmployee();
7685
+ if (variant) {
7686
+ genProductPrice([variant]);
7687
+ } else if (product) {
7688
+ genProductPrice(product.variants);
7668
7689
  }
7669
- }, [isAutoGetList]);
7670
- var getListEmployee = function getListEmployee() {
7671
- try {
7672
- return Promise.resolve(_catch(function () {
7673
- return Promise.resolve(getEmployeeListApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId)).then(function (res) {
7674
- var _res$data, _res$data$status;
7675
- 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) {
7676
- var _res$data2;
7677
- setListEmployment((res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data) || []);
7678
- }
7679
- return res;
7680
- });
7681
- }, function (e) {
7682
- console.log(e);
7683
- }));
7684
- } catch (e) {
7685
- return Promise.reject(e);
7690
+ }, [product, variant]);
7691
+ var genProductPrice = function genProductPrice(variants) {
7692
+ var mPrice = getMinMax(variants, 'price');
7693
+ var mPriceBeforeDiscount = getMinMax(variants, 'priceBeforeDiscount');
7694
+ if (mPrice && mPriceBeforeDiscount) {
7695
+ var _displayPriceBeforeDiscount = formatCurrency(mPriceBeforeDiscount.min);
7696
+ var _displayPrice = formatCurrency(mPrice.min);
7697
+ if (mPrice.min !== mPrice.max) {
7698
+ _displayPrice += " - " + formatCurrency(mPrice.max);
7699
+ }
7700
+ if (mPriceBeforeDiscount.min !== mPriceBeforeDiscount.max) {
7701
+ _displayPriceBeforeDiscount += " - " + formatCurrency(mPriceBeforeDiscount.max);
7702
+ }
7703
+ setDisplayPrice(_displayPrice);
7704
+ setDisplayPriceBeforeDiscount(_displayPriceBeforeDiscount);
7705
+ } else {
7706
+ var _displayPrice2 = formatCurrency(product === null || product === void 0 ? void 0 : product.price);
7707
+ setDisplayPrice(_displayPrice2);
7686
7708
  }
7687
7709
  };
7688
- return {
7689
- listEmployment: listEmployment,
7690
- getListEmployee: getListEmployee
7691
- };
7710
+ return /*#__PURE__*/React__default.createElement("div", {
7711
+ className: className
7712
+ }, displayPriceBeforeDiscount !== displayPrice && displayPriceBeforeDiscount != null ? /*#__PURE__*/React__default.createElement("span", {
7713
+ className: "text-gray3 line-through mr-2"
7714
+ }, displayPriceBeforeDiscount) : null, /*#__PURE__*/React__default.createElement("span", {
7715
+ className: "text-primary font-semibold",
7716
+ style: style
7717
+ }, displayPrice));
7692
7718
  };
7693
7719
 
7694
- var createSpaScheduleApi = function createSpaScheduleApi(shopId, data) {
7695
- return api({
7696
- method: "post",
7697
- url: "/spa-schedule/customer/create",
7698
- data: data,
7699
- headers: {
7700
- shopId: shopId
7701
- }
7702
- });
7720
+ var ProductItem1 = function ProductItem1(props) {
7721
+ var product = props.product;
7722
+ return /*#__PURE__*/React__default.createElement("div", {
7723
+ className: "flex"
7724
+ }, /*#__PURE__*/React__default.createElement(ProductImage, {
7725
+ product: product,
7726
+ className: "!w-20 rounded-lg"
7727
+ }), /*#__PURE__*/React__default.createElement("div", {
7728
+ className: "ml-4 border-b border-stroke flex-1"
7729
+ }, /*#__PURE__*/React__default.createElement("div", {
7730
+ className: "text-lg"
7731
+ }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement("div", {
7732
+ className: "flex mt-2"
7733
+ }, /*#__PURE__*/React__default.createElement("div", {
7734
+ className: "flex-1 text-gray3"
7735
+ }, getDurationValue(product === null || product === void 0 ? void 0 : product.attributes)), /*#__PURE__*/React__default.createElement(ProductPrice, {
7736
+ product: product
7737
+ }))));
7703
7738
  };
7704
- var draftOrderWithoutLoginApi = function draftOrderWithoutLoginApi(shopId, data) {
7705
- return api({
7706
- method: "post",
7707
- url: "/spa/orders/draft-online-without-login",
7708
- params: {
7709
- shopId: shopId
7710
- },
7711
- data: data,
7712
- headers: {
7713
- shopId: shopId
7739
+
7740
+ var Dash = function Dash(props) {
7741
+ var _props$color = props.color,
7742
+ color = _props$color === void 0 ? "#ccc" : _props$color,
7743
+ _props$className = props.className,
7744
+ className = _props$className === void 0 ? "" : _props$className;
7745
+ return /*#__PURE__*/React__default.createElement("div", {
7746
+ className: "mx-auto w-full max-w-[240px] md:max-w-[720px] border-b-0 " + className,
7747
+ style: {
7748
+ backgroundImage: "repeating-linear-gradient(to right, " + color + " 0, " + color + " 10px, transparent 10px, transparent 20px)",
7749
+ height: "1px"
7714
7750
  }
7715
7751
  });
7716
7752
  };
7717
7753
 
7718
- var _excluded$1 = ["productName"];
7719
- var BookingController = function BookingController(props) {
7720
- _objectDestructuringEmpty(props);
7721
- var createSchedule = function createSchedule(customerName, customerPhone, scheduleDate, services, shopId) {
7722
- try {
7723
- return Promise.resolve(_catch(function () {
7724
- var _Date;
7725
- var data = {
7726
- appId: "SSPA",
7727
- customerName: customerName,
7728
- customerPhone: customerPhone === null || customerPhone === void 0 ? void 0 : customerPhone.replace("+", ""),
7729
- isSellService: true,
7730
- scheduleDate: (_Date = new Date(scheduleDate)) === null || _Date === void 0 ? void 0 : _Date.getTime(),
7731
- services: services === null || services === void 0 ? void 0 : services.map(function (_ref) {
7732
- var productName = _ref.productName,
7733
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
7734
- return rest;
7735
- }),
7736
- shopId: shopId
7737
- };
7738
- return Promise.resolve(createSpaScheduleApi(shopId, data));
7739
- }, function (e) {
7740
- console.log(e);
7741
- }));
7742
- } catch (e) {
7743
- return Promise.reject(e);
7754
+ var Loading = function Loading(props) {
7755
+ var _props$size = props.size,
7756
+ size = _props$size === void 0 ? 24 : _props$size;
7757
+ return /*#__PURE__*/React__default.createElement("div", {
7758
+ className: "border-4 boder-[rgba(255, 255, 255, 0.2)] rounded-full border-t-4 border-t-primary animate-spin",
7759
+ style: {
7760
+ width: size,
7761
+ height: size
7744
7762
  }
7745
- };
7746
- return {
7747
- createSchedule: createSchedule
7748
- };
7763
+ });
7749
7764
  };
7750
7765
 
7751
- var Select = React.forwardRef(function (props, ref) {
7752
- var _props$label = props.label,
7753
- label = _props$label === void 0 ? "" : _props$label,
7754
- _props$labelClassName = props.labelClassName,
7755
- labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
7756
- _props$placeholder = props.placeholder,
7757
- placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
7758
- _props$className = props.className,
7759
- className = _props$className === void 0 ? "" : _props$className,
7760
- _props$optionClassNam = props.optionClassName,
7761
- optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
7762
- _props$wrapClassName = props.wrapClassName,
7763
- wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
7764
- _props$selectClassNam = props.selectClassName,
7765
- selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
7766
- _props$rules = props.rules,
7767
- rules = _props$rules === void 0 ? [] : _props$rules,
7768
- options = props.options,
7769
- _props$defaultValue = props.defaultValue,
7770
- defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
7771
- handleSearchOption = props.handleSearchOption,
7772
- _props$isMulti = props.isMulti,
7773
- isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
7774
- _props$onClick = props.onClick,
7775
- onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
7776
- _props$isButtonDelete = props.isButtonDelete,
7777
- isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
7778
- _props$funcDelete = props.funcDelete,
7779
- funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
7780
- _props$isSearch = props.isSearch,
7781
- isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
7782
- renderItem = props.renderItem;
7783
- var _useState = React.useState(false),
7784
- isOpen = _useState[0],
7785
- setIsOpen = _useState[1];
7786
- var selectRef = React.useRef(null);
7787
- var _useState2 = React.useState(""),
7788
- error = _useState2[0],
7789
- _setError = _useState2[1];
7790
- var _useState3 = React.useState(""),
7791
- inputSearch = _useState3[0],
7792
- setInputSearch = _useState3[1];
7793
- var _useState4 = React.useState(defaultValue),
7794
- value = _useState4[0],
7795
- setValue = _useState4[1];
7796
- var _useState5 = React.useState(options),
7797
- listOptions = _useState5[0],
7798
- setListOptions = _useState5[1];
7799
- var dropdownRef = React.useRef(null);
7800
- var _useState6 = React.useState('bottom'),
7801
- dropdownPosition = _useState6[0],
7802
- setDropdownPosition = _useState6[1];
7803
- var inputRef = React.useRef(null);
7804
- React.useEffect(function () {
7805
- if (isMulti) setValue(defaultValue);
7806
- }, [defaultValue]);
7807
- React.useEffect(function () {
7808
- setListOptions(options);
7809
- if (!isMulti) setValue(defaultValue);
7810
- }, [options]);
7811
- React.useEffect(function () {
7812
- var _inputRef$current;
7813
- inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
7814
- var updateDropdownPosition = function updateDropdownPosition() {
7815
- if (selectRef.current && dropdownRef.current) {
7816
- var _selectRef$current, _window;
7817
- var selectRect = selectRef === null || selectRef === void 0 ? void 0 : (_selectRef$current = selectRef.current) === null || _selectRef$current === void 0 ? void 0 : _selectRef$current.getBoundingClientRect();
7818
- var spaceBelow = ((_window = window) === null || _window === void 0 ? void 0 : _window.innerHeight) - (selectRect === null || selectRect === void 0 ? void 0 : selectRect.bottom);
7819
- var spaceAbove = selectRect === null || selectRect === void 0 ? void 0 : selectRect.top;
7820
- if (spaceBelow < spaceAbove) {
7821
- setDropdownPosition('top');
7822
- } else {
7823
- setDropdownPosition('bottom');
7766
+ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
7767
+ var _props$shopConfigStyl = props.shopConfigStyle,
7768
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
7769
+ _props$data = props.data,
7770
+ data = _props$data === void 0 ? {} : _props$data,
7771
+ _props$SectionTitle = props.SectionTitle,
7772
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
7773
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
7774
+ _shopConfigStyle$colo2 = _shopConfigStyle$colo.secondary,
7775
+ secondary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2;
7776
+ var _useState = React.useState({
7777
+ types: "1"
7778
+ }),
7779
+ params = _useState[0],
7780
+ setParams = _useState[1];
7781
+ var _CategoryController = CategoryController(_extends({}, props, {
7782
+ types: "1"
7783
+ })),
7784
+ categories = _CategoryController.categories;
7785
+ var _ProductController = ProductController(_extends({}, props, {
7786
+ params: params
7787
+ })),
7788
+ _ProductController$pr = _ProductController.products,
7789
+ products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
7790
+ loading = _ProductController.loading;
7791
+ var _useState2 = React.useState(0),
7792
+ selectedCategory = _useState2[0],
7793
+ setSelectedCategory = _useState2[1];
7794
+ React.useEffect(function () {
7795
+ var newParams = _extends({}, params, {
7796
+ categoryId: selectedCategory
7797
+ });
7798
+ if (!selectedCategory) {
7799
+ delete newParams.categoryId;
7800
+ }
7801
+ setParams(newParams);
7802
+ }, [selectedCategory]);
7803
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
7804
+ className: SECTION_DEFAULT_CLASS + " relative"
7805
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
7806
+ data: data,
7807
+ shopConfigStyle: shopConfigStyle
7808
+ }), /*#__PURE__*/React__default.createElement(ScrollHorizontal, {
7809
+ datas: [{
7810
+ categoryId: 0,
7811
+ cateName: "Tất cả"
7812
+ }].concat(categories),
7813
+ className: "mt-6 rounded-lg overflow-hidden bg-bgSecondary",
7814
+ renderItem: function renderItem(item, index) {
7815
+ return /*#__PURE__*/React__default.createElement("div", {
7816
+ key: index,
7817
+ className: "p-3 flex gap-3 shrink-0 cursor-pointer text-base " + (selectedCategory === item.categoryId ? "bg-primary text-textButton" : ""),
7818
+ onClick: function onClick() {
7819
+ return setSelectedCategory(item.categoryId);
7824
7820
  }
7825
- }
7826
- };
7827
- if (isOpen) {
7828
- updateDropdownPosition();
7829
- window.addEventListener('resize', updateDropdownPosition);
7821
+ }, item === null || item === void 0 ? void 0 : item.cateName);
7830
7822
  }
7831
- return function () {
7832
- window.removeEventListener('resize', updateDropdownPosition);
7833
- };
7834
- }, [isOpen]);
7823
+ }), loading ? /*#__PURE__*/React__default.createElement("div", {
7824
+ className: "flex w-full justify-center p-12"
7825
+ }, /*#__PURE__*/React__default.createElement(Loading, null)) : products !== null && products !== void 0 && products.length ? /*#__PURE__*/React__default.createElement("div", {
7826
+ className: "grid grid-cols-1 md:grid-cols-2 gap-10 mt-6"
7827
+ }, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
7828
+ return /*#__PURE__*/React__default.createElement(ProductItem1, {
7829
+ key: index,
7830
+ product: product === null || product === void 0 ? void 0 : product.productInfo
7831
+ });
7832
+ })) : /*#__PURE__*/React__default.createElement("div", {
7833
+ className: "text-gray3 text-center p-12"
7834
+ }, "Kh\xF4ng c\xF3 d\u1ECBch v\u1EE5")), /*#__PURE__*/React__default.createElement(Dash, {
7835
+ color: secondary
7836
+ }));
7837
+ };
7838
+
7839
+ var NotFoundProduct = function NotFoundProduct() {
7840
+ return /*#__PURE__*/React__default.createElement("div", {
7841
+ className: "h-60 flex flex-col justify-center items-center text-xl text-gray3"
7842
+ }, /*#__PURE__*/React__default.createElement(fa.FaBoxOpen, {
7843
+ size: 80
7844
+ }), /*#__PURE__*/React__default.createElement("div", null, "Kh\xF4ng c\xF3 s\u1EA3n ph\u1EA9m"));
7845
+ };
7846
+
7847
+ var TreatmentsList6 = function TreatmentsList6(props) {
7848
+ var _products$slice;
7849
+ var data = props.data,
7850
+ _props$Link = props.Link,
7851
+ Link = _props$Link === void 0 ? null : _props$Link,
7852
+ _props$SectionTitle = props.SectionTitle,
7853
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
7854
+ _props$TreatmentItem = props.TreatmentItem,
7855
+ TreatmentItem = _props$TreatmentItem === void 0 ? null : _props$TreatmentItem,
7856
+ _props$shopConfigStyl = props.shopConfigStyle,
7857
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
7858
+ var _useState = React.useState({
7859
+ size: 12,
7860
+ types: "1"
7861
+ }),
7862
+ params = _useState[0],
7863
+ setParams = _useState[1];
7864
+ var _useState2 = React.useState(true),
7865
+ isGetMore = _useState2[0],
7866
+ setIsGetMore = _useState2[1];
7867
+ var _ProductController = ProductController(_extends({}, props, {
7868
+ params: params
7869
+ })),
7870
+ products = _ProductController.products,
7871
+ loading = _ProductController.loading;
7872
+ var handleGetMoreProducts = function handleGetMoreProducts() {
7873
+ setIsGetMore(false);
7874
+ setParams(function (prev) {
7875
+ return _extends({}, prev, {
7876
+ size: (prev === null || prev === void 0 ? void 0 : prev.size) + 4
7877
+ });
7878
+ });
7879
+ };
7880
+ return /*#__PURE__*/React__default.createElement("div", {
7881
+ className: SECTION_CLASS + " flex flex-col gap-8 "
7882
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
7883
+ data: data,
7884
+ shopConfigStyle: shopConfigStyle
7885
+ }), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
7886
+ className: "m-auto mt-20 min-h-32"
7887
+ }, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
7888
+ 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"
7889
+ }, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, params.size - 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, idx) {
7890
+ return /*#__PURE__*/React__default.createElement(TreatmentItem, {
7891
+ Link: Link,
7892
+ shopConfigStyle: shopConfigStyle,
7893
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
7894
+ key: "htrhr-" + idx
7895
+ });
7896
+ })) : /*#__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, {
7897
+ label: "Xem thêm",
7898
+ onClick: handleGetMoreProducts,
7899
+ className: "mx-auto " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass),
7900
+ type: "outline"
7901
+ }) : null);
7902
+ };
7903
+
7904
+ var ModalNotification = function ModalNotification(props) {
7905
+ var modalRef = React.useRef(null);
7906
+ var onClose = props.onClose,
7907
+ onCloseFormBooking = props.onCloseFormBooking,
7908
+ _props$isButtonClose = props.isButtonClose,
7909
+ isButtonClose = _props$isButtonClose === void 0 ? true : _props$isButtonClose;
7835
7910
  var handleClickOutside = function handleClickOutside(event) {
7836
- var _selectRef$current2;
7837
- 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))) {
7838
- setIsOpen(false);
7839
- setInputSearch("");
7840
- setListOptions(options);
7911
+ if (modalRef.current && !modalRef.current.contains(event.target)) {
7912
+ if (onClose) onClose();
7913
+ if (onCloseFormBooking && typeof onCloseFormBooking === 'function') {
7914
+ onCloseFormBooking();
7915
+ }
7841
7916
  }
7842
7917
  };
7843
7918
  React.useEffect(function () {
@@ -7846,45 +7921,260 @@ var Select = React.forwardRef(function (props, ref) {
7846
7921
  document.removeEventListener('click', handleClickOutside);
7847
7922
  };
7848
7923
  }, []);
7849
- React.useImperativeHandle(ref, function () {
7850
- return {
7851
- validateData: function validateData() {
7852
- return _validateData();
7853
- },
7854
- setError: function setError(err) {
7855
- return _setError(err);
7856
- }
7857
- };
7924
+ return /*#__PURE__*/React__default.createElement("div", {
7925
+ className: "fixed inset-0 bg-black flex items-center justify-center bg-opacity-50 z-50 "
7926
+ }, /*#__PURE__*/React__default.createElement("div", {
7927
+ className: " flex items-center justify-center relative bg-red",
7928
+ ref: modalRef
7929
+ }, props === null || props === void 0 ? void 0 : props.children, isButtonClose && /*#__PURE__*/React__default.createElement("button", {
7930
+ className: "absolute top-4 right-4",
7931
+ onClick: onClose
7932
+ }, /*#__PURE__*/React__default.createElement(rx.RxCross2, null))));
7933
+ };
7934
+
7935
+ var getEmployeeListApi = function getEmployeeListApi(shopId) {
7936
+ return api({
7937
+ method: "get",
7938
+ url: "/chain-employment-profile/filter-employ-by-customer",
7939
+ params: {
7940
+ shopIds: shopId
7941
+ },
7942
+ headers: {
7943
+ shopId: shopId
7944
+ }
7858
7945
  });
7859
- var isEmpty = function isEmpty(value) {
7860
- var _Object$keys;
7861
- if (Array !== null && Array !== void 0 && Array.isArray(value)) return (value === null || value === void 0 ? void 0 : value.length) <= 0;
7862
- 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;
7863
- return false;
7864
- };
7865
- var _validateData = function _validateData() {
7866
- var count = 0;
7867
- for (var _iterator = _createForOfIteratorHelperLoose(rules), _step; !(_step = _iterator()).done;) {
7868
- var _e$pattern;
7869
- var e = _step.value;
7870
- if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && isEmpty(value)) {
7871
- _setError(e === null || e === void 0 ? void 0 : e.message);
7872
- count++;
7873
- break;
7874
- } 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))) {
7875
- _setError(e === null || e === void 0 ? void 0 : e.message);
7876
- count++;
7877
- break;
7878
- }
7946
+ };
7947
+
7948
+ var EmployeeController = function EmployeeController(props) {
7949
+ var _props$isAutoGetList = props.isAutoGetList,
7950
+ isAutoGetList = _props$isAutoGetList === void 0 ? true : _props$isAutoGetList,
7951
+ shopConfig = props.shopConfig;
7952
+ var _useState = React.useState([]),
7953
+ listEmployment = _useState[0],
7954
+ setListEmployment = _useState[1];
7955
+ React.useEffect(function () {
7956
+ if (isAutoGetList) {
7957
+ getListEmployee();
7879
7958
  }
7880
- if (count) {
7881
- return false;
7882
- } else {
7883
- _setError('');
7884
- return true;
7959
+ }, [isAutoGetList]);
7960
+ var getListEmployee = function getListEmployee() {
7961
+ try {
7962
+ return Promise.resolve(_catch(function () {
7963
+ return Promise.resolve(getEmployeeListApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId)).then(function (res) {
7964
+ var _res$data, _res$data$status;
7965
+ 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) {
7966
+ var _res$data2;
7967
+ setListEmployment((res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data) || []);
7968
+ }
7969
+ return res;
7970
+ });
7971
+ }, function (e) {
7972
+ console.log(e);
7973
+ }));
7974
+ } catch (e) {
7975
+ return Promise.reject(e);
7885
7976
  }
7886
7977
  };
7887
- var handleSearch = function handleSearch(e) {
7978
+ return {
7979
+ listEmployment: listEmployment,
7980
+ getListEmployee: getListEmployee
7981
+ };
7982
+ };
7983
+
7984
+ var createSpaScheduleApi = function createSpaScheduleApi(shopId, data) {
7985
+ return api({
7986
+ method: "post",
7987
+ url: "/spa-schedule/customer/create",
7988
+ data: data,
7989
+ headers: {
7990
+ shopId: shopId
7991
+ }
7992
+ });
7993
+ };
7994
+ var draftOrderWithoutLoginApi = function draftOrderWithoutLoginApi(shopId, data) {
7995
+ return api({
7996
+ method: "post",
7997
+ url: "/spa/orders/draft-online-without-login",
7998
+ params: {
7999
+ shopId: shopId
8000
+ },
8001
+ data: data,
8002
+ headers: {
8003
+ shopId: shopId
8004
+ }
8005
+ });
8006
+ };
8007
+
8008
+ var _excluded$1 = ["productName"];
8009
+ var BookingController = function BookingController(props) {
8010
+ _objectDestructuringEmpty(props);
8011
+ var createSchedule = function createSchedule(customerName, customerPhone, scheduleDate, services, shopId) {
8012
+ try {
8013
+ return Promise.resolve(_catch(function () {
8014
+ var _Date;
8015
+ var data = {
8016
+ appId: "SSPA",
8017
+ customerName: customerName,
8018
+ customerPhone: customerPhone === null || customerPhone === void 0 ? void 0 : customerPhone.replace("+", ""),
8019
+ isSellService: true,
8020
+ scheduleDate: (_Date = new Date(scheduleDate)) === null || _Date === void 0 ? void 0 : _Date.getTime(),
8021
+ services: services === null || services === void 0 ? void 0 : services.map(function (_ref) {
8022
+ var productName = _ref.productName,
8023
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
8024
+ return rest;
8025
+ }),
8026
+ shopId: shopId
8027
+ };
8028
+ return Promise.resolve(createSpaScheduleApi(shopId, data));
8029
+ }, function (e) {
8030
+ console.log(e);
8031
+ }));
8032
+ } catch (e) {
8033
+ return Promise.reject(e);
8034
+ }
8035
+ };
8036
+ return {
8037
+ createSchedule: createSchedule
8038
+ };
8039
+ };
8040
+
8041
+ var Select = React.forwardRef(function (props, ref) {
8042
+ var _props$label = props.label,
8043
+ label = _props$label === void 0 ? "" : _props$label,
8044
+ _props$labelClassName = props.labelClassName,
8045
+ labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
8046
+ _props$placeholder = props.placeholder,
8047
+ placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
8048
+ _props$className = props.className,
8049
+ className = _props$className === void 0 ? "" : _props$className,
8050
+ _props$optionClassNam = props.optionClassName,
8051
+ optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
8052
+ _props$wrapClassName = props.wrapClassName,
8053
+ wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
8054
+ _props$selectClassNam = props.selectClassName,
8055
+ selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
8056
+ _props$rules = props.rules,
8057
+ rules = _props$rules === void 0 ? [] : _props$rules,
8058
+ options = props.options,
8059
+ _props$defaultValue = props.defaultValue,
8060
+ defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
8061
+ handleSearchOption = props.handleSearchOption,
8062
+ _props$isMulti = props.isMulti,
8063
+ isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
8064
+ _props$onClick = props.onClick,
8065
+ onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
8066
+ _props$isButtonDelete = props.isButtonDelete,
8067
+ isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
8068
+ _props$funcDelete = props.funcDelete,
8069
+ funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
8070
+ _props$isSearch = props.isSearch,
8071
+ isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
8072
+ renderItem = props.renderItem;
8073
+ var _useState = React.useState(false),
8074
+ isOpen = _useState[0],
8075
+ setIsOpen = _useState[1];
8076
+ var selectRef = React.useRef(null);
8077
+ var _useState2 = React.useState(""),
8078
+ error = _useState2[0],
8079
+ _setError = _useState2[1];
8080
+ var _useState3 = React.useState(""),
8081
+ inputSearch = _useState3[0],
8082
+ setInputSearch = _useState3[1];
8083
+ var _useState4 = React.useState(defaultValue),
8084
+ value = _useState4[0],
8085
+ setValue = _useState4[1];
8086
+ var _useState5 = React.useState(options),
8087
+ listOptions = _useState5[0],
8088
+ setListOptions = _useState5[1];
8089
+ var dropdownRef = React.useRef(null);
8090
+ var _useState6 = React.useState('bottom'),
8091
+ dropdownPosition = _useState6[0],
8092
+ setDropdownPosition = _useState6[1];
8093
+ var inputRef = React.useRef(null);
8094
+ React.useEffect(function () {
8095
+ if (isMulti) setValue(defaultValue);
8096
+ }, [defaultValue]);
8097
+ React.useEffect(function () {
8098
+ setListOptions(options);
8099
+ if (!isMulti) setValue(defaultValue);
8100
+ }, [options]);
8101
+ React.useEffect(function () {
8102
+ var _inputRef$current;
8103
+ inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
8104
+ var updateDropdownPosition = function updateDropdownPosition() {
8105
+ if (selectRef.current && dropdownRef.current) {
8106
+ var _selectRef$current, _window;
8107
+ var selectRect = selectRef === null || selectRef === void 0 ? void 0 : (_selectRef$current = selectRef.current) === null || _selectRef$current === void 0 ? void 0 : _selectRef$current.getBoundingClientRect();
8108
+ var spaceBelow = ((_window = window) === null || _window === void 0 ? void 0 : _window.innerHeight) - (selectRect === null || selectRect === void 0 ? void 0 : selectRect.bottom);
8109
+ var spaceAbove = selectRect === null || selectRect === void 0 ? void 0 : selectRect.top;
8110
+ if (spaceBelow < spaceAbove) {
8111
+ setDropdownPosition('top');
8112
+ } else {
8113
+ setDropdownPosition('bottom');
8114
+ }
8115
+ }
8116
+ };
8117
+ if (isOpen) {
8118
+ updateDropdownPosition();
8119
+ window.addEventListener('resize', updateDropdownPosition);
8120
+ }
8121
+ return function () {
8122
+ window.removeEventListener('resize', updateDropdownPosition);
8123
+ };
8124
+ }, [isOpen]);
8125
+ var handleClickOutside = function handleClickOutside(event) {
8126
+ var _selectRef$current2;
8127
+ 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))) {
8128
+ setIsOpen(false);
8129
+ setInputSearch("");
8130
+ setListOptions(options);
8131
+ }
8132
+ };
8133
+ React.useEffect(function () {
8134
+ document.addEventListener('click', handleClickOutside);
8135
+ return function () {
8136
+ document.removeEventListener('click', handleClickOutside);
8137
+ };
8138
+ }, []);
8139
+ React.useImperativeHandle(ref, function () {
8140
+ return {
8141
+ validateData: function validateData() {
8142
+ return _validateData();
8143
+ },
8144
+ setError: function setError(err) {
8145
+ return _setError(err);
8146
+ }
8147
+ };
8148
+ });
8149
+ var isEmpty = function isEmpty(value) {
8150
+ var _Object$keys;
8151
+ if (Array !== null && Array !== void 0 && Array.isArray(value)) return (value === null || value === void 0 ? void 0 : value.length) <= 0;
8152
+ 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;
8153
+ return false;
8154
+ };
8155
+ var _validateData = function _validateData() {
8156
+ var count = 0;
8157
+ for (var _iterator = _createForOfIteratorHelperLoose(rules), _step; !(_step = _iterator()).done;) {
8158
+ var _e$pattern;
8159
+ var e = _step.value;
8160
+ if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && isEmpty(value)) {
8161
+ _setError(e === null || e === void 0 ? void 0 : e.message);
8162
+ count++;
8163
+ break;
8164
+ } 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))) {
8165
+ _setError(e === null || e === void 0 ? void 0 : e.message);
8166
+ count++;
8167
+ break;
8168
+ }
8169
+ }
8170
+ if (count) {
8171
+ return false;
8172
+ } else {
8173
+ _setError('');
8174
+ return true;
8175
+ }
8176
+ };
8177
+ var handleSearch = function handleSearch(e) {
7888
8178
  var searchValue = e.target.value;
7889
8179
  setInputSearch(searchValue);
7890
8180
  if (handleSearchOption && typeof handleSearchOption === 'function') {
@@ -8165,7 +8455,7 @@ var InputPhoneNumber = React.forwardRef(function (props, ref) {
8165
8455
  _setError(e === null || e === void 0 ? void 0 : e.message);
8166
8456
  count++;
8167
8457
  break;
8168
- } 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))) {
8458
+ } else if (value !== "" && (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))) {
8169
8459
  _setError(e === null || e === void 0 ? void 0 : e.message);
8170
8460
  count++;
8171
8461
  break;
@@ -8190,9 +8480,9 @@ var InputPhoneNumber = React.forwardRef(function (props, ref) {
8190
8480
  }, label ? /*#__PURE__*/React__default.createElement("label", {
8191
8481
  className: "mb-1 " + labelClassName
8192
8482
  }, label, labelRequired) : null, /*#__PURE__*/React__default.createElement("div", {
8193
- className: "flex items-center h-10 rounded-lg border " + className
8483
+ className: "flex items-center h-10 rounded-lg border border-stroke " + className
8194
8484
  }, /*#__PURE__*/React__default.createElement("button", {
8195
- className: "border-r-2 "
8485
+ className: "border-stroke border-r-2 "
8196
8486
  }, /*#__PURE__*/React__default.createElement(Select$1, {
8197
8487
  className: 'w-max border-0 !rounded-none !rounded-l-lg',
8198
8488
  defaultValue: countryCode,
@@ -8228,19 +8518,6 @@ var InputPhoneNumber = React.forwardRef(function (props, ref) {
8228
8518
  }, error) : null);
8229
8519
  });
8230
8520
 
8231
- var formatCurrency = function formatCurrency(amount) {
8232
- if (isNaN(amount)) {
8233
- return '0 ₫';
8234
- }
8235
- var roundedAmount = Math.round(amount);
8236
- var formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
8237
- return formattedAmount + " \u20AB";
8238
- };
8239
- var pattern = {
8240
- phoneNumberPattern: /^(?:\+84|0)\d{9}$/
8241
- };
8242
- var numberPattern = /^\d+$/;
8243
-
8244
8521
  var dayjs_min = createCommonjsModule(function (module, exports) {
8245
8522
  !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}));
8246
8523
  });
@@ -8713,476 +8990,119 @@ var BookingForm = function BookingForm(props) {
8713
8990
  fontSize: "150px"
8714
8991
  }
8715
8992
  })), /*#__PURE__*/React__default.createElement("div", {
8716
- className: "mb-2"
8717
- }, "Kh\xE1ch h\xE0ng: ", dataBooking === null || dataBooking === void 0 ? void 0 : dataBooking.customerName), /*#__PURE__*/React__default.createElement("div", {
8718
- className: "mb-2"
8719
- }, "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i: ", dataBooking === null || dataBooking === void 0 ? void 0 : dataBooking.customerPhone), /*#__PURE__*/React__default.createElement("div", {
8720
- className: "mb-4"
8721
- }, "Th\u1EDDi gian: ", dayjs_min(dataBooking === null || dataBooking === void 0 ? void 0 : dataBooking.scheduleDate).format("DD/MM/YYYY")), token ? /*#__PURE__*/React__default.createElement("div", null) : /*#__PURE__*/React__default.createElement("div", {
8722
- className: "flex flex-col items-center"
8723
- }, /*#__PURE__*/React__default.createElement("p", {
8724
- className: "mb-4 text-center"
8725
- }, "B\u1EA1n \u0111\xE3 c\xF3 t\xE0i kho\u1EA3n, vui l\xF2ng \u0111\u0103ng nh\u1EADp \u0111\u1EC3 xem chi ti\u1EBFt c\xE1c s\u1EA3n ph\u1EA9m, d\u1ECBch v\u1EE5 li\u1EC7u tr\xECnh m\xE0 b\u1EA1n \u0111ang s\u1EDF h\u1EEFu"), /*#__PURE__*/React__default.createElement(Button, {
8726
- label: "Đăng nhập",
8727
- shopConfigStyle: shopConfigStyle
8728
- })))));
8729
- };
8730
-
8731
- var Treatments1 = function Treatments1(props) {
8732
- var _props$shopConfigStyl = props.shopConfigStyle,
8733
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
8734
- _props$shopConfig = props.shopConfig,
8735
- shopConfig = _props$shopConfig === void 0 ? {} : _props$shopConfig,
8736
- _props$data = props.data,
8737
- data = _props$data === void 0 ? {} : _props$data,
8738
- _props$SectionTitle = props.SectionTitle,
8739
- SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
8740
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
8741
- _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
8742
- secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
8743
- var _useState = React.useState({
8744
- size: 10,
8745
- types: "1,10",
8746
- isHighlight: true
8747
- }),
8748
- params = _useState[0];
8749
- var _useState2 = React.useState(false),
8750
- isOpenModal = _useState2[0],
8751
- setIsOpenModal = _useState2[1];
8752
- var _useState3 = React.useState([]),
8753
- dataBooking = _useState3[0],
8754
- setDataBooking = _useState3[1];
8755
- var _ProductController = ProductController(_extends({}, props, {
8756
- params: params
8757
- })),
8758
- _ProductController$pr = _ProductController.products,
8759
- products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
8760
- console.log("treatment1:", products);
8761
- var handleOpenModalBooking = function handleOpenModalBooking(event, data) {
8762
- try {
8763
- var _data$productInfo, _data$productInfo2;
8764
- event.stopPropagation();
8765
- setDataBooking([_extends({}, data, {
8766
- quantity: 1,
8767
- technical: {},
8768
- oldService: false,
8769
- label: data === null || data === void 0 ? void 0 : (_data$productInfo = data.productInfo) === null || _data$productInfo === void 0 ? void 0 : _data$productInfo.productName,
8770
- value: data === null || data === void 0 ? void 0 : (_data$productInfo2 = data.productInfo) === null || _data$productInfo2 === void 0 ? void 0 : _data$productInfo2.productId
8771
- })]);
8772
- setIsOpenModal(true);
8773
- } catch (error) {
8774
- console.log("::::::::::errrorrrrr::::::", error);
8775
- }
8776
- };
8777
- var handleCloseModal = function handleCloseModal() {
8778
- setIsOpenModal(false);
8779
- setDataBooking([]);
8780
- };
8781
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
8782
- className: "" + SECTION_DEFAULT_CLASS
8783
- }, /*#__PURE__*/React__default.createElement(SectionTitle, {
8784
- data: data,
8785
- shopConfigStyle: shopConfigStyle
8786
- }), products === null || products === void 0 ? void 0 : products.map(function (product, index) {
8787
- var _product$productInfo, _product$productInfo2;
8788
- return /*#__PURE__*/React__default.createElement("div", {
8789
- className: "grid grid-cols-1 md:grid-cols-2 gap-6 mt-12",
8790
- key: "rthirr-" + index
8791
- }, /*#__PURE__*/React__default.createElement("div", {
8792
- className: "block " + (index % 2 ? "md:hidden" : "")
8793
- }, /*#__PURE__*/React__default.createElement(ProductImage, {
8794
- product: product === null || product === void 0 ? void 0 : product.productInfo,
8795
- className: "aspect-video rounded-2xl"
8796
- })), /*#__PURE__*/React__default.createElement("div", {
8797
- className: "text-left " + (index % 2 ? "md:text-right" : "")
8798
- }, /*#__PURE__*/React__default.createElement("div", {
8799
- className: "font-medium text-2xl"
8800
- }, 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", {
8801
- className: "mt-4 text-textBody",
8802
- dangerouslySetInnerHTML: {
8803
- __html: product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.description
8804
- }
8805
- }), /*#__PURE__*/React__default.createElement(Button, {
8806
- label: "Đặt lịch ngay",
8807
- shopConfigStyle: shopConfigStyle,
8808
- className: "mt-4",
8809
- onClick: function onClick(event) {
8810
- handleOpenModalBooking(event, product);
8811
- }
8812
- })), /*#__PURE__*/React__default.createElement("div", {
8813
- className: "hidden " + (index % 2 ? "md:block" : "")
8814
- }, /*#__PURE__*/React__default.createElement(ProductImage, {
8815
- product: product === null || product === void 0 ? void 0 : product.productInfo,
8816
- className: "aspect-video rounded-2xl"
8817
- })));
8818
- })), /*#__PURE__*/React__default.createElement(Dash, {
8819
- color: secondary
8820
- }), isOpenModal ? /*#__PURE__*/React__default.createElement(ModalNotification, {
8821
- onClose: handleCloseModal
8822
- }, /*#__PURE__*/React__default.createElement(BookingForm, {
8823
- className: "overflow-y-auto hide-scrollbar max-h-[80vh] !bg-bgSecondary",
8824
- onCloseFormBooking: handleCloseModal,
8825
- defaultValue: dataBooking,
8826
- shopConfig: shopConfig,
8827
- shopConfigStyle: shopConfigStyle
8828
- })) : null);
8829
- };
8830
-
8831
- var _path$1;
8832
- function _extends$2() {
8833
- return _extends$2 = Object.assign ? Object.assign.bind() : function (n) {
8834
- for (var e = 1; e < arguments.length; e++) {
8835
- var t = arguments[e];
8836
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
8837
- }
8838
- return n;
8839
- }, _extends$2.apply(null, arguments);
8840
- }
8841
- function SvgAngleSmallLeft(props) {
8842
- return /*#__PURE__*/React.createElement("svg", _extends$2({
8843
- xmlns: "http://www.w3.org/2000/svg",
8844
- viewBox: "0 0 24 24",
8845
- width: 512,
8846
- height: 512
8847
- }, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
8848
- d: "M10.6 12.71a1 1 0 010-1.42l4.59-4.58a1 1 0 000-1.42 1 1 0 00-1.41 0L9.19 9.88a3 3 0 000 4.24l4.59 4.59a1 1 0 00.7.29 1 1 0 00.71-.29 1 1 0 000-1.42z"
8849
- })));
8850
- }
8851
-
8852
- var _path$2;
8853
- function _extends$3() {
8854
- return _extends$3 = Object.assign ? Object.assign.bind() : function (n) {
8855
- for (var e = 1; e < arguments.length; e++) {
8856
- var t = arguments[e];
8857
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
8858
- }
8859
- return n;
8860
- }, _extends$3.apply(null, arguments);
8861
- }
8862
- function SvgAngleSmallRight(props) {
8863
- return /*#__PURE__*/React.createElement("svg", _extends$3({
8864
- xmlns: "http://www.w3.org/2000/svg",
8865
- viewBox: "0 0 24 24",
8866
- width: 512,
8867
- height: 512
8868
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
8869
- d: "M15.4 9.88l-4.59-4.59a1 1 0 00-1.41 0 1 1 0 000 1.42l4.6 4.58a1 1 0 010 1.42l-4.6 4.58a1 1 0 001.41 1.42l4.59-4.59a3 3 0 000-4.24z"
8870
- })));
8871
- }
8872
-
8873
- var ScrollHorizontal = function ScrollHorizontal(props) {
8874
- var _props$datas = props.datas,
8875
- datas = _props$datas === void 0 ? [] : _props$datas,
8876
- _props$className = props.className,
8877
- className = _props$className === void 0 ? "" : _props$className,
8878
- _props$style = props.style,
8879
- style = _props$style === void 0 ? {} : _props$style,
8880
- _props$renderItem = props.renderItem,
8881
- renderItem = _props$renderItem === void 0 ? function () {} : _props$renderItem;
8882
- var scrollContainerRef = React.useRef(null);
8883
- var _useState = React.useState(true),
8884
- isScrolledToLeft = _useState[0],
8885
- setIsScrolledToLeft = _useState[1];
8886
- var _useState2 = React.useState(false),
8887
- isScrolledToRight = _useState2[0],
8888
- setIsScrolledToRight = _useState2[1];
8889
- var checkScrollPosition = function checkScrollPosition() {
8890
- if (scrollContainerRef.current) {
8891
- var _scrollContainerRef$c = scrollContainerRef.current,
8892
- _scrollLeft = _scrollContainerRef$c.scrollLeft,
8893
- scrollWidth = _scrollContainerRef$c.scrollWidth,
8894
- clientWidth = _scrollContainerRef$c.clientWidth;
8895
- setIsScrolledToLeft(_scrollLeft === 0);
8896
- setIsScrolledToRight(_scrollLeft + clientWidth >= scrollWidth);
8897
- }
8898
- };
8899
- var scrollLeft = function scrollLeft() {
8900
- if (scrollContainerRef.current) {
8901
- scrollContainerRef.current.scrollBy({
8902
- left: -200,
8903
- behavior: "smooth"
8904
- });
8905
- setTimeout(checkScrollPosition, 300);
8906
- }
8907
- };
8908
- var scrollRight = function scrollRight() {
8909
- if (scrollContainerRef.current) {
8910
- scrollContainerRef.current.scrollBy({
8911
- left: 200,
8912
- behavior: "smooth"
8913
- });
8914
- setTimeout(checkScrollPosition, 300);
8915
- }
8916
- };
8917
- React.useEffect(function () {
8918
- checkScrollPosition();
8919
- }, [datas]);
8920
- return /*#__PURE__*/React__default.createElement("div", {
8921
- className: "flex " + className,
8922
- style: style
8923
- }, /*#__PURE__*/React__default.createElement("div", {
8924
- className: "flex w-full overflow-x-hidden",
8925
- ref: scrollContainerRef,
8926
- onScroll: checkScrollPosition
8927
- }, datas === null || datas === void 0 ? void 0 : datas.map(function (item, index) {
8928
- return renderItem(item, index);
8929
- })), /*#__PURE__*/React__default.createElement("div", {
8930
- className: "flex gap-2 items-center px-4"
8931
- }, /*#__PURE__*/React__default.createElement("div", {
8932
- onClick: scrollLeft,
8933
- className: "cursor-pointer w-8 h-8 rounded-full flex justify-center items-center " + (isScrolledToLeft ? "bg-gray4" : "bg-primary")
8934
- }, /*#__PURE__*/React__default.createElement(SvgAngleSmallLeft, {
8935
- width: 24,
8936
- height: 24,
8937
- fill: "#fff"
8938
- })), /*#__PURE__*/React__default.createElement("div", {
8939
- onClick: scrollRight,
8940
- className: "cursor-pointer w-8 h-8 rounded-full flex justify-center items-center " + (isScrolledToRight ? "bg-gray4" : "bg-primary")
8941
- }, /*#__PURE__*/React__default.createElement(SvgAngleSmallRight, {
8942
- width: 24,
8943
- height: 24,
8944
- fill: "#fff"
8945
- }))));
8946
- };
8947
-
8948
- function getMinMax(array, field) {
8949
- if (!(array !== null && array !== void 0 && array.length) || !array[0].hasOwnProperty(field)) {
8950
- return null;
8951
- }
8952
- var _array$reduce = array.reduce(function (acc, obj) {
8953
- var value = obj[field];
8954
- return {
8955
- min: value < acc.min ? value : acc.min,
8956
- max: value > acc.max ? value : acc.max
8957
- };
8958
- }, {
8959
- min: array[0][field],
8960
- max: array[0][field]
8961
- }),
8962
- min = _array$reduce.min,
8963
- max = _array$reduce.max;
8964
- return {
8965
- min: min,
8966
- max: max
8967
- };
8968
- }
8969
- var ProductPrice = function ProductPrice(props) {
8970
- var product = props.product,
8971
- variant = props.variant,
8972
- _props$className = props.className,
8973
- className = _props$className === void 0 ? "" : _props$className,
8974
- _props$style = props.style,
8975
- style = _props$style === void 0 ? {} : _props$style;
8976
- var _useState = React.useState(),
8977
- displayPrice = _useState[0],
8978
- setDisplayPrice = _useState[1];
8979
- var _useState2 = React.useState(),
8980
- displayPriceBeforeDiscount = _useState2[0],
8981
- setDisplayPriceBeforeDiscount = _useState2[1];
8982
- React.useEffect(function () {
8983
- if (variant) {
8984
- genProductPrice([variant]);
8985
- } else if (product) {
8986
- genProductPrice(product.variants);
8987
- }
8988
- }, [product, variant]);
8989
- var genProductPrice = function genProductPrice(variants) {
8990
- var mPrice = getMinMax(variants, 'price');
8991
- var mPriceBeforeDiscount = getMinMax(variants, 'priceBeforeDiscount');
8992
- if (mPrice && mPriceBeforeDiscount) {
8993
- var _displayPriceBeforeDiscount = formatCurrency(mPriceBeforeDiscount.min);
8994
- var _displayPrice = formatCurrency(mPrice.min);
8995
- if (mPrice.min !== mPrice.max) {
8996
- _displayPrice += " - " + formatCurrency(mPrice.max);
8997
- }
8998
- if (mPriceBeforeDiscount.min !== mPriceBeforeDiscount.max) {
8999
- _displayPriceBeforeDiscount += " - " + formatCurrency(mPriceBeforeDiscount.max);
9000
- }
9001
- setDisplayPrice(_displayPrice);
9002
- setDisplayPriceBeforeDiscount(_displayPriceBeforeDiscount);
9003
- } else {
9004
- var _displayPrice2 = formatCurrency(product === null || product === void 0 ? void 0 : product.price);
9005
- setDisplayPrice(_displayPrice2);
9006
- }
9007
- };
9008
- return /*#__PURE__*/React__default.createElement("div", {
9009
- className: className
9010
- }, displayPriceBeforeDiscount !== displayPrice && displayPriceBeforeDiscount != null ? /*#__PURE__*/React__default.createElement("span", {
9011
- className: "text-gray3 line-through mr-2"
9012
- }, displayPriceBeforeDiscount) : null, /*#__PURE__*/React__default.createElement("span", {
9013
- className: "text-primary font-semibold",
9014
- style: style
9015
- }, displayPrice));
9016
- };
9017
-
9018
- var ProductItem1 = function ProductItem1(props) {
9019
- var product = props.product;
9020
- return /*#__PURE__*/React__default.createElement("div", {
9021
- className: "flex"
9022
- }, /*#__PURE__*/React__default.createElement(ProductImage, {
9023
- product: product,
9024
- className: "!w-20 rounded-lg"
9025
- }), /*#__PURE__*/React__default.createElement("div", {
9026
- className: "ml-4 border-b border-stroke flex-1"
9027
- }, /*#__PURE__*/React__default.createElement("div", {
9028
- className: "text-lg"
9029
- }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement("div", {
9030
- className: "flex mt-2"
9031
- }, /*#__PURE__*/React__default.createElement("div", {
9032
- className: "flex-1 text-gray3"
9033
- }, getDurationValue(product === null || product === void 0 ? void 0 : product.attributes)), /*#__PURE__*/React__default.createElement(ProductPrice, {
9034
- product: product
9035
- }))));
9036
- };
9037
-
9038
- var Loading = function Loading(props) {
9039
- var _props$size = props.size,
9040
- size = _props$size === void 0 ? 24 : _props$size;
9041
- return /*#__PURE__*/React__default.createElement("div", {
9042
- className: "border-4 boder-[rgba(255, 255, 255, 0.2)] rounded-full border-t-4 border-t-primary animate-spin",
9043
- style: {
9044
- width: size,
9045
- height: size
9046
- }
9047
- });
9048
- };
9049
-
9050
- var Treatments1$1 = function Treatments1(props) {
9051
- var _props$shopConfigStyl = props.shopConfigStyle,
9052
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
9053
- _props$data = props.data,
9054
- data = _props$data === void 0 ? {} : _props$data,
9055
- _props$SectionTitle = props.SectionTitle,
9056
- SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
9057
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
9058
- _shopConfigStyle$colo2 = _shopConfigStyle$colo.secondary,
9059
- secondary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2;
9060
- var _useState = React.useState({
9061
- types: "1"
9062
- }),
9063
- params = _useState[0],
9064
- setParams = _useState[1];
9065
- var _CategoryController = CategoryController(_extends({}, props, {
9066
- types: "1"
9067
- })),
9068
- categories = _CategoryController.categories;
9069
- var _ProductController = ProductController(_extends({}, props, {
9070
- params: params
9071
- })),
9072
- _ProductController$pr = _ProductController.products,
9073
- products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
9074
- loading = _ProductController.loading;
9075
- var _useState2 = React.useState(0),
9076
- selectedCategory = _useState2[0],
9077
- setSelectedCategory = _useState2[1];
9078
- React.useEffect(function () {
9079
- var newParams = _extends({}, params, {
9080
- categoryId: selectedCategory
9081
- });
9082
- if (!selectedCategory) {
9083
- delete newParams.categoryId;
9084
- }
9085
- setParams(newParams);
9086
- }, [selectedCategory]);
9087
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
9088
- className: SECTION_DEFAULT_CLASS + " relative"
9089
- }, /*#__PURE__*/React__default.createElement(SectionTitle, {
9090
- data: data,
9091
- shopConfigStyle: shopConfigStyle
9092
- }), /*#__PURE__*/React__default.createElement(ScrollHorizontal, {
9093
- datas: [{
9094
- categoryId: 0,
9095
- cateName: "Tất cả"
9096
- }].concat(categories),
9097
- className: "mt-6 rounded-lg overflow-hidden bg-bgSecondary",
9098
- renderItem: function renderItem(item, index) {
9099
- return /*#__PURE__*/React__default.createElement("div", {
9100
- key: index,
9101
- className: "p-3 flex gap-3 shrink-0 cursor-pointer text-base " + (selectedCategory === item.categoryId ? "bg-primary text-textButton" : ""),
9102
- onClick: function onClick() {
9103
- return setSelectedCategory(item.categoryId);
9104
- }
9105
- }, item === null || item === void 0 ? void 0 : item.cateName);
9106
- }
9107
- }), loading ? /*#__PURE__*/React__default.createElement("div", {
9108
- className: "flex w-full justify-center p-12"
9109
- }, /*#__PURE__*/React__default.createElement(Loading, null)) : products !== null && products !== void 0 && products.length ? /*#__PURE__*/React__default.createElement("div", {
9110
- className: "grid grid-cols-1 md:grid-cols-2 gap-10 mt-6"
9111
- }, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
9112
- return /*#__PURE__*/React__default.createElement(ProductItem1, {
9113
- key: index,
9114
- product: product === null || product === void 0 ? void 0 : product.productInfo
9115
- });
9116
- })) : /*#__PURE__*/React__default.createElement("div", {
9117
- className: "text-gray3 text-center p-12"
9118
- }, "Kh\xF4ng c\xF3 d\u1ECBch v\u1EE5")), /*#__PURE__*/React__default.createElement(Dash, {
9119
- color: secondary
9120
- }));
9121
- };
9122
-
9123
- var NotFoundProduct = function NotFoundProduct() {
9124
- return /*#__PURE__*/React__default.createElement("div", {
9125
- className: "h-60 flex flex-col justify-center items-center text-xl text-gray3"
9126
- }, /*#__PURE__*/React__default.createElement(fa.FaBoxOpen, {
9127
- size: 80
9128
- }), /*#__PURE__*/React__default.createElement("div", null, "Kh\xF4ng c\xF3 s\u1EA3n ph\u1EA9m"));
8993
+ className: "mb-2"
8994
+ }, "Kh\xE1ch h\xE0ng: ", dataBooking === null || dataBooking === void 0 ? void 0 : dataBooking.customerName), /*#__PURE__*/React__default.createElement("div", {
8995
+ className: "mb-2"
8996
+ }, "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i: ", dataBooking === null || dataBooking === void 0 ? void 0 : dataBooking.customerPhone), /*#__PURE__*/React__default.createElement("div", {
8997
+ className: "mb-4"
8998
+ }, "Th\u1EDDi gian: ", dayjs_min(dataBooking === null || dataBooking === void 0 ? void 0 : dataBooking.scheduleDate).format("DD/MM/YYYY")), token ? /*#__PURE__*/React__default.createElement("div", null) : /*#__PURE__*/React__default.createElement("div", {
8999
+ className: "flex flex-col items-center"
9000
+ }, /*#__PURE__*/React__default.createElement("p", {
9001
+ className: "mb-4 text-center"
9002
+ }, "B\u1EA1n \u0111\xE3 c\xF3 t\xE0i kho\u1EA3n, vui l\xF2ng \u0111\u0103ng nh\u1EADp \u0111\u1EC3 xem chi ti\u1EBFt c\xE1c s\u1EA3n ph\u1EA9m, d\u1ECBch v\u1EE5 li\u1EC7u tr\xECnh m\xE0 b\u1EA1n \u0111ang s\u1EDF h\u1EEFu"), /*#__PURE__*/React__default.createElement(Button, {
9003
+ label: "Đăng nhập",
9004
+ shopConfigStyle: shopConfigStyle
9005
+ })))));
9129
9006
  };
9130
9007
 
9131
- var TreatmentsList6 = function TreatmentsList6(props) {
9132
- var _products$slice;
9133
- var data = props.data,
9134
- _props$Link = props.Link,
9135
- Link = _props$Link === void 0 ? null : _props$Link,
9008
+ var TreatmentsList7 = function TreatmentsList7(props) {
9009
+ var _props$shopConfigStyl = props.shopConfigStyle,
9010
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
9011
+ _props$shopConfig = props.shopConfig,
9012
+ shopConfig = _props$shopConfig === void 0 ? {} : _props$shopConfig,
9013
+ _props$data = props.data,
9014
+ data = _props$data === void 0 ? {} : _props$data,
9136
9015
  _props$SectionTitle = props.SectionTitle,
9137
- SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
9138
- _props$TreatmentItem = props.TreatmentItem,
9139
- TreatmentItem = _props$TreatmentItem === void 0 ? null : _props$TreatmentItem,
9140
- _props$shopConfigStyl = props.shopConfigStyle,
9141
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
9016
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
9017
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
9018
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
9019
+ secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
9142
9020
  var _useState = React.useState({
9143
- size: 12,
9144
- types: "1"
9021
+ size: 10,
9022
+ types: "1,10",
9023
+ isHighlight: true
9145
9024
  }),
9146
- params = _useState[0],
9147
- setParams = _useState[1];
9148
- var _useState2 = React.useState(true),
9149
- isGetMore = _useState2[0],
9150
- setIsGetMore = _useState2[1];
9025
+ params = _useState[0];
9026
+ var _useState2 = React.useState(false),
9027
+ isOpenModal = _useState2[0],
9028
+ setIsOpenModal = _useState2[1];
9029
+ var _useState3 = React.useState([]),
9030
+ dataBooking = _useState3[0],
9031
+ setDataBooking = _useState3[1];
9151
9032
  var _ProductController = ProductController(_extends({}, props, {
9152
9033
  params: params
9153
9034
  })),
9154
- products = _ProductController.products,
9155
- loading = _ProductController.loading;
9156
- var handleGetMoreProducts = function handleGetMoreProducts() {
9157
- setIsGetMore(false);
9158
- setParams(function (prev) {
9159
- return _extends({}, prev, {
9160
- size: (prev === null || prev === void 0 ? void 0 : prev.size) + 4
9161
- });
9162
- });
9035
+ _ProductController$pr = _ProductController.products,
9036
+ products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
9037
+ console.log("treatment1:", products);
9038
+ var handleOpenModalBooking = function handleOpenModalBooking(event, data) {
9039
+ try {
9040
+ var _data$productInfo, _data$productInfo2;
9041
+ event.stopPropagation();
9042
+ setDataBooking([_extends({}, data, {
9043
+ quantity: 1,
9044
+ technical: {},
9045
+ oldService: false,
9046
+ label: data === null || data === void 0 ? void 0 : (_data$productInfo = data.productInfo) === null || _data$productInfo === void 0 ? void 0 : _data$productInfo.productName,
9047
+ value: data === null || data === void 0 ? void 0 : (_data$productInfo2 = data.productInfo) === null || _data$productInfo2 === void 0 ? void 0 : _data$productInfo2.productId
9048
+ })]);
9049
+ setIsOpenModal(true);
9050
+ } catch (error) {
9051
+ console.log("::::::::::errrorrrrr::::::", error);
9052
+ }
9163
9053
  };
9164
- return /*#__PURE__*/React__default.createElement("div", {
9165
- className: SECTION_CLASS + " flex flex-col gap-8 "
9054
+ var handleCloseModal = function handleCloseModal() {
9055
+ setIsOpenModal(false);
9056
+ setDataBooking([]);
9057
+ };
9058
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
9059
+ className: "" + SECTION_DEFAULT_CLASS
9166
9060
  }, /*#__PURE__*/React__default.createElement(SectionTitle, {
9167
9061
  data: data,
9168
9062
  shopConfigStyle: shopConfigStyle
9169
- }), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
9170
- className: "m-auto mt-20 min-h-32"
9171
- }, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
9172
- 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"
9173
- }, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, params.size - 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, idx) {
9174
- return /*#__PURE__*/React__default.createElement(TreatmentItem, {
9175
- Link: Link,
9063
+ }), products === null || products === void 0 ? void 0 : products.map(function (product, index) {
9064
+ var _product$productInfo, _product$productInfo2;
9065
+ return /*#__PURE__*/React__default.createElement("div", {
9066
+ className: "grid grid-cols-1 md:grid-cols-2 gap-6 mt-12",
9067
+ key: "rthirr-" + index
9068
+ }, /*#__PURE__*/React__default.createElement("div", {
9069
+ className: "block " + (index % 2 ? "md:hidden" : "")
9070
+ }, /*#__PURE__*/React__default.createElement(ProductImage, {
9071
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
9072
+ className: "aspect-video rounded-2xl"
9073
+ })), /*#__PURE__*/React__default.createElement("div", {
9074
+ className: "text-left " + (index % 2 ? "md:text-right" : "")
9075
+ }, /*#__PURE__*/React__default.createElement("div", {
9076
+ className: "font-medium text-2xl"
9077
+ }, 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", {
9078
+ className: "mt-4 text-textBody",
9079
+ dangerouslySetInnerHTML: {
9080
+ __html: product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.description
9081
+ }
9082
+ }), /*#__PURE__*/React__default.createElement(Button, {
9083
+ label: "Đặt lịch ngay",
9176
9084
  shopConfigStyle: shopConfigStyle,
9085
+ className: "mt-4",
9086
+ onClick: function onClick(event) {
9087
+ handleOpenModalBooking(event, product);
9088
+ }
9089
+ })), /*#__PURE__*/React__default.createElement("div", {
9090
+ className: "hidden " + (index % 2 ? "md:block" : "")
9091
+ }, /*#__PURE__*/React__default.createElement(ProductImage, {
9177
9092
  product: product === null || product === void 0 ? void 0 : product.productInfo,
9178
- key: "htrhr-" + idx
9179
- });
9180
- })) : /*#__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, {
9181
- label: "Xem thêm",
9182
- onClick: handleGetMoreProducts,
9183
- className: "mx-auto " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass),
9184
- type: "outline"
9185
- }) : null);
9093
+ className: "aspect-video rounded-2xl"
9094
+ })));
9095
+ })), /*#__PURE__*/React__default.createElement(Dash, {
9096
+ color: secondary
9097
+ }), isOpenModal ? /*#__PURE__*/React__default.createElement(ModalNotification, {
9098
+ onClose: handleCloseModal
9099
+ }, /*#__PURE__*/React__default.createElement(BookingForm, {
9100
+ className: "overflow-y-auto hide-scrollbar max-h-[80vh] !bg-bgSecondary",
9101
+ onCloseFormBooking: handleCloseModal,
9102
+ defaultValue: dataBooking,
9103
+ shopConfig: shopConfig,
9104
+ shopConfigStyle: shopConfigStyle
9105
+ })) : null);
9186
9106
  };
9187
9107
 
9188
9108
  var ProductDetailController = function ProductDetailController(props) {
@@ -9418,6 +9338,7 @@ var ProductItem2 = function ProductItem2(props) {
9418
9338
  Link = _props$Link === void 0 ? null : _props$Link,
9419
9339
  _props$className = props.className,
9420
9340
  className = _props$className === void 0 ? "" : _props$className;
9341
+ console.log("checkkkkkkkk:::::::", className);
9421
9342
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
9422
9343
  Link: Link,
9423
9344
  href: getLinkProductDetail(product)
@@ -9444,12 +9365,12 @@ var ProductItem3 = function ProductItem3(props) {
9444
9365
  Link: Link,
9445
9366
  href: getLinkProductDetail(product)
9446
9367
  }, /*#__PURE__*/React__default.createElement("div", {
9447
- className: "w-full border rounded-2xl " + className
9368
+ className: "w-full border border-stroke rounded-2xl " + className
9448
9369
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
9449
9370
  product: product,
9450
9371
  className: "w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-t-2xl"
9451
9372
  }), /*#__PURE__*/React__default.createElement("div", {
9452
- className: "p-4 flex flex-col gap-4 justify-start"
9373
+ className: "p-4 flex flex-col gap-4 items-start"
9453
9374
  }, /*#__PURE__*/React__default.createElement("div", {
9454
9375
  className: "line-clamp-1"
9455
9376
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -9470,15 +9391,15 @@ var ProductItem4 = function ProductItem4(props) {
9470
9391
  Link: Link,
9471
9392
  href: getLinkProductDetail(product)
9472
9393
  }, /*#__PURE__*/React__default.createElement("div", {
9473
- className: "w-full border flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
9394
+ 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
9474
9395
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
9475
9396
  product: product,
9476
9397
  className: "w-full h-44 sm:h-56 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
9477
9398
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
9478
- className: "line-clamp-1"
9399
+ className: "text-start line-clamp-1"
9479
9400
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
9480
9401
  product: product,
9481
- className: "text-lg text-start"
9402
+ className: "text-lg text-start mt-2"
9482
9403
  })), /*#__PURE__*/React__default.createElement("div", {
9483
9404
  className: "flex pt-4 gap-2 md:gap-4 border-t items-center"
9484
9405
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -9509,7 +9430,7 @@ var ProductItem5 = function ProductItem5(props) {
9509
9430
  product: product,
9510
9431
  className: "w-full w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
9511
9432
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
9512
- className: "line-clamp-1 mb-2"
9433
+ className: "text-start line-clamp-1 mb-2"
9513
9434
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
9514
9435
  product: product,
9515
9436
  className: "text-lg text-start"
@@ -9536,12 +9457,12 @@ var ProductItem6 = function ProductItem6(props) {
9536
9457
  Link: Link,
9537
9458
  href: getLinkProductDetail(product)
9538
9459
  }, /*#__PURE__*/React__default.createElement("div", {
9539
- className: "w-full border flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
9460
+ 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
9540
9461
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
9541
9462
  product: product,
9542
9463
  className: "w-full h-44 sm:h-56 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
9543
9464
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
9544
- className: "line-clamp-1"
9465
+ className: "text start line-clamp-1"
9545
9466
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
9546
9467
  product: product,
9547
9468
  className: "text-lg text-start"
@@ -9556,6 +9477,32 @@ var ProductItem6 = function ProductItem6(props) {
9556
9477
  }))));
9557
9478
  };
9558
9479
 
9480
+ var ProductItem7 = function ProductItem7(props) {
9481
+ var product = props.product,
9482
+ _props$Link = props.Link,
9483
+ Link = _props$Link === void 0 ? null : _props$Link,
9484
+ _props$className = props.className,
9485
+ className = _props$className === void 0 ? "" : _props$className;
9486
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
9487
+ Link: Link,
9488
+ href: getLinkProductDetail(product)
9489
+ }, /*#__PURE__*/React__default.createElement("div", {
9490
+ className: "w-full bg-bgSecondary relative rounded-2xl " + className
9491
+ }, /*#__PURE__*/React__default.createElement(ProductImage, {
9492
+ product: product,
9493
+ className: "w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-t-2xl"
9494
+ }), /*#__PURE__*/React__default.createElement("div", {
9495
+ className: "p-4 flex flex-col gap-4 items-start"
9496
+ }, /*#__PURE__*/React__default.createElement("div", {
9497
+ className: "line-clamp-1"
9498
+ }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
9499
+ product: product,
9500
+ className: "text-lg text-start"
9501
+ })), 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", {
9502
+ className: "absolute top-5 left-0 font-semibold px-3 py-1 bg-danger text-textButton rounded-r-2xl shadow-lg v-max"
9503
+ }, 1 - 100 * (product === null || product === void 0 ? void 0 : product.price) / (product === null || product === void 0 ? void 0 : product.priceBeforeDiscount)) : null));
9504
+ };
9505
+
9559
9506
  var TreatmentItem1 = function TreatmentItem1(props) {
9560
9507
  var product = props.product,
9561
9508
  _props$Link = props.Link,
@@ -9586,7 +9533,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
9586
9533
  }))));
9587
9534
  };
9588
9535
 
9589
- var Products1 = function Products1(props) {
9536
+ var ProductsList7 = function ProductsList7(props) {
9590
9537
  var _props$shopConfigStyl = props.shopConfigStyle,
9591
9538
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
9592
9539
  _props$data = props.data,
@@ -9737,13 +9684,12 @@ var Products2 = function Products2(props) {
9737
9684
  primaryColor: primary,
9738
9685
  renderItem: function renderItem(item, index) {
9739
9686
  return /*#__PURE__*/React__default.createElement("div", {
9740
- key: "carousel-" + index,
9741
- className: "flex-shrink-0 w-[calc(50%-2px)] md:w-[calc(34%-16px)] lg:w-[calc(25%-12px)] xl:w-[calc(25%-19px)]"
9687
+ className: "border-0 flex-shrink-0 w-[calc(50%-2px)] md:w-[calc(34%-16px)] lg:w-[calc(25%-12px)] xl:w-[calc(25%-19px)]"
9742
9688
  }, /*#__PURE__*/React__default.createElement(ProductItem, {
9743
9689
  product: item.productInfo,
9690
+ key: "carousel-" + index,
9744
9691
  Link: Link,
9745
- shopConfigStyle: shopConfigStyle,
9746
- className: "border-0 bg-bgSecondary"
9692
+ shopConfigStyle: shopConfigStyle
9747
9693
  }));
9748
9694
  }
9749
9695
  })));
@@ -10281,7 +10227,7 @@ var ProductsTop1 = function ProductsTop1(props) {
10281
10227
  }, products === null || products === void 0 ? void 0 : products.map(function (product, idx) {
10282
10228
  return /*#__PURE__*/React__default.createElement(ProductItem, {
10283
10229
  Link: Link,
10284
- className: "bg-bgSecondary border-0",
10230
+ className: "border-0",
10285
10231
  shopConfigStyle: shopConfigStyle,
10286
10232
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10287
10233
  key: "htrhr-" + idx
@@ -10402,7 +10348,9 @@ var ProductHighlight1 = function ProductHighlight1(props) {
10402
10348
  var ProductDetail10 = function ProductDetail10(props) {
10403
10349
  var _product$images;
10404
10350
  var shopConfigStyle = props.shopConfigStyle,
10405
- shopConfig = props.shopConfig;
10351
+ shopConfig = props.shopConfig,
10352
+ _props$handleRedirect = props.handleRedirect,
10353
+ handleRedirect = _props$handleRedirect === void 0 ? function () {} : _props$handleRedirect;
10406
10354
  var _ProductDetailControl = ProductDetailController(props),
10407
10355
  product = _ProductDetailControl.product;
10408
10356
  var _useState = React.useState(),
@@ -10491,7 +10439,22 @@ var ProductDetail10 = function ProductDetail10(props) {
10491
10439
  return Promise.reject(e);
10492
10440
  }
10493
10441
  };
10494
- var buyNow = function buyNow() {};
10442
+ var buyNow = function buyNow() {
10443
+ try {
10444
+ var _temp2 = function () {
10445
+ if (validateData()) {
10446
+ var _refInputQuantity$cur3;
10447
+ var quantity = refInputQuantity === null || refInputQuantity === void 0 ? void 0 : (_refInputQuantity$cur3 = refInputQuantity.current) === null || _refInputQuantity$cur3 === void 0 ? void 0 : _refInputQuantity$cur3.getValue();
10448
+ return Promise.resolve(addProductToCart(product, variant, quantity)).then(function () {
10449
+ handleRedirect("/carts");
10450
+ });
10451
+ }
10452
+ }();
10453
+ return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
10454
+ } catch (e) {
10455
+ return Promise.reject(e);
10456
+ }
10457
+ };
10495
10458
  var handleDisplayImage = function handleDisplayImage(item) {
10496
10459
  setDisplayImage(item);
10497
10460
  };
@@ -10706,6 +10669,36 @@ var Banner3 = function Banner3(props) {
10706
10669
  }));
10707
10670
  };
10708
10671
 
10672
+ var Banner7 = function Banner7(props) {
10673
+ var _data$data;
10674
+ var _props$shopConfigStyl = props.shopConfigStyle,
10675
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
10676
+ _props$data = props.data,
10677
+ data = _props$data === void 0 ? {} : _props$data,
10678
+ _props$SectionTitle = props.SectionTitle,
10679
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
10680
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
10681
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
10682
+ secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
10683
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
10684
+ className: "" + SECTION_DEFAULT_CLASS
10685
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
10686
+ data: data,
10687
+ shopConfigStyle: shopConfigStyle
10688
+ }), /*#__PURE__*/React__default.createElement("div", {
10689
+ className: "mt-6 grid grid-cols-2 md:grid-cols-4 gap-1 md:gap-2"
10690
+ }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
10691
+ var _it$srcImages;
10692
+ return /*#__PURE__*/React__default.createElement("div", {
10693
+ key: index
10694
+ }, /*#__PURE__*/React__default.createElement("img", {
10695
+ src: it === null || it === void 0 ? void 0 : (_it$srcImages = it.srcImages) === null || _it$srcImages === void 0 ? void 0 : _it$srcImages[0]
10696
+ }));
10697
+ }))), /*#__PURE__*/React__default.createElement(Dash, {
10698
+ color: secondary
10699
+ }));
10700
+ };
10701
+
10709
10702
  var BannerFull1 = function BannerFull1(props) {
10710
10703
  var data = props.data;
10711
10704
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
@@ -12707,11 +12700,62 @@ var ShopHighlights6 = function ShopHighlights6(props) {
12707
12700
  }));
12708
12701
  };
12709
12702
 
12703
+ var ShopHighlights7 = function ShopHighlights7(props) {
12704
+ var _data$data;
12705
+ var _props$shopConfigStyl = props.shopConfigStyle,
12706
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
12707
+ _props$data = props.data,
12708
+ data = _props$data === void 0 ? {} : _props$data,
12709
+ _props$SectionTitle = props.SectionTitle,
12710
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
12711
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
12712
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
12713
+ secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
12714
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
12715
+ className: SECTION_DEFAULT_CLASS + " relative"
12716
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
12717
+ data: data
12718
+ }), /*#__PURE__*/React__default.createElement("div", {
12719
+ className: "mt-6 grid grid-cols-3 gap-4 md:gap-8"
12720
+ }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
12721
+ return /*#__PURE__*/React__default.createElement("div", {
12722
+ key: index,
12723
+ className: "pt-6 col-span-3 md:col-span-1"
12724
+ }, /*#__PURE__*/React__default.createElement("div", {
12725
+ className: "relative w-40 h-24 flex items-center justify-center m-auto md:m-0"
12726
+ }, /*#__PURE__*/React__default.createElement("div", {
12727
+ className: "absolute w-40 h-24 rounded-2xl z-10 bg-primary"
12728
+ }), /*#__PURE__*/React__default.createElement("div", {
12729
+ className: "absolute w-24 h-16 rounded-2xl -right-2 -top-2 z-0 bg-secondary"
12730
+ }), it !== null && it !== void 0 && it.svgImage ? /*#__PURE__*/React__default.createElement("div", {
12731
+ className: "w-12 text-primary h-16 w-16 z-20 m-auto"
12732
+ }, /*#__PURE__*/React__default.createElement("div", {
12733
+ dangerouslySetInnerHTML: {
12734
+ __html: configSvg(it === null || it === void 0 ? void 0 : it.svgImage)
12735
+ }
12736
+ })) : /*#__PURE__*/React__default.createElement("div", {
12737
+ className: "h-16 m-auto bg-center w-16 bg-cover bg-no-repeat z-20",
12738
+ style: {
12739
+ backgroundImage: "url(" + it.srcImage + ")"
12740
+ }
12741
+ })), /*#__PURE__*/React__default.createElement("p", {
12742
+ className: "mx-auto md:mt-3 md:mx-0 text-xl py-2 font-medium w-fit rounded-lg"
12743
+ }, it.title), /*#__PURE__*/React__default.createElement("div", {
12744
+ className: "mx-auto md:mx-0 mb-2 w-28 h-2px rounded-full bg-secondary"
12745
+ }), /*#__PURE__*/React__default.createElement("p", {
12746
+ className: "text-base mx-auto md:mx-0 text-center md:text-start"
12747
+ }, it.description));
12748
+ }))), /*#__PURE__*/React__default.createElement(Dash, {
12749
+ color: secondary
12750
+ }));
12751
+ };
12752
+
12710
12753
  exports.About1 = About1;
12711
12754
  exports.About5 = About5;
12712
12755
  exports.Address1 = Address1;
12713
12756
  exports.Banner1 = Banner1;
12714
12757
  exports.Banner3 = Banner3;
12758
+ exports.Banner7 = Banner7;
12715
12759
  exports.BannerFull1 = BannerFull1;
12716
12760
  exports.BannerFull2 = BannerFull2;
12717
12761
  exports.Booking1 = Booking1;
@@ -12726,7 +12770,6 @@ exports.CustomerRating5 = CustomerRating5;
12726
12770
  exports.CustomerRating6 = CustomerRating6;
12727
12771
  exports.DateTimePicker = DateTimePicker;
12728
12772
  exports.Employees1 = Employees1;
12729
- exports.Features1 = Features1;
12730
12773
  exports.Features2 = Features2;
12731
12774
  exports.Features3 = Features3;
12732
12775
  exports.Footer1 = Footer1;
@@ -12734,8 +12777,7 @@ exports.Footer7 = Footer7;
12734
12777
  exports.Gallery1 = Gallery1;
12735
12778
  exports.Hero1 = Hero1;
12736
12779
  exports.Hero10 = Hero10;
12737
- exports.Hero11 = Hero11;
12738
- exports.Hero12 = Hero11$1;
12780
+ exports.Hero12 = Hero11;
12739
12781
  exports.Hero13 = Hero13;
12740
12782
  exports.Hero2 = Hero2;
12741
12783
  exports.Hero5 = Hero5;
@@ -12758,13 +12800,14 @@ exports.ProductItem3 = ProductItem3;
12758
12800
  exports.ProductItem4 = ProductItem4;
12759
12801
  exports.ProductItem5 = ProductItem5;
12760
12802
  exports.ProductItem6 = ProductItem6;
12803
+ exports.ProductItem7 = ProductItem7;
12761
12804
  exports.ProductList5 = ProductList5;
12762
12805
  exports.ProductSale2 = ProductSale2;
12763
12806
  exports.ProductSearch1 = ProductSearch1;
12764
- exports.Products1 = Products1;
12765
12807
  exports.Products10 = Products10;
12766
12808
  exports.Products2 = Products2;
12767
12809
  exports.Products3 = Products3;
12810
+ exports.ProductsList7 = ProductsList7;
12768
12811
  exports.ProductsTop1 = ProductsTop1;
12769
12812
  exports.SearchBar2 = SearchBar2;
12770
12813
  exports.SearchBar5 = SearchBar5;
@@ -12778,10 +12821,11 @@ exports.ServiceDetail1 = ServiceDetail1;
12778
12821
  exports.ShopHighlights2 = ShopHighlights2;
12779
12822
  exports.ShopHighlights5 = ShopHighlights5;
12780
12823
  exports.ShopHighlights6 = ShopHighlights6;
12824
+ exports.ShopHighlights7 = ShopHighlights7;
12781
12825
  exports.TextArea = TextArea;
12782
12826
  exports.TreatmentDetail1 = TreatmentDetail1;
12783
12827
  exports.TreatmentItem1 = TreatmentItem1;
12784
- exports.Treatments1 = Treatments1;
12785
- exports.Treatments2 = Treatments1$1;
12828
+ exports.TreatmentsCategory7 = TreatmentsCategory7;
12786
12829
  exports.TreatmentsList6 = TreatmentsList6;
12830
+ exports.TreatmentsList7 = TreatmentsList7;
12787
12831
  //# sourceMappingURL=index.js.map