s-platform-landing-section 0.1.9 → 0.1.10-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,11 @@
1
- import React__default, { useState, useEffect, useRef, createElement, forwardRef, useImperativeHandle } from 'react';
2
- import { useSelector } from 'react-redux';
3
- import { FaPhone, FaChevronLeft, FaChevronRight, FaArrowLeft, FaArrowRight as FaArrowRight$1, FaFacebookSquare, FaFacebookMessenger } from 'react-icons/fa';
4
- import { IoLocationOutline } from 'react-icons/io5';
1
+ import React__default, { useRef, useState, useEffect, createElement, forwardRef, useImperativeHandle } from 'react';
2
+ import { IoCartOutline, IoLocationOutline } from 'react-icons/io5';
3
+ import { FaUserCircle, FaPhone, FaChevronLeft, FaChevronRight, FaArrowLeft, FaArrowRight as FaArrowRight$1, FaFacebookSquare, FaFacebookMessenger } from 'react-icons/fa';
4
+ import { FiMenu } from 'react-icons/fi';
5
+ import { RxCross2 } from 'react-icons/rx';
5
6
  import { PiHandbagSimpleLight } from 'react-icons/pi';
6
7
  import { CiSearch } from 'react-icons/ci';
7
8
  import { BsFilterLeft, BsCurrencyDollar } from 'react-icons/bs';
8
- import { FiMenu } from 'react-icons/fi';
9
- import { RxCross2 } from 'react-icons/rx';
10
9
  import DatePicker from 'react-datepicker';
11
10
  import 'react-datepicker/dist/react-datepicker.css';
12
11
  import { FaArrowsRotate, FaStar, FaRegStarHalfStroke, FaRegStar } from 'react-icons/fa6';
@@ -15,16 +14,197 @@ import 'react-icons/io';
15
14
  import { SiVisa, SiZalo } from 'react-icons/si';
16
15
  import { GoCreditCard } from 'react-icons/go';
17
16
 
18
- var SvgIcon = function SvgIcon(_ref) {
19
- var className = _ref.className,
20
- style = _ref.style;
17
+ const Button = props => {
18
+ var _shopConfigStyle$colo;
19
+ const {
20
+ label = "",
21
+ className = "",
22
+ style = {},
23
+ shopConfigStyle = {},
24
+ onClick = () => {}
25
+ } = props;
26
+ const _className = `text-white font-medium rounded-lg text-sm px-4 py-2.5 ${(shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass) || ""} ${className}`;
27
+ const _style = {
28
+ backgroundColor: shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : (_shopConfigStyle$colo = shopConfigStyle.color) === null || _shopConfigStyle$colo === void 0 ? void 0 : _shopConfigStyle$colo.primary,
29
+ ...style
30
+ };
31
+ return /*#__PURE__*/React__default.createElement("button", {
32
+ type: "button",
33
+ className: _className,
34
+ style: _style,
35
+ onClick: onClick
36
+ }, label);
37
+ };
38
+
39
+ const NavBar7 = props => {
40
+ const listRef = useRef(null);
41
+ const [isOpen, setIsOpen] = useState(false);
42
+ const {
43
+ shopConfig = {},
44
+ shopConfigStyle,
45
+ data,
46
+ routes = [],
47
+ section = {},
48
+ userInfo = null,
49
+ cartItems = [],
50
+ navToLogin = () => {},
51
+ navToRegister = () => {}
52
+ } = props;
53
+ const {
54
+ primary = "#000",
55
+ textHeading = "#000",
56
+ textBody = "#000",
57
+ background = "#fff",
58
+ bgSecondary = "#fff",
59
+ textButton = "#fff"
60
+ } = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
61
+ let totalItem = cartItems.reduce((total, item) => total + item.quantity, 0);
62
+ if (totalItem > 9) {
63
+ totalItem = "9+";
64
+ }
65
+ const cart = () => {
66
+ return /*#__PURE__*/React__default.createElement("div", {
67
+ className: "flex"
68
+ }, /*#__PURE__*/React__default.createElement("div", {
69
+ className: "relative cursor-pointer"
70
+ }, /*#__PURE__*/React__default.createElement(IoCartOutline, {
71
+ style: {
72
+ fontSize: "30px",
73
+ color: primary
74
+ }
75
+ }), totalItem ? /*#__PURE__*/React__default.createElement("small", {
76
+ className: "absolute aspect-square flex items-center bg-danger px-[2px] text-xs rounded-full",
77
+ style: {
78
+ color: textButton,
79
+ top: 0,
80
+ right: 0
81
+ }
82
+ }, totalItem) : null));
83
+ };
84
+ return /*#__PURE__*/React__default.createElement("div", {
85
+ className: "w-full sticky top-0 shadow z-50",
86
+ style: {
87
+ background: background
88
+ }
89
+ }, /*#__PURE__*/React__default.createElement("div", {
90
+ className: "hidden lg:flex gap-6 justify-between items-center py-2 px-4 xl:px-20",
91
+ style: {
92
+ color: textBody
93
+ }
94
+ }, /*#__PURE__*/React__default.createElement("a", {
95
+ href: "/",
96
+ className: "flex items-center gap-2"
97
+ }, /*#__PURE__*/React__default.createElement("img", {
98
+ className: "object-cover w-12 h-12",
99
+ src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
100
+ alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName
101
+ }), /*#__PURE__*/React__default.createElement("h3", {
102
+ className: "text-xl md:text-2xl whitespace-nowrap font-semibold",
103
+ style: {
104
+ color: primary
105
+ }
106
+ }, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName)), /*#__PURE__*/React__default.createElement("div", {
107
+ className: "hidden lg:flex flex-1 items-center gap-4"
108
+ }, routes === null || routes === void 0 ? void 0 : routes.map((route, index) => /*#__PURE__*/React__default.createElement("a", {
109
+ href: route === null || route === void 0 ? void 0 : route.route
110
+ }, (section === null || section === void 0 ? void 0 : section.pageRoute) === (route === null || route === void 0 ? void 0 : route.name) ? /*#__PURE__*/React__default.createElement("div", {
111
+ className: `py-1 border-b`,
112
+ style: {
113
+ color: textHeading,
114
+ borderColor: textHeading
115
+ }
116
+ }, route === null || route === void 0 ? void 0 : route.label) : /*#__PURE__*/React__default.createElement("div", {
117
+ className: `py-1`
118
+ }, route === null || route === void 0 ? void 0 : route.label)))), cart(), !userInfo ?
119
+ /*#__PURE__*/
120
+ React__default.createElement("div", {
121
+ className: "flex justify-center"
122
+ }, /*#__PURE__*/React__default.createElement(FaUserCircle, {
123
+ color: "#fff",
124
+ size: 48
125
+ }), /*#__PURE__*/React__default.createElement("div", {
126
+ className: "flex flex-col ml-2"
127
+ }, /*#__PURE__*/React__default.createElement("label", null, "Xin ch\xE0o!"), /*#__PURE__*/React__default.createElement("label", {
128
+ className: "font-semibold"
129
+ }, userInfo === null || userInfo === void 0 ? void 0 : userInfo.name, "Nguyen Thanh Tung"))) :
130
+ /*#__PURE__*/
131
+ React__default.createElement("div", {
132
+ className: "flex gap-2"
133
+ }, /*#__PURE__*/React__default.createElement(Button, {
134
+ label: "Đăng nhập",
135
+ shopConfigStyle: shopConfigStyle,
136
+ onClick: () => navToLogin()
137
+ }), /*#__PURE__*/React__default.createElement(Button, {
138
+ label: "Đăng ký",
139
+ shopConfigStyle: shopConfigStyle,
140
+ style: {
141
+ backgroundColor: "transparent",
142
+ borderColor: primary,
143
+ color: primary
144
+ },
145
+ className: "border",
146
+ onClick: () => navToRegister()
147
+ }))), /*#__PURE__*/React__default.createElement("div", {
148
+ className: "relative lg:hidden flex gap-4 items-center px-4 py-2"
149
+ }, /*#__PURE__*/React__default.createElement("a", {
150
+ href: "/",
151
+ className: "flex flex-1 gap-2 items-center"
152
+ }, /*#__PURE__*/React__default.createElement("img", {
153
+ className: "object-cover w-12 h-12",
154
+ src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
155
+ alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName
156
+ }), /*#__PURE__*/React__default.createElement("h3", {
157
+ className: "text-xl md:text-2xl font-semibold",
158
+ style: {
159
+ color: primary
160
+ }
161
+ }, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName)), /*#__PURE__*/React__default.createElement("button", {
162
+ type: "button",
163
+ onClick: () => {
164
+ setIsOpen(true);
165
+ }
166
+ }, /*#__PURE__*/React__default.createElement(FiMenu, {
167
+ size: 32,
168
+ color: primary
169
+ })), isOpen ? /*#__PURE__*/React__default.createElement("div", {
170
+ className: "absolute bg-[rgba(0,0,0,0.5)] h-screen w-full top-0 left-0 z-50 flex justify-end",
171
+ onClick: () => {
172
+ setIsOpen(false);
173
+ }
174
+ }, /*#__PURE__*/React__default.createElement("div", {
175
+ className: "h-full w-[80vw] max-w-[320px] p-4",
176
+ style: {
177
+ background: bgSecondary
178
+ },
179
+ onClick: event => event.stopPropagation()
180
+ }, /*#__PURE__*/React__default.createElement("button", {
181
+ className: "flex w-full justify-end text-gray4",
182
+ onClick: () => {
183
+ setIsOpen(false);
184
+ }
185
+ }, /*#__PURE__*/React__default.createElement(RxCross2, {
186
+ size: 24
187
+ })), /*#__PURE__*/React__default.createElement("div", null, routes === null || routes === void 0 ? void 0 : routes.map((route, index) => /*#__PURE__*/React__default.createElement("a", {
188
+ href: route === null || route === void 0 ? void 0 : route.route
189
+ }, /*#__PURE__*/React__default.createElement("div", {
190
+ className: `py-2`,
191
+ style: (section === null || section === void 0 ? void 0 : section.pageRoute) === (route === null || route === void 0 ? void 0 : route.name) ? {
192
+ color: textHeading
193
+ } : null
194
+ }, route === null || route === void 0 ? void 0 : route.label)))))) : null, cart()));
195
+ };
196
+
197
+ const SvgIcon = ({
198
+ className,
199
+ style
200
+ }) => {
21
201
  return /*#__PURE__*/React__default.createElement("svg", {
22
202
  width: "42",
23
203
  height: "42",
24
204
  viewBox: "0 0 42 42",
25
205
  fill: "none",
26
206
  xmlns: "http://www.w3.org/2000/svg",
27
- className: "" + className,
207
+ className: `${className}`,
28
208
  style: style
29
209
  }, /*#__PURE__*/React__default.createElement("path", {
30
210
  d: "M21.0006 3C18.7312 3 15.091 6.90509 14.572 11.5982C10.1417 10.0788 5.15787 11.9531 4.22675 14.0991C3.22704 16.4034 5.59115 22.0699 10.1707 24.1839C10.2897 24.2388 10.417 24.2778 10.5387 24.3279C10.4967 24.3782 10.4491 24.4219 10.408 24.4731C7.21527 28.4646 7.53641 34.625 9.42347 36.2318C10.0159 36.7357 11.0046 37 12.183 37C14.7586 36.9993 18.2373 35.7431 20.4297 33.0032C20.6374 32.7437 20.8279 32.4797 21.0019 32.2141C21.181 32.4887 21.3716 32.7533 21.5728 33.0045C23.7645 35.7431 27.2401 37 29.817 37C30.9954 37 31.9853 36.7363 32.5778 36.2331C34.4648 34.625 34.7847 28.4646 31.592 24.4744C31.5521 24.4247 31.5092 24.3829 31.4689 24.3344C31.5897 24.2846 31.713 24.2382 31.8305 24.1839C36.4094 22.0699 38.7729 16.4027 37.7732 14.0991C36.8378 11.9444 31.8174 10.0959 27.4267 11.5916C26.9098 6.86354 23.2507 3 21.0006 3ZM21.0006 4.34011C22.3907 4.34011 25.8805 7.69855 26.1694 12.136C24.0016 13.2466 22.6195 14.9602 21.838 16.2414C21.647 16.5543 21.7382 16.9684 22.0422 17.1654C22.3462 17.3624 22.747 17.2689 22.938 16.9547C23.9669 15.2668 25.4278 13.9249 27.0524 13.1751C31.2559 11.2333 35.9724 13.2276 36.5882 14.6461C37.204 16.0646 35.503 21.0198 31.2989 22.9603C31.0314 23.084 30.7493 23.1895 30.4628 23.2861C29.0772 22.0357 27.5654 21.3484 26.4308 20.9855C26.0865 20.8769 25.7234 21.074 25.6175 21.4278C25.511 21.7809 25.7034 22.1555 26.0463 22.2654C27.3306 22.6761 29.1619 23.542 30.5897 25.3277C33.5213 28.9902 32.9127 34.2083 31.7505 35.1979C30.5884 36.1856 25.5067 35.8138 22.5738 32.15C22.2616 31.7601 21.9827 31.3316 21.7339 30.8805C22.3864 29.478 22.6678 28.11 22.7756 27.0657C22.8132 26.6978 22.5556 26.3684 22.1983 26.3289C21.8449 26.2893 21.5223 26.5558 21.484 26.9243C21.3404 28.3147 20.8663 30.3502 19.4261 32.15C16.4945 35.8138 11.4115 36.1883 10.2507 35.1979C9.08856 34.2089 8.4787 28.9903 11.4103 25.3264C11.5663 25.1318 11.737 24.9533 11.9064 24.7754C12.7322 24.9798 13.5911 25.0961 14.4667 25.0961C15.1448 25.0961 15.8317 25.0343 16.5119 24.9076C16.8652 24.842 17.0995 24.4928 17.0358 24.1289C16.9722 23.7644 16.6343 23.5201 16.2822 23.5871C14.3412 23.9476 12.3588 23.7248 10.7011 22.959C6.49758 21.0185 4.7972 16.0633 5.41301 14.6448C5.98748 13.3195 10.4467 11.3878 14.5174 12.9985C14.5864 15.5355 15.5457 17.5709 16.3634 18.8444C16.4881 19.0394 16.6947 19.1441 16.9052 19.1441C17.0286 19.1441 17.1538 19.1079 17.2642 19.0329C17.5637 18.8285 17.645 18.4132 17.4469 18.105C16.6973 16.9371 15.8039 15.0529 15.8039 12.7158C15.8039 7.9651 19.4936 4.34011 21.0006 4.34011Z",
@@ -37,25 +217,23 @@ var SvgIcon = function SvgIcon(_ref) {
37
217
  fill: "currentColor"
38
218
  }));
39
219
  };
40
- var SectionTitle1 = function SectionTitle1(props) {
41
- var _props$shopConfigStyl = props.shopConfigStyle,
42
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
43
- _props$data = props.data,
44
- data = _props$data === void 0 ? {} : _props$data;
45
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
46
- _shopConfigStyle$colo2 = _shopConfigStyle$colo.textHeading,
47
- textHeading = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
48
- _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
49
- secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
50
- _shopConfigStyle$colo4 = _shopConfigStyle$colo.textSecondary,
51
- textSecondary = _shopConfigStyle$colo4 === void 0 ? "#000" : _shopConfigStyle$colo4;
220
+ const SectionTitle1 = props => {
221
+ const {
222
+ shopConfigStyle = {},
223
+ data = {}
224
+ } = props;
225
+ const {
226
+ textHeading = "#000",
227
+ secondary = "#000",
228
+ textSecondary = "#000"
229
+ } = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
52
230
  return /*#__PURE__*/React__default.createElement("div", null, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement("div", {
53
231
  className: "text-center text-2xl md:text-4xl font-merienda font-semibold leading-relaxed",
54
232
  style: {
55
233
  color: textHeading
56
234
  }
57
235
  }, data === null || data === void 0 ? void 0 : data.sectionTitle) : null, /*#__PURE__*/React__default.createElement("div", {
58
- className: "flex items-center justify-center"
236
+ className: `flex items-center justify-center`
59
237
  }, /*#__PURE__*/React__default.createElement("div", {
60
238
  className: "w-32 h-0.5 rounded-full",
61
239
  style: {
@@ -79,107 +257,58 @@ var SectionTitle1 = function SectionTitle1(props) {
79
257
  }, data === null || data === void 0 ? void 0 : data.sectionDescription) : null);
80
258
  };
81
259
 
82
- function _extends() {
83
- return _extends = Object.assign ? Object.assign.bind() : function (n) {
84
- for (var e = 1; e < arguments.length; e++) {
85
- var t = arguments[e];
86
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
87
- }
88
- return n;
89
- }, _extends.apply(null, arguments);
90
- }
91
- function _objectDestructuringEmpty(t) {
92
- if (null == t) throw new TypeError("Cannot destructure " + t);
93
- }
94
- function _objectWithoutPropertiesLoose(r, e) {
95
- if (null == r) return {};
96
- var t = {};
97
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
98
- if (e.includes(n)) continue;
99
- t[n] = r[n];
100
- }
101
- return t;
102
- }
103
-
104
- var Button = function Button(props) {
105
- var _shopConfigStyle$colo;
106
- var _props$label = props.label,
107
- label = _props$label === void 0 ? "" : _props$label,
108
- _props$className = props.className,
109
- className = _props$className === void 0 ? "" : _props$className,
110
- _props$style = props.style,
111
- style = _props$style === void 0 ? {} : _props$style,
112
- _props$shopConfigStyl = props.shopConfigStyle,
113
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
114
- _props$onClick = props.onClick,
115
- onClick = _props$onClick === void 0 ? function () {} : _props$onClick;
116
- var _className = "text-white font-medium rounded-lg text-sm px-4 py-2.5 " + ((shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass) || "") + " " + className;
117
- var _style = _extends({
118
- backgroundColor: shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : (_shopConfigStyle$colo = shopConfigStyle.color) === null || _shopConfigStyle$colo === void 0 ? void 0 : _shopConfigStyle$colo.primary
119
- }, style);
120
- return /*#__PURE__*/React__default.createElement("button", {
121
- type: "button",
122
- className: _className,
123
- style: _style,
124
- onClick: onClick
125
- }, label);
126
- };
127
-
128
- var Hero10 = function Hero10(props) {
260
+ const Hero10 = props => {
129
261
  var _data$data, _data$data$, _data$data$$srcImages, _sectionData$, _sectionData$2, _sectionData$2$button;
130
- var shopConfigStyle = props.shopConfigStyle,
131
- data = props.data;
132
- var sectionData = data === null || data === void 0 ? void 0 : data.data;
133
- var count = useSelector(function (state) {
134
- var _state$counter;
135
- return state === null || state === void 0 ? void 0 : (_state$counter = state.counter) === null || _state$counter === void 0 ? void 0 : _state$counter.value;
136
- });
262
+ const {
263
+ shopConfigStyle,
264
+ data
265
+ } = props;
266
+ const sectionData = data === null || data === void 0 ? void 0 : data.data;
137
267
  return /*#__PURE__*/React__default.createElement("div", {
138
268
  className: "relative w-full bg-cover bg-center bg-no-repeat ",
139
269
  style: {
140
- backgroundImage: "url(" + (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0]) + ")"
270
+ backgroundImage: `url(${data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0]})`
141
271
  }
142
272
  }, /*#__PURE__*/React__default.createElement("div", {
143
273
  className: "absolute top-0 w-full h-full bg-black opacity-40 z-0"
144
274
  }), /*#__PURE__*/React__default.createElement("div", {
145
275
  className: "relative w-full min-h-[540px] p-12 z-10 flex flex-col gap-6 items-center justify-center"
146
276
  }, /*#__PURE__*/React__default.createElement("div", {
147
- className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.headingFont)
148
- }, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.title), sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$2 = sectionData[0]) === null || _sectionData$2 === void 0 ? void 0 : (_sectionData$2$button = _sectionData$2.buttons) === null || _sectionData$2$button === void 0 ? void 0 : _sectionData$2$button.map(function (button) {
149
- return /*#__PURE__*/React__default.createElement(Button, {
150
- label: button === null || button === void 0 ? void 0 : button.label,
151
- shopConfigStyle: shopConfigStyle
152
- });
153
- })));
277
+ className: `text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center ${shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.headingFont}`
278
+ }, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.title), sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$2 = sectionData[0]) === null || _sectionData$2 === void 0 ? void 0 : (_sectionData$2$button = _sectionData$2.buttons) === null || _sectionData$2$button === void 0 ? void 0 : _sectionData$2$button.map(button => /*#__PURE__*/React__default.createElement(Button, {
279
+ label: button === null || button === void 0 ? void 0 : button.label,
280
+ shopConfigStyle: shopConfigStyle
281
+ }))));
154
282
  };
155
283
 
156
- var Dash = function Dash(props) {
157
- var _props$color = props.color,
158
- color = _props$color === void 0 ? "#ccc" : _props$color,
159
- _props$className = props.className,
160
- className = _props$className === void 0 ? "" : _props$className;
284
+ const Dash = props => {
285
+ const {
286
+ color = "#ccc",
287
+ className = ""
288
+ } = props;
161
289
  return /*#__PURE__*/React__default.createElement("div", {
162
- className: "mx-auto w-full max-w-[240px] md:max-w-[720px] border-b-0 " + className,
290
+ className: `mx-auto w-full max-w-[240px] md:max-w-[720px] border-b-0 ${className}`,
163
291
  style: {
164
- backgroundImage: "repeating-linear-gradient(to right, " + color + " 0, " + color + " 10px, transparent 10px, transparent 20px)",
292
+ backgroundImage: `repeating-linear-gradient(to right, ${color} 0, ${color} 10px, transparent 10px, transparent 20px)`,
165
293
  height: "1px"
166
294
  }
167
295
  });
168
296
  };
169
297
 
170
- var Hero11 = function Hero11(props) {
298
+ const Hero11 = props => {
171
299
  var _data$data;
172
- var _props$shopConfigStyl = props.shopConfigStyle,
173
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
174
- _props$data = props.data,
175
- data = _props$data === void 0 ? {} : _props$data,
176
- _props$SectionTitle = props.SectionTitle,
177
- SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
178
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
179
- _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
180
- secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
181
- _shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
182
- background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
300
+ const {
301
+ shopConfigStyle = {},
302
+ shopConfig = {},
303
+ data = {},
304
+ SectionTitle = null
305
+ } = props;
306
+ const {
307
+ primary = "#000",
308
+ secondary = "#000",
309
+ textBody = "#000",
310
+ background = "#fff"
311
+ } = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
183
312
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
184
313
  className: "relative w-full py-12 px-4 xl:px-20",
185
314
  style: {
@@ -190,7 +319,7 @@ var Hero11 = function Hero11(props) {
190
319
  shopConfigStyle: shopConfigStyle
191
320
  }), /*#__PURE__*/React__default.createElement("div", {
192
321
  className: "mt-6 grid grid-cols-2 md:grid-cols-4 gap-1 md:gap-2"
193
- }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
322
+ }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map((it, index) => {
194
323
  var _it$srcImages;
195
324
  return /*#__PURE__*/React__default.createElement("div", {
196
325
  key: index
@@ -202,20 +331,26 @@ var Hero11 = function Hero11(props) {
202
331
  }));
203
332
  };
204
333
 
205
- var Hero11$1 = function Hero11(props) {
334
+ const Hero11$1 = props => {
206
335
  var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$;
207
- var _props$shopConfigStyl = props.shopConfigStyle,
208
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
209
- _props$data = props.data,
210
- data = _props$data === void 0 ? {} : _props$data;
211
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
212
- _shopConfigStyle$colo2 = _shopConfigStyle$colo.textHeading,
213
- textHeading = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2;
336
+ const {
337
+ shopConfigStyle = {},
338
+ shopConfig = {},
339
+ data = {},
340
+ SectionTitle = null
341
+ } = props;
342
+ const {
343
+ textHeading = "#000",
344
+ primary = "#000",
345
+ secondary = "#000",
346
+ textBody = "#000",
347
+ background = "#fff"
348
+ } = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
214
349
  console.log("Hero11 data", data);
215
350
  return /*#__PURE__*/React__default.createElement("div", {
216
351
  className: "relative w-full bg-cover bg-center bg-no-repeat grid grid-cols-1 md:grid-cols-2",
217
352
  style: {
218
- backgroundImage: "url(" + (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0]) + ")"
353
+ backgroundImage: `url(${data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0]})`
219
354
  }
220
355
  }, /*#__PURE__*/React__default.createElement("div", {
221
356
  className: "absolute top-0 w-full h-full bg-white opacity-60 z-0 md:hidden"
@@ -224,7 +359,7 @@ var Hero11$1 = function Hero11(props) {
224
359
  }), /*#__PURE__*/React__default.createElement("div", {
225
360
  className: "relative p-12 z-1"
226
361
  }, /*#__PURE__*/React__default.createElement("div", {
227
- className: "text-2xl md:text-4xl leading-[1.6] " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.headingFont),
362
+ className: `text-2xl md:text-4xl leading-[1.6] ${shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.headingFont}`,
228
363
  style: {
229
364
  color: textHeading
230
365
  }
@@ -233,25 +368,6 @@ var Hero11$1 = function Hero11(props) {
233
368
  }, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.description)));
234
369
  };
235
370
 
236
- // A type of promise-like that resolves synchronously and supports only one observer
237
-
238
- const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
239
-
240
- const _asyncIteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";
241
-
242
- // Asynchronously call a function and send errors to recovery continuation
243
- function _catch(body, recover) {
244
- try {
245
- var result = body();
246
- } catch(e) {
247
- return recover(e);
248
- }
249
- if (result && result.then) {
250
- return result.then(void 0, recover);
251
- }
252
- return result;
253
- }
254
-
255
371
  function bind(fn, thisArg) {
256
372
  return function wrap() {
257
373
  return fn.apply(thisArg, arguments);
@@ -6303,125 +6419,116 @@ var lib = {
6303
6419
  stringify: stringify_1
6304
6420
  };
6305
6421
 
6306
- var getBaseUrl = function getBaseUrl() {
6422
+ const getBaseUrl = () => {
6307
6423
  return process.env.NEXT_PUBLIC_BASE_URL || "https://test-apigateway.sfin.vn";
6308
6424
  };
6309
- var request = axios.create();
6310
- request.interceptors.request.use(function (config) {
6425
+ const request = axios.create();
6426
+ request.interceptors.request.use(config => {
6311
6427
  return config;
6312
- }, function (error) {
6428
+ }, error => {
6313
6429
  return Promise.reject(error.response || {
6314
6430
  data: {}
6315
6431
  });
6316
6432
  });
6317
- request.interceptors.response.use(function (response) {
6433
+ request.interceptors.response.use(response => {
6318
6434
  return response;
6319
- }, function (error) {
6435
+ }, error => {
6320
6436
  return Promise.reject((error === null || error === void 0 ? void 0 : error.response) || {
6321
6437
  data: {}
6322
6438
  });
6323
6439
  });
6324
- var api = function api(options) {
6325
- var config = _extends({
6326
- baseURL: getBaseUrl()
6327
- }, options, {
6328
- paramsSerializer: function paramsSerializer(params) {
6329
- return lib.stringify(params, {
6330
- arrayFormat: "repeat"
6331
- });
6332
- },
6333
- headers: _extends({}, options.headers)
6334
- });
6440
+ const api = options => {
6441
+ let config = {
6442
+ baseURL: getBaseUrl(),
6443
+ ...options,
6444
+ paramsSerializer: params => lib.stringify(params, {
6445
+ arrayFormat: "repeat"
6446
+ }),
6447
+ headers: {
6448
+ ...options.headers
6449
+ }
6450
+ };
6335
6451
  return request(config);
6336
6452
  };
6337
6453
 
6338
- var getShopCategoriesApi = function getShopCategoriesApi(shopId, types) {
6454
+ const getShopCategoriesApi = (shopId, types) => {
6339
6455
  return api({
6340
6456
  method: "get",
6341
- url: "/landing-shop/get-product-category-on-landing",
6457
+ url: `/landing-shop/get-product-category-on-landing`,
6342
6458
  params: {
6343
- shopId: shopId,
6344
- types: types,
6459
+ shopId,
6460
+ types,
6345
6461
  isShowOnLanding: true
6346
6462
  },
6347
6463
  headers: {
6348
- shopId: shopId
6464
+ shopId
6349
6465
  }
6350
6466
  });
6351
6467
  };
6352
- var getProductListApi = function getProductListApi(shopId, params) {
6353
- if (params === void 0) {
6354
- params = {};
6355
- }
6468
+ const getProductListApi = (shopId, params = {}) => {
6356
6469
  return api({
6357
6470
  method: "get",
6358
- url: "/landing-shop/get-product-on-landing",
6359
- params: _extends({
6360
- shopId: shopId,
6361
- isShowOnLanding: true
6362
- }, params),
6471
+ url: `/landing-shop/get-product-on-landing`,
6472
+ params: {
6473
+ shopId,
6474
+ isShowOnLanding: true,
6475
+ ...params
6476
+ },
6363
6477
  headers: {
6364
- shopId: shopId
6478
+ shopId
6365
6479
  }
6366
6480
  });
6367
6481
  };
6368
6482
 
6369
- var CategoryController = function CategoryController(props) {
6370
- var shopConfig = props.shopConfig,
6371
- params = props.params;
6372
- var _useState = useState([]),
6373
- categories = _useState[0],
6374
- setCategories = _useState[1];
6375
- var defaultParams = {};
6376
- useEffect(function () {
6483
+ const CategoryController = props => {
6484
+ const {
6485
+ shopConfig,
6486
+ params
6487
+ } = props;
6488
+ const [categories, setCategories] = useState([]);
6489
+ const defaultParams = {};
6490
+ useEffect(() => {
6377
6491
  getCategoryList();
6378
6492
  }, []);
6379
- var getCategoryList = function getCategoryList() {
6493
+ const getCategoryList = async () => {
6380
6494
  try {
6381
- var _temp = _catch(function () {
6382
- return Promise.resolve(getShopCategoriesApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId, _extends({}, defaultParams, params))).then(function (res) {
6383
- var _res$data, _res$data$status;
6384
- 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) {
6385
- var _res$data2;
6386
- setCategories(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
6387
- }
6388
- });
6389
- }, function (e) {
6390
- console.log(e);
6495
+ var _res$data, _res$data$status;
6496
+ const res = await getShopCategoriesApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId, {
6497
+ ...defaultParams,
6498
+ ...params
6391
6499
  });
6392
- return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
6500
+ 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) {
6501
+ var _res$data2;
6502
+ setCategories(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
6503
+ }
6393
6504
  } catch (e) {
6394
- return Promise.reject(e);
6505
+ console.log(e);
6395
6506
  }
6396
6507
  };
6397
6508
  return {
6398
- categories: categories
6509
+ categories
6399
6510
  };
6400
6511
  };
6401
6512
 
6402
- var Hero13 = function Hero13(props) {
6403
- var listRef = useRef(null);
6404
- var _useState = useState(false),
6405
- isOpen = _useState[0],
6406
- setIsOpen = _useState[1];
6407
- var shopConfigStyle = props.shopConfigStyle,
6408
- data = props.data;
6409
- var sectionData = data === null || data === void 0 ? void 0 : data.data;
6410
- var _CategoryController = CategoryController(props),
6411
- _CategoryController$c = _CategoryController.categories,
6412
- categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
6413
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
6414
- _shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
6415
- primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
6416
- _shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
6417
- textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
6418
- _shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
6419
- background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
6420
- _shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
6421
- bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5,
6422
- _shopConfigStyle$colo6 = _shopConfigStyle$colo.textButton,
6423
- textButton = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
6424
- var handleClickPrevImg = function handleClickPrevImg() {
6513
+ const Hero13 = props => {
6514
+ const listRef = useRef(null);
6515
+ const [isOpen, setIsOpen] = useState(false);
6516
+ const {
6517
+ shopConfigStyle,
6518
+ data
6519
+ } = props;
6520
+ const sectionData = data === null || data === void 0 ? void 0 : data.data;
6521
+ const {
6522
+ categories = []
6523
+ } = CategoryController(props);
6524
+ const {
6525
+ primary = "#000",
6526
+ textBody = "#000",
6527
+ background = "#fff",
6528
+ bgSecondary = "#fff",
6529
+ textButton = "#fff"
6530
+ } = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
6531
+ const handleClickPrevImg = () => {
6425
6532
  if (listRef.current) {
6426
6533
  listRef.current.scrollBy({
6427
6534
  left: -90,
@@ -6429,7 +6536,7 @@ var Hero13 = function Hero13(props) {
6429
6536
  });
6430
6537
  }
6431
6538
  };
6432
- var handleClickNextImg = function handleClickNextImg() {
6539
+ const handleClickNextImg = () => {
6433
6540
  if (listRef.current) {
6434
6541
  listRef.current.scrollBy({
6435
6542
  left: 90,
@@ -6464,7 +6571,7 @@ var Hero13 = function Hero13(props) {
6464
6571
  }, /*#__PURE__*/React__default.createElement("a", {
6465
6572
  href: "/"
6466
6573
  }, /*#__PURE__*/React__default.createElement("div", {
6467
- className: "border-b-2",
6574
+ className: `border-b-2`,
6468
6575
  style: {
6469
6576
  color: primary,
6470
6577
  borderColor: primary
@@ -6472,18 +6579,18 @@ var Hero13 = function Hero13(props) {
6472
6579
  }, "Trang ch\u1EE7")), /*#__PURE__*/React__default.createElement("div", {
6473
6580
  className: "relative group "
6474
6581
  }, /*#__PURE__*/React__default.createElement("div", {
6475
- className: " mx-4 "
6582
+ className: ` mx-4 `
6476
6583
  }, "Danh m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
6477
6584
  className: "absolute hidden grid group-hover:grid grid-cols-3 lg:w-[400px] 2xl:w-[600px] ms-4 py-2 px-2 gap-2 leading-10 rounded-xl z-50",
6478
6585
  style: {
6479
6586
  background: bgSecondary
6480
6587
  }
6481
- }, categories && categories.length > 0 && categories.map(function (item) {
6588
+ }, categories && categories.length > 0 && categories.map(item => {
6482
6589
  return /*#__PURE__*/React__default.createElement("div", {
6483
- key: "hover-" + item.categoryId,
6590
+ key: `hover-${item.categoryId}`,
6484
6591
  className: "hover:bg-gray4 hover:text-white mx-auto px-6"
6485
6592
  }, /*#__PURE__*/React__default.createElement("a", {
6486
- href: "#"
6593
+ href: `#`
6487
6594
  }, /*#__PURE__*/React__default.createElement("div", null, item.cateName)));
6488
6595
  }))), /*#__PURE__*/React__default.createElement("a", {
6489
6596
  href: "/introduction"
@@ -6545,7 +6652,7 @@ var Hero13 = function Hero13(props) {
6545
6652
  className: ""
6546
6653
  }, isOpen === false ? /*#__PURE__*/React__default.createElement("button", {
6547
6654
  type: "button",
6548
- onClick: function onClick() {
6655
+ onClick: () => {
6549
6656
  setIsOpen(true);
6550
6657
  }
6551
6658
  }, /*#__PURE__*/React__default.createElement(FiMenu, {
@@ -6571,7 +6678,7 @@ var Hero13 = function Hero13(props) {
6571
6678
  }
6572
6679
  }, data !== null && data !== void 0 && data.sectionTitle ? data.sectionTitle : "Điện thoại Hải Anh")), /*#__PURE__*/React__default.createElement("button", {
6573
6680
  className: "text-4xl text-gray3",
6574
- onClick: function onClick() {
6681
+ onClick: () => {
6575
6682
  setIsOpen(false);
6576
6683
  }
6577
6684
  }, /*#__PURE__*/React__default.createElement(RxCross2, null))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
@@ -6581,15 +6688,15 @@ var Hero13 = function Hero13(props) {
6581
6688
  }, /*#__PURE__*/React__default.createElement("a", {
6582
6689
  href: "/"
6583
6690
  }, /*#__PURE__*/React__default.createElement("div", {
6584
- className: " border-2 rounded-lg p-4"
6691
+ className: ` border-2 rounded-lg p-4`
6585
6692
  }, "Trang ch\u1EE7")), /*#__PURE__*/React__default.createElement("a", {
6586
6693
  href: "/product/category"
6587
6694
  }, /*#__PURE__*/React__default.createElement("div", {
6588
- className: "border-2 rounded-lg p-4"
6695
+ className: `border-2 rounded-lg p-4`
6589
6696
  }, "Danh m\u1EE5c")), /*#__PURE__*/React__default.createElement("a", {
6590
6697
  href: "/introduction"
6591
6698
  }, /*#__PURE__*/React__default.createElement("div", {
6592
- className: "border-2 rounded-lg p-4"
6699
+ className: `border-2 rounded-lg p-4`
6593
6700
  }, "Gi\u1EDBi thi\u1EC7u"))))))), /*#__PURE__*/React__default.createElement("a", {
6594
6701
  href: "/",
6595
6702
  className: "flex items-center"
@@ -6638,12 +6745,12 @@ var Hero13 = function Hero13(props) {
6638
6745
  }, /*#__PURE__*/React__default.createElement("div", {
6639
6746
  className: " flex my-auto h-full overflow-x-auto hide-scrollbar",
6640
6747
  ref: listRef
6641
- }, categories && categories.length > 0 && categories.map(function (item) {
6748
+ }, categories && categories.length > 0 && categories.map(item => {
6642
6749
  return /*#__PURE__*/React__default.createElement("button", {
6643
- key: "cateN-" + item.categoryId,
6750
+ key: `cateN-${item.categoryId}`,
6644
6751
  className: "items whitespace-nowrap border-r-2 border-r-white px-6 "
6645
6752
  }, /*#__PURE__*/React__default.createElement("a", {
6646
- href: "/products/category?id=" + item.categoryId
6753
+ href: `/products/category?id=${item.categoryId}`
6647
6754
  }, item.cateName));
6648
6755
  }))), /*#__PURE__*/React__default.createElement("div", {
6649
6756
  className: "lg:block hidden lg:col-span-1 my-auto flex "
@@ -6671,23 +6778,20 @@ var Hero13 = function Hero13(props) {
6671
6778
  })));
6672
6779
  };
6673
6780
 
6674
- var Features1 = function Features1(props) {
6781
+ const Features1 = props => {
6675
6782
  var _data$data;
6676
- var _props$shopConfigStyl = props.shopConfigStyle,
6677
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
6678
- _props$data = props.data,
6679
- data = _props$data === void 0 ? {} : _props$data,
6680
- _props$SectionTitle = props.SectionTitle,
6681
- SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
6682
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
6683
- _shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
6684
- primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
6685
- _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
6686
- secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
6687
- _shopConfigStyle$colo4 = _shopConfigStyle$colo.textBody,
6688
- textBody = _shopConfigStyle$colo4 === void 0 ? "#000" : _shopConfigStyle$colo4,
6689
- _shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
6690
- background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
6783
+ const {
6784
+ shopConfigStyle = {},
6785
+ shopConfig = {},
6786
+ data = {},
6787
+ SectionTitle = null
6788
+ } = props;
6789
+ const {
6790
+ primary = "#000",
6791
+ secondary = "#000",
6792
+ textBody = "#000",
6793
+ background = "#fff"
6794
+ } = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
6691
6795
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
6692
6796
  className: "relative w-full py-12 px-4 xl:px-20",
6693
6797
  style: {
@@ -6698,61 +6802,58 @@ var Features1 = function Features1(props) {
6698
6802
  shopConfigStyle: shopConfigStyle
6699
6803
  }), /*#__PURE__*/React__default.createElement("div", {
6700
6804
  className: "mt-6 grid grid-cols-3 gap-4 md:gap-8"
6701
- }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
6702
- return /*#__PURE__*/React__default.createElement("div", {
6703
- key: index,
6704
- className: "pt-6 col-span-3 md:col-span-1"
6705
- }, /*#__PURE__*/React__default.createElement("div", {
6706
- className: "relative w-40 h-24 flex items-center justify-center m-auto md:m-0"
6707
- }, /*#__PURE__*/React__default.createElement("div", {
6708
- className: "absolute w-40 h-24 rounded-2xl z-10",
6709
- style: {
6710
- backgroundColor: primary
6711
- }
6712
- }), /*#__PURE__*/React__default.createElement("div", {
6713
- className: "absolute w-24 h-16 rounded-2xl -right-2 -top-2 z-0",
6714
- style: {
6715
- backgroundColor: secondary
6716
- }
6717
- }), /*#__PURE__*/React__default.createElement("div", {
6718
- className: "h-16 m-auto bg-center w-16 bg-cover bg-no-repeat z-20",
6719
- style: {
6720
- backgroundImage: "url(" + it.srcImage + ")"
6721
- }
6722
- })), /*#__PURE__*/React__default.createElement("p", {
6723
- className: "mx-auto md:mt-3 md:mx-0 text-xl py-2 font-medium w-fit rounded-lg",
6724
- style: {
6725
- color: textBody
6726
- }
6727
- }, it.title), /*#__PURE__*/React__default.createElement("div", {
6728
- className: "mx-auto md:mx-0 mb-2 w-28 h-2px rounded-full",
6729
- style: {
6730
- backgroundColor: secondary
6731
- }
6732
- }), /*#__PURE__*/React__default.createElement("p", {
6733
- className: "text-base mx-auto md:mx-0 text-center md:text-start",
6734
- style: {
6735
- color: textBody
6736
- }
6737
- }, it.description));
6738
- }))), /*#__PURE__*/React__default.createElement(Dash, {
6805
+ }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map((it, index) => /*#__PURE__*/React__default.createElement("div", {
6806
+ key: index,
6807
+ className: "pt-6 col-span-3 md:col-span-1"
6808
+ }, /*#__PURE__*/React__default.createElement("div", {
6809
+ className: "relative w-40 h-24 flex items-center justify-center m-auto md:m-0"
6810
+ }, /*#__PURE__*/React__default.createElement("div", {
6811
+ className: "absolute w-40 h-24 rounded-2xl z-10",
6812
+ style: {
6813
+ backgroundColor: primary
6814
+ }
6815
+ }), /*#__PURE__*/React__default.createElement("div", {
6816
+ className: "absolute w-24 h-16 rounded-2xl -right-2 -top-2 z-0",
6817
+ style: {
6818
+ backgroundColor: secondary
6819
+ }
6820
+ }), /*#__PURE__*/React__default.createElement("div", {
6821
+ className: "h-16 m-auto bg-center w-16 bg-cover bg-no-repeat z-20",
6822
+ style: {
6823
+ backgroundImage: `url(${it.srcImage})`
6824
+ }
6825
+ })), /*#__PURE__*/React__default.createElement("p", {
6826
+ className: "mx-auto md:mt-3 md:mx-0 text-xl py-2 font-medium w-fit rounded-lg",
6827
+ style: {
6828
+ color: textBody
6829
+ }
6830
+ }, it.title), /*#__PURE__*/React__default.createElement("div", {
6831
+ className: "mx-auto md:mx-0 mb-2 w-28 h-2px rounded-full",
6832
+ style: {
6833
+ backgroundColor: secondary
6834
+ }
6835
+ }), /*#__PURE__*/React__default.createElement("p", {
6836
+ className: "text-base mx-auto md:mx-0 text-center md:text-start",
6837
+ style: {
6838
+ color: textBody
6839
+ }
6840
+ }, it.description))))), /*#__PURE__*/React__default.createElement(Dash, {
6739
6841
  color: secondary
6740
6842
  }));
6741
6843
  };
6742
6844
 
6743
- var Features2 = function Features2(props) {
6744
- var data = props.data,
6745
- shopConfigStyle = props.shopConfigStyle;
6746
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
6747
- _shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
6748
- primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
6749
- _shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
6750
- textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
6751
- _shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
6752
- background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
6753
- _shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
6754
- bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
6755
- var sectionData = data === null || data === void 0 ? void 0 : data.data;
6845
+ const Features2 = props => {
6846
+ const {
6847
+ data,
6848
+ shopConfigStyle
6849
+ } = props;
6850
+ const {
6851
+ primary = "#000",
6852
+ textBody = "#000",
6853
+ background = "#fff",
6854
+ bgSecondary = "#fff"
6855
+ } = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
6856
+ const sectionData = data === null || data === void 0 ? void 0 : data.data;
6756
6857
  return /*#__PURE__*/React__default.createElement("div", {
6757
6858
  className: "w-full pt-10 px-4 xl:px-20",
6758
6859
  style: {
@@ -6764,10 +6865,10 @@ var Features2 = function Features2(props) {
6764
6865
  style: {
6765
6866
  background: bgSecondary
6766
6867
  }
6767
- }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
6868
+ }, sectionData && sectionData.length > 0 && sectionData.map((item, index) => {
6768
6869
  return /*#__PURE__*/React__default.createElement("div", {
6769
6870
  className: "flex flex-col gap-2 items-center text-sm lg:text-lg font-semibold text-center",
6770
- key: "dfgg-" + index,
6871
+ key: `dfgg-${index}`,
6771
6872
  style: {
6772
6873
  color: textBody
6773
6874
  }
@@ -6782,19 +6883,20 @@ var Features2 = function Features2(props) {
6782
6883
  })));
6783
6884
  };
6784
6885
 
6785
- var Features3 = function Features3(props) {
6786
- var shopConfigStyle = props.shopConfigStyle,
6787
- shopConfig = props.shopConfig,
6788
- data = props.data;
6789
- var sectionData = data === null || data === void 0 ? void 0 : data.data;
6886
+ const Features3 = props => {
6887
+ const {
6888
+ shopConfigStyle,
6889
+ shopConfig,
6890
+ data
6891
+ } = props;
6892
+ const sectionData = data === null || data === void 0 ? void 0 : data.data;
6790
6893
  data.sectionTitle = data.sectionTitle.replace("{shopName}", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName);
6791
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
6792
- _shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
6793
- textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
6794
- _shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
6795
- background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
6796
- _shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
6797
- bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
6894
+ const {
6895
+ primary = "#000",
6896
+ textBody = "#000",
6897
+ background = "#fff",
6898
+ bgSecondary = "#fff"
6899
+ } = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
6798
6900
  return /*#__PURE__*/React__default.createElement("div", {
6799
6901
  className: " w-full pt-10 px-4 xl:px-20",
6800
6902
  style: {
@@ -6807,10 +6909,10 @@ var Features3 = function Features3(props) {
6807
6909
  className: "text-gray3 text-lg sm:text-xl md:text-2xl"
6808
6910
  }, data === null || data === void 0 ? void 0 : data.sectionDescription), /*#__PURE__*/React__default.createElement("div", {
6809
6911
  className: "grid grid-cols-2 sm:grid-cols-4 gap-6 mt-6 text-sm md:text-base"
6810
- }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
6912
+ }, sectionData && sectionData.length > 0 && sectionData.map((item, index) => {
6811
6913
  return /*#__PURE__*/React__default.createElement("div", {
6812
6914
  className: "grid grid-cols-2 p-3 rounded-lg font-semibold",
6813
- key: "dfsdfj-" + index,
6915
+ key: `dfsdfj-${index}`,
6814
6916
  style: {
6815
6917
  background: bgSecondary
6816
6918
  }
@@ -6821,59 +6923,55 @@ var Features3 = function Features3(props) {
6821
6923
  })));
6822
6924
  };
6823
6925
 
6824
- var ProductController = function ProductController(props) {
6825
- var shopConfig = props.shopConfig,
6826
- params = props.params,
6827
- _props$isAutoGetList = props.isAutoGetList,
6828
- isAutoGetList = _props$isAutoGetList === void 0 ? true : _props$isAutoGetList;
6829
- var _useState = useState([]),
6830
- products = _useState[0],
6831
- setProducts = _useState[1];
6832
- var defaultParams = {
6926
+ const ProductController = props => {
6927
+ const {
6928
+ shopConfig,
6929
+ params,
6930
+ isAutoGetList = true
6931
+ } = props;
6932
+ const [products, setProducts] = useState([]);
6933
+ const defaultParams = {
6833
6934
  page: 0,
6834
6935
  size: 8,
6835
6936
  types: "0"
6836
6937
  };
6837
- useEffect(function () {
6938
+ useEffect(() => {
6838
6939
  if (isAutoGetList) {
6839
6940
  getProductList();
6840
6941
  }
6841
6942
  }, [params, isAutoGetList]);
6842
- var getProductList = function getProductList() {
6943
+ const getProductList = async () => {
6843
6944
  try {
6844
- var _temp = _catch(function () {
6845
- return Promise.resolve(getProductListApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId, _extends({}, defaultParams, params))).then(function (res) {
6846
- var _res$data, _res$data$status;
6847
- 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) {
6848
- var _res$data2;
6849
- setProducts(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
6850
- }
6851
- });
6852
- }, function (e) {
6853
- console.log(e);
6945
+ var _res$data, _res$data$status;
6946
+ const res = await getProductListApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId, {
6947
+ ...defaultParams,
6948
+ ...params
6854
6949
  });
6855
- return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
6950
+ 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) {
6951
+ var _res$data2;
6952
+ setProducts(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
6953
+ }
6856
6954
  } catch (e) {
6857
- return Promise.reject(e);
6955
+ console.log(e);
6858
6956
  }
6859
6957
  };
6860
6958
  return {
6861
- products: products
6959
+ products
6862
6960
  };
6863
6961
  };
6864
6962
 
6865
6963
  var _path, _path2, _path3;
6866
- function _extends$1() {
6867
- return _extends$1 = Object.assign ? Object.assign.bind() : function (n) {
6964
+ function _extends() {
6965
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
6868
6966
  for (var e = 1; e < arguments.length; e++) {
6869
6967
  var t = arguments[e];
6870
6968
  for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
6871
6969
  }
6872
6970
  return n;
6873
- }, _extends$1.apply(null, arguments);
6971
+ }, _extends.apply(null, arguments);
6874
6972
  }
6875
6973
  function SvgImageGallery(props) {
6876
- return /*#__PURE__*/createElement("svg", _extends$1({
6974
+ return /*#__PURE__*/createElement("svg", _extends({
6877
6975
  height: 512,
6878
6976
  viewBox: "0 0 24 24",
6879
6977
  width: 512,
@@ -6887,11 +6985,13 @@ function SvgImageGallery(props) {
6887
6985
  })));
6888
6986
  }
6889
6987
 
6890
- var DefaultImage = function DefaultImage(props) {
6891
- var _props$className = props.className,
6892
- className = _props$className === void 0 ? "" : _props$className;
6988
+ const DefaultImage = props => {
6989
+ const {
6990
+ size = 0,
6991
+ className = ""
6992
+ } = props;
6893
6993
  return /*#__PURE__*/React__default.createElement("div", {
6894
- className: "flex justify-center items-center w-full aspect-square " + className,
6994
+ className: `flex justify-center items-center w-full aspect-square ${className}`,
6895
6995
  style: {
6896
6996
  backgroundColor: "#FAFAFA"
6897
6997
  }
@@ -6901,26 +7001,24 @@ var DefaultImage = function DefaultImage(props) {
6901
7001
  fill: "#D9D9D9"
6902
7002
  }));
6903
7003
  };
6904
- var ProductImage = function ProductImage(props) {
6905
- var _props$size2 = props.size,
6906
- size = _props$size2 === void 0 ? 0 : _props$size2,
6907
- _props$className2 = props.className,
6908
- className = _props$className2 === void 0 ? "" : _props$className2,
6909
- product = props.product;
6910
- var _useState = useState(""),
6911
- src = _useState[0],
6912
- setSrc = _useState[1];
6913
- useEffect(function () {
7004
+ const ProductImage = props => {
7005
+ const {
7006
+ size = 0,
7007
+ className = "",
7008
+ product
7009
+ } = props;
7010
+ const [src, setSrc] = useState("");
7011
+ useEffect(() => {
6914
7012
  getProductImage();
6915
7013
  }, [product]);
6916
- var getProductImage = function getProductImage() {
7014
+ const getProductImage = () => {
6917
7015
  var _JSON$parse, _JSON$parse$;
6918
- var src = (_JSON$parse = JSON.parse((product === null || product === void 0 ? void 0 : product.imagesUrl) || "[]")) === null || _JSON$parse === void 0 ? void 0 : (_JSON$parse$ = _JSON$parse[0]) === null || _JSON$parse$ === void 0 ? void 0 : _JSON$parse$.imageUrl;
7016
+ const src = (_JSON$parse = JSON.parse((product === null || product === void 0 ? void 0 : product.imagesUrl) || "[]")) === null || _JSON$parse === void 0 ? void 0 : (_JSON$parse$ = _JSON$parse[0]) === null || _JSON$parse$ === void 0 ? void 0 : _JSON$parse$.imageUrl;
6919
7017
  setSrc(src);
6920
7018
  };
6921
7019
  return src ? /*#__PURE__*/React__default.createElement("img", {
6922
7020
  src: src,
6923
- className: className,
7021
+ className: `w-full aspect-square ${className}`,
6924
7022
  style: size ? {
6925
7023
  width: size,
6926
7024
  height: size
@@ -6931,29 +7029,28 @@ var ProductImage = function ProductImage(props) {
6931
7029
  });
6932
7030
  };
6933
7031
 
6934
- var Treatments1 = function Treatments1(props) {
6935
- var _props$shopConfigStyl = props.shopConfigStyle,
6936
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
6937
- _props$data = props.data,
6938
- data = _props$data === void 0 ? {} : _props$data,
6939
- _props$SectionTitle = props.SectionTitle,
6940
- SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
6941
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
6942
- _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
6943
- secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
6944
- _shopConfigStyle$colo4 = _shopConfigStyle$colo.textBody,
6945
- textBody = _shopConfigStyle$colo4 === void 0 ? "#000" : _shopConfigStyle$colo4,
6946
- _shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
6947
- background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
6948
- var _useState = useState({
6949
- size: 1
6950
- }),
6951
- params = _useState[0];
6952
- var _ProductController = ProductController(_extends({}, props, {
6953
- params: params
6954
- })),
6955
- _ProductController$pr = _ProductController.products,
6956
- products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
7032
+ const Treatments1 = props => {
7033
+ const {
7034
+ shopConfigStyle = {},
7035
+ shopConfig = {},
7036
+ data = {},
7037
+ SectionTitle = null
7038
+ } = props;
7039
+ const {
7040
+ primary = "#000",
7041
+ secondary = "#000",
7042
+ textBody = "#000",
7043
+ background = "#fff"
7044
+ } = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
7045
+ const [params, setParams] = useState({
7046
+ size: 1
7047
+ });
7048
+ const {
7049
+ products = []
7050
+ } = ProductController({
7051
+ ...props,
7052
+ params
7053
+ });
6957
7054
  console.log("Treatments1 products 1", products);
6958
7055
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
6959
7056
  className: "relative w-full py-12 px-4 xl:px-20",
@@ -6963,7 +7060,7 @@ var Treatments1 = function Treatments1(props) {
6963
7060
  }, /*#__PURE__*/React__default.createElement(SectionTitle, {
6964
7061
  data: data,
6965
7062
  shopConfigStyle: shopConfigStyle
6966
- }), products === null || products === void 0 ? void 0 : products.map(function (product, index) {
7063
+ }), products === null || products === void 0 ? void 0 : products.map((product, index) => {
6967
7064
  var _product$productInfo, _product$productInfo2;
6968
7065
  return /*#__PURE__*/React__default.createElement("div", {
6969
7066
  className: "grid grid-cols-1 md:grid-cols-2 gap-6 mt-12",
@@ -6972,7 +7069,7 @@ var Treatments1 = function Treatments1(props) {
6972
7069
  product: product === null || product === void 0 ? void 0 : product.productInfo,
6973
7070
  className: "aspect-video rounded-2xl"
6974
7071
  }), /*#__PURE__*/React__default.createElement("div", {
6975
- className: "" + (index % 2 ? "text-right" : "text-left")
7072
+ className: `${index % 2 ? "text-right" : "text-left"}`
6976
7073
  }, /*#__PURE__*/React__default.createElement("div", {
6977
7074
  className: "font-medium text-2xl",
6978
7075
  style: {
@@ -7000,17 +7097,17 @@ var Treatments1 = function Treatments1(props) {
7000
7097
  };
7001
7098
 
7002
7099
  var _path$1;
7003
- function _extends$2() {
7004
- return _extends$2 = Object.assign ? Object.assign.bind() : function (n) {
7100
+ function _extends$1() {
7101
+ return _extends$1 = Object.assign ? Object.assign.bind() : function (n) {
7005
7102
  for (var e = 1; e < arguments.length; e++) {
7006
7103
  var t = arguments[e];
7007
7104
  for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
7008
7105
  }
7009
7106
  return n;
7010
- }, _extends$2.apply(null, arguments);
7107
+ }, _extends$1.apply(null, arguments);
7011
7108
  }
7012
7109
  function SvgAngleSmallLeft(props) {
7013
- return /*#__PURE__*/createElement("svg", _extends$2({
7110
+ return /*#__PURE__*/createElement("svg", _extends$1({
7014
7111
  xmlns: "http://www.w3.org/2000/svg",
7015
7112
  viewBox: "0 0 24 24",
7016
7113
  width: 512,
@@ -7021,17 +7118,17 @@ function SvgAngleSmallLeft(props) {
7021
7118
  }
7022
7119
 
7023
7120
  var _path$2;
7024
- function _extends$3() {
7025
- return _extends$3 = Object.assign ? Object.assign.bind() : function (n) {
7121
+ function _extends$2() {
7122
+ return _extends$2 = Object.assign ? Object.assign.bind() : function (n) {
7026
7123
  for (var e = 1; e < arguments.length; e++) {
7027
7124
  var t = arguments[e];
7028
7125
  for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
7029
7126
  }
7030
7127
  return n;
7031
- }, _extends$3.apply(null, arguments);
7128
+ }, _extends$2.apply(null, arguments);
7032
7129
  }
7033
7130
  function SvgAngleSmallRight(props) {
7034
- return /*#__PURE__*/createElement("svg", _extends$3({
7131
+ return /*#__PURE__*/createElement("svg", _extends$2({
7035
7132
  xmlns: "http://www.w3.org/2000/svg",
7036
7133
  viewBox: "0 0 24 24",
7037
7134
  width: 512,
@@ -7041,35 +7138,29 @@ function SvgAngleSmallRight(props) {
7041
7138
  })));
7042
7139
  }
7043
7140
 
7044
- var ScrollHorizontal = function ScrollHorizontal(props) {
7045
- var _props$datas = props.datas,
7046
- datas = _props$datas === void 0 ? [] : _props$datas,
7047
- _props$className = props.className,
7048
- className = _props$className === void 0 ? "" : _props$className,
7049
- _props$style = props.style,
7050
- style = _props$style === void 0 ? {} : _props$style,
7051
- _props$primaryColor = props.primaryColor,
7052
- primaryColor = _props$primaryColor === void 0 ? "" : _props$primaryColor,
7053
- _props$renderItem = props.renderItem,
7054
- renderItem = _props$renderItem === void 0 ? function () {} : _props$renderItem;
7055
- var scrollContainerRef = useRef(null);
7056
- var _useState = useState(true),
7057
- isScrolledToLeft = _useState[0],
7058
- setIsScrolledToLeft = _useState[1];
7059
- var _useState2 = useState(false),
7060
- isScrolledToRight = _useState2[0],
7061
- setIsScrolledToRight = _useState2[1];
7062
- var checkScrollPosition = function checkScrollPosition() {
7141
+ const ScrollHorizontal = props => {
7142
+ const {
7143
+ datas = [],
7144
+ className = "",
7145
+ style = {},
7146
+ primaryColor = "",
7147
+ renderItem = () => {}
7148
+ } = props;
7149
+ const scrollContainerRef = useRef(null);
7150
+ const [isScrolledToLeft, setIsScrolledToLeft] = useState(true);
7151
+ const [isScrolledToRight, setIsScrolledToRight] = useState(false);
7152
+ const checkScrollPosition = () => {
7063
7153
  if (scrollContainerRef.current) {
7064
- var _scrollContainerRef$c = scrollContainerRef.current,
7065
- _scrollLeft = _scrollContainerRef$c.scrollLeft,
7066
- scrollWidth = _scrollContainerRef$c.scrollWidth,
7067
- clientWidth = _scrollContainerRef$c.clientWidth;
7068
- setIsScrolledToLeft(_scrollLeft === 0);
7069
- setIsScrolledToRight(_scrollLeft + clientWidth >= scrollWidth);
7154
+ const {
7155
+ scrollLeft,
7156
+ scrollWidth,
7157
+ clientWidth
7158
+ } = scrollContainerRef.current;
7159
+ setIsScrolledToLeft(scrollLeft === 0);
7160
+ setIsScrolledToRight(scrollLeft + clientWidth >= scrollWidth);
7070
7161
  }
7071
7162
  };
7072
- var scrollLeft = function scrollLeft() {
7163
+ const scrollLeft = () => {
7073
7164
  if (scrollContainerRef.current) {
7074
7165
  scrollContainerRef.current.scrollBy({
7075
7166
  left: -200,
@@ -7078,7 +7169,7 @@ var ScrollHorizontal = function ScrollHorizontal(props) {
7078
7169
  setTimeout(checkScrollPosition, 300);
7079
7170
  }
7080
7171
  };
7081
- var scrollRight = function scrollRight() {
7172
+ const scrollRight = () => {
7082
7173
  if (scrollContainerRef.current) {
7083
7174
  scrollContainerRef.current.scrollBy({
7084
7175
  left: 200,
@@ -7087,19 +7178,17 @@ var ScrollHorizontal = function ScrollHorizontal(props) {
7087
7178
  setTimeout(checkScrollPosition, 300);
7088
7179
  }
7089
7180
  };
7090
- useEffect(function () {
7181
+ useEffect(() => {
7091
7182
  checkScrollPosition();
7092
7183
  }, [datas]);
7093
7184
  return /*#__PURE__*/React__default.createElement("div", {
7094
- className: "flex " + className,
7185
+ className: `flex ${className}`,
7095
7186
  style: style
7096
7187
  }, /*#__PURE__*/React__default.createElement("div", {
7097
- className: "flex w-full overflow-x-hidden",
7188
+ className: `flex w-full overflow-x-hidden`,
7098
7189
  ref: scrollContainerRef,
7099
7190
  onScroll: checkScrollPosition
7100
- }, datas === null || datas === void 0 ? void 0 : datas.map(function (item, index) {
7101
- return renderItem(item, index);
7102
- })), /*#__PURE__*/React__default.createElement("div", {
7191
+ }, datas === null || datas === void 0 ? void 0 : datas.map((item, index) => renderItem(item, index))), /*#__PURE__*/React__default.createElement("div", {
7103
7192
  className: "flex gap-2 items-center px-4"
7104
7193
  }, /*#__PURE__*/React__default.createElement("div", {
7105
7194
  onClick: scrollLeft,
@@ -7124,29 +7213,27 @@ var ScrollHorizontal = function ScrollHorizontal(props) {
7124
7213
  }))));
7125
7214
  };
7126
7215
 
7127
- var getDurationValue = function getDurationValue(attributes) {
7216
+ const getDurationValue = attributes => {
7128
7217
  var _parsedAttributes$fin;
7129
- var parsedAttributes = JSON.parse(attributes || "[]");
7130
- return ((_parsedAttributes$fin = parsedAttributes.find(function (attr) {
7131
- return attr.name === "Thời lượng (phút) / buổi";
7132
- })) === null || _parsedAttributes$fin === void 0 ? void 0 : _parsedAttributes$fin.value[0]) || "0";
7218
+ const parsedAttributes = JSON.parse(attributes || "[]");
7219
+ return ((_parsedAttributes$fin = parsedAttributes.find(attr => attr.name === "Thời lượng (phút) / buổi")) === null || _parsedAttributes$fin === void 0 ? void 0 : _parsedAttributes$fin.value[0]) || "0";
7133
7220
  };
7134
7221
 
7135
- var formatCurrency = function formatCurrency(amount) {
7222
+ const formatCurrency = amount => {
7136
7223
  if (isNaN(amount)) {
7137
7224
  return '0 ₫';
7138
7225
  }
7139
- var roundedAmount = Math.round(amount);
7140
- var formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
7141
- return formattedAmount + " \u20AB";
7226
+ const roundedAmount = Math.round(amount);
7227
+ const formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
7228
+ return `${formattedAmount} ₫`;
7142
7229
  };
7143
7230
 
7144
- var ProductPrice = function ProductPrice(props) {
7145
- var product = props.product,
7146
- _props$className = props.className,
7147
- className = _props$className === void 0 ? "" : _props$className,
7148
- _props$style = props.style,
7149
- style = _props$style === void 0 ? {} : _props$style;
7231
+ const ProductPrice = props => {
7232
+ const {
7233
+ product,
7234
+ className = "",
7235
+ style = {}
7236
+ } = props;
7150
7237
  return /*#__PURE__*/React__default.createElement("div", {
7151
7238
  className: className
7152
7239
  }, product !== null && product !== void 0 && product.priceBeforeDiscount ? /*#__PURE__*/React__default.createElement("span", {
@@ -7157,8 +7244,10 @@ var ProductPrice = function ProductPrice(props) {
7157
7244
  }, formatCurrency(product === null || product === void 0 ? void 0 : product.price)));
7158
7245
  };
7159
7246
 
7160
- var ProductItem1 = function ProductItem1(props) {
7161
- var product = props.product;
7247
+ const ProductItem1 = props => {
7248
+ const {
7249
+ product
7250
+ } = props;
7162
7251
  return /*#__PURE__*/React__default.createElement("div", {
7163
7252
  className: "flex"
7164
7253
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
@@ -7177,36 +7266,33 @@ var ProductItem1 = function ProductItem1(props) {
7177
7266
  }))));
7178
7267
  };
7179
7268
 
7180
- var Treatments1$1 = function Treatments1(props) {
7181
- var _props$shopConfigStyl = props.shopConfigStyle,
7182
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
7183
- _props$data = props.data,
7184
- data = _props$data === void 0 ? {} : _props$data,
7185
- _props$SectionTitle = props.SectionTitle,
7186
- SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
7187
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
7188
- _shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
7189
- primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
7190
- _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
7191
- secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
7192
- _shopConfigStyle$colo4 = _shopConfigStyle$colo.textBody,
7193
- textBody = _shopConfigStyle$colo4 === void 0 ? "#000" : _shopConfigStyle$colo4,
7194
- _shopConfigStyle$colo5 = _shopConfigStyle$colo.textButton,
7195
- textButton = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5,
7196
- _shopConfigStyle$colo6 = _shopConfigStyle$colo.background,
7197
- background = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
7198
- var _useState = useState({}),
7199
- params = _useState[0];
7200
- var _CategoryController = CategoryController(_extends({}, props)),
7201
- categories = _CategoryController.categories;
7202
- var _ProductController = ProductController(_extends({}, props, {
7203
- params: params
7204
- })),
7205
- _ProductController$pr = _ProductController.products,
7206
- products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
7207
- var _useState2 = useState(0),
7208
- selectedCategory = _useState2[0],
7209
- setSelectedCategory = _useState2[1];
7269
+ const Treatments1$1 = props => {
7270
+ const {
7271
+ shopConfigStyle = {},
7272
+ shopConfig = {},
7273
+ data = {},
7274
+ SectionTitle = null
7275
+ } = props;
7276
+ const {
7277
+ primary = "#000",
7278
+ secondary = "#000",
7279
+ textBody = "#000",
7280
+ textButton = "#fff",
7281
+ background = "#fff"
7282
+ } = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
7283
+ const [params, setParams] = useState({});
7284
+ const {
7285
+ categories
7286
+ } = CategoryController({
7287
+ ...props
7288
+ });
7289
+ const {
7290
+ products = []
7291
+ } = ProductController({
7292
+ ...props,
7293
+ params
7294
+ });
7295
+ const [selectedCategory, setSelectedCategory] = useState(0);
7210
7296
  console.log("Treatments2 products");
7211
7297
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
7212
7298
  className: "relative w-full py-12 px-4 xl:px-20",
@@ -7220,39 +7306,35 @@ var Treatments1$1 = function Treatments1(props) {
7220
7306
  datas: [{
7221
7307
  categoryId: 0,
7222
7308
  cateName: "Tất cả"
7223
- }].concat(categories),
7309
+ }, ...categories],
7224
7310
  style: {
7225
7311
  backgroundColor: secondary
7226
7312
  },
7227
7313
  className: "mt-6 rounded-lg overflow-hidden",
7228
7314
  primaryColor: primary,
7229
- renderItem: function renderItem(item, index) {
7230
- return /*#__PURE__*/React__default.createElement("div", {
7231
- key: index,
7232
- className: "p-3 flex gap-3 shrink-0 cursor-pointer text-base",
7233
- onClick: function onClick() {
7234
- return setSelectedCategory(item.categoryId);
7235
- },
7236
- style: {
7237
- backgroundColor: selectedCategory === item.categoryId ? primary : "inherit",
7238
- color: selectedCategory === item.categoryId ? textButton : textBody
7239
- }
7240
- }, item === null || item === void 0 ? void 0 : item.cateName);
7241
- }
7315
+ renderItem: (item, index) => /*#__PURE__*/React__default.createElement("div", {
7316
+ key: index,
7317
+ className: `p-3 flex gap-3 shrink-0 cursor-pointer text-base`,
7318
+ onClick: () => setSelectedCategory(item.categoryId),
7319
+ style: {
7320
+ backgroundColor: selectedCategory === item.categoryId ? primary : "inherit",
7321
+ color: selectedCategory === item.categoryId ? textButton : textBody
7322
+ }
7323
+ }, item === null || item === void 0 ? void 0 : item.cateName)
7242
7324
  }), /*#__PURE__*/React__default.createElement("div", {
7243
7325
  className: "grid grid-cols-1 md:grid-cols-2 gap-10 mt-6"
7244
- }, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
7245
- return /*#__PURE__*/React__default.createElement(ProductItem1, {
7246
- key: index,
7247
- product: product === null || product === void 0 ? void 0 : product.productInfo
7248
- });
7249
- }))), /*#__PURE__*/React__default.createElement(Dash, {
7326
+ }, products === null || products === void 0 ? void 0 : products.map((product, index) => /*#__PURE__*/React__default.createElement(ProductItem1, {
7327
+ key: index,
7328
+ product: product === null || product === void 0 ? void 0 : product.productInfo
7329
+ })))), /*#__PURE__*/React__default.createElement(Dash, {
7250
7330
  color: secondary
7251
7331
  }));
7252
7332
  };
7253
7333
 
7254
- var ProductItem2 = function ProductItem2(props) {
7255
- var product = props.product;
7334
+ const ProductItem2 = props => {
7335
+ const {
7336
+ product
7337
+ } = props;
7256
7338
  return /*#__PURE__*/React__default.createElement("div", {
7257
7339
  className: "text-center"
7258
7340
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
@@ -7266,27 +7348,29 @@ var ProductItem2 = function ProductItem2(props) {
7266
7348
  }, product === null || product === void 0 ? void 0 : product.productName));
7267
7349
  };
7268
7350
 
7269
- var Products1 = function Products1(props) {
7270
- var _props$shopConfigStyl = props.shopConfigStyle,
7271
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
7272
- _props$data = props.data,
7273
- data = _props$data === void 0 ? {} : _props$data,
7274
- _props$SectionTitle = props.SectionTitle,
7275
- SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
7276
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
7277
- _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
7278
- secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
7279
- _shopConfigStyle$colo6 = _shopConfigStyle$colo.background,
7280
- background = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
7281
- var _useState = useState({
7282
- size: 4
7283
- }),
7284
- params = _useState[0];
7285
- var _ProductController = ProductController(_extends({}, props, {
7286
- params: params
7287
- })),
7288
- _ProductController$pr = _ProductController.products,
7289
- products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
7351
+ const Products1 = props => {
7352
+ const {
7353
+ shopConfigStyle = {},
7354
+ shopConfig = {},
7355
+ data = {},
7356
+ SectionTitle = null
7357
+ } = props;
7358
+ const {
7359
+ primary = "#000",
7360
+ secondary = "#000",
7361
+ textBody = "#000",
7362
+ textButton = "#fff",
7363
+ background = "#fff"
7364
+ } = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
7365
+ const [params, setParams] = useState({
7366
+ size: 4
7367
+ });
7368
+ const {
7369
+ products = []
7370
+ } = ProductController({
7371
+ ...props,
7372
+ params
7373
+ });
7290
7374
  console.log("Products1 products");
7291
7375
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
7292
7376
  className: "w-full py-12 px-4 xl:px-20 text-center",
@@ -7298,12 +7382,10 @@ var Products1 = function Products1(props) {
7298
7382
  shopConfigStyle: shopConfigStyle
7299
7383
  }), /*#__PURE__*/React__default.createElement("div", {
7300
7384
  className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-10 mt-12"
7301
- }, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
7302
- return /*#__PURE__*/React__default.createElement(ProductItem2, {
7303
- key: index,
7304
- product: product === null || product === void 0 ? void 0 : product.productInfo
7305
- });
7306
- })), /*#__PURE__*/React__default.createElement(Button, {
7385
+ }, products === null || products === void 0 ? void 0 : products.map((product, index) => /*#__PURE__*/React__default.createElement(ProductItem2, {
7386
+ key: index,
7387
+ product: product === null || product === void 0 ? void 0 : product.productInfo
7388
+ }))), /*#__PURE__*/React__default.createElement(Button, {
7307
7389
  label: "Xem tất cả",
7308
7390
  shopConfigStyle: shopConfigStyle,
7309
7391
  className: "mt-12"
@@ -7312,10 +7394,12 @@ var Products1 = function Products1(props) {
7312
7394
  }));
7313
7395
  };
7314
7396
 
7315
- var ItemProduct = function ItemProduct(props) {
7397
+ const ItemProduct = props => {
7316
7398
  var _shopConfigStyle$colo, _shopConfigStyle$colo2, _shopConfigStyle$colo3;
7317
- var product = props.product,
7318
- shopConfigStyle = props.shopConfigStyle;
7399
+ const {
7400
+ product,
7401
+ shopConfigStyle
7402
+ } = props;
7319
7403
  return /*#__PURE__*/React__default.createElement("div", {
7320
7404
  className: "pb-4 rounded-2xl w-full",
7321
7405
  style: {
@@ -7324,7 +7408,7 @@ var ItemProduct = function ItemProduct(props) {
7324
7408
  }, /*#__PURE__*/React__default.createElement("div", {
7325
7409
  className: "relative pt-2 flex justify-center h-32 sm:h-40 lg:h-52"
7326
7410
  }, /*#__PURE__*/React__default.createElement("a", {
7327
- href: "#"
7411
+ href: `#`
7328
7412
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
7329
7413
  product: product,
7330
7414
  className: "aspect-w-1 aspect-h-1 max-h-32 sm:max-h-40 lg:max-h-52 object-cover"
@@ -7348,25 +7432,18 @@ var ItemProduct = function ItemProduct(props) {
7348
7432
  }))));
7349
7433
  };
7350
7434
 
7351
- var Carousel = function Carousel(props) {
7352
- var carouselRef = useRef(null);
7353
- var _useState = useState(false),
7354
- isScrolledToLeft = _useState[0],
7355
- setIsScrolledToLeft = _useState[1];
7356
- var _useState2 = useState(true),
7357
- isScrolledToRight = _useState2[0],
7358
- setIsScrolledToRight = _useState2[1];
7359
- var _props$datas = props.datas,
7360
- datas = _props$datas === void 0 ? [] : _props$datas,
7361
- _props$className = props.className,
7362
- className = _props$className === void 0 ? "" : _props$className,
7363
- _props$style = props.style,
7364
- style = _props$style === void 0 ? {} : _props$style,
7365
- _props$primaryColor = props.primaryColor,
7366
- primaryColor = _props$primaryColor === void 0 ? "" : _props$primaryColor,
7367
- _props$renderItem = props.renderItem,
7368
- renderItem = _props$renderItem === void 0 ? function () {} : _props$renderItem;
7369
- var handleClickPrevImg = function handleClickPrevImg() {
7435
+ const Carousel = props => {
7436
+ const carouselRef = useRef(null);
7437
+ const [isScrolledToLeft, setIsScrolledToLeft] = useState(false);
7438
+ const [isScrolledToRight, setIsScrolledToRight] = useState(true);
7439
+ const {
7440
+ datas = [],
7441
+ className = "",
7442
+ style = {},
7443
+ primaryColor = "",
7444
+ renderItem = () => {}
7445
+ } = props;
7446
+ const handleClickPrevImg = () => {
7370
7447
  if (carouselRef.current) {
7371
7448
  setIsScrolledToLeft(true);
7372
7449
  setIsScrolledToRight(false);
@@ -7376,7 +7453,7 @@ var Carousel = function Carousel(props) {
7376
7453
  });
7377
7454
  }
7378
7455
  };
7379
- var handleClickNextImg = function handleClickNextImg() {
7456
+ const handleClickNextImg = () => {
7380
7457
  setIsScrolledToRight(true);
7381
7458
  setIsScrolledToLeft(false);
7382
7459
  if (carouselRef.current) {
@@ -7387,14 +7464,12 @@ var Carousel = function Carousel(props) {
7387
7464
  }
7388
7465
  };
7389
7466
  return /*#__PURE__*/React__default.createElement("div", {
7390
- className: "relative " + className + " ",
7467
+ className: `relative ${className} `,
7391
7468
  style: style
7392
7469
  }, /*#__PURE__*/React__default.createElement("div", {
7393
7470
  className: " w-full pe-2 h-full flex overflow-x-auto hide-scrollbar",
7394
7471
  ref: carouselRef
7395
- }, datas && datas.length > 0 && datas.map(function (item, index) {
7396
- return renderItem(item, index);
7397
- })), datas && datas.length > 0 && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("button", {
7472
+ }, datas && datas.length > 0 && datas.map((item, index) => renderItem(item, index))), datas && datas.length > 0 && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("button", {
7398
7473
  className: " hidden md:block bg-gray3 p-3 rounded-full absolute top-[45%] left-[-8px] lg:left-[-1%]",
7399
7474
  style: {
7400
7475
  backgroundColor: isScrolledToLeft ? primaryColor : "#BDBDBD"
@@ -7413,23 +7488,21 @@ var Carousel = function Carousel(props) {
7413
7488
  }))));
7414
7489
  };
7415
7490
 
7416
- var Products2 = function Products2(props) {
7417
- var shopConfigStyle = props.shopConfigStyle,
7418
- data = props.data;
7419
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
7420
- _shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
7421
- primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
7422
- _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
7423
- secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
7424
- _shopConfigStyle$colo4 = _shopConfigStyle$colo.textBody,
7425
- textBody = _shopConfigStyle$colo4 === void 0 ? "#000" : _shopConfigStyle$colo4,
7426
- _shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
7427
- background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5,
7428
- _shopConfigStyle$colo6 = _shopConfigStyle$colo.textButton,
7429
- textButton = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
7430
- var _ProductController = ProductController(props),
7431
- _ProductController$pr = _ProductController.products,
7432
- products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
7491
+ const Products2 = props => {
7492
+ const {
7493
+ shopConfigStyle,
7494
+ data
7495
+ } = props;
7496
+ const {
7497
+ primary = "#000",
7498
+ secondary = "#000",
7499
+ textBody = "#000",
7500
+ background = "#fff",
7501
+ textButton = "#fff"
7502
+ } = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
7503
+ const {
7504
+ products = []
7505
+ } = ProductController(props);
7433
7506
  console.log("Products2 products");
7434
7507
  return /*#__PURE__*/React__default.createElement("div", {
7435
7508
  className: "pt-10 px-4 xl:px-20",
@@ -7450,39 +7523,29 @@ var Products2 = function Products2(props) {
7450
7523
  }, data === null || data === void 0 ? void 0 : data.sectionTitle), /*#__PURE__*/React__default.createElement(Carousel, {
7451
7524
  datas: products,
7452
7525
  primaryColor: primary,
7453
- renderItem: function renderItem(item, index) {
7454
- return /*#__PURE__*/React__default.createElement("div", {
7455
- key: "carousel-" + index,
7456
- className: " min-w-[40vw] object-cover sm:min-w-[25vw] lg:min-w-[22vw] xl:min-w-[20vw] pe-4 xl:pe-6"
7457
- }, /*#__PURE__*/React__default.createElement(ItemProduct, {
7458
- product: item.productInfo,
7459
- shopConfigStyle: shopConfigStyle
7460
- }));
7461
- }
7526
+ renderItem: (item, index) => /*#__PURE__*/React__default.createElement("div", {
7527
+ key: `carousel-${index}`,
7528
+ className: " min-w-[40vw] object-cover sm:min-w-[25vw] lg:min-w-[22vw] xl:min-w-[20vw] pe-4 xl:pe-6"
7529
+ }, /*#__PURE__*/React__default.createElement(ItemProduct, {
7530
+ product: item.productInfo,
7531
+ shopConfigStyle: shopConfigStyle
7532
+ }))
7462
7533
  })));
7463
7534
  };
7464
7535
 
7465
- var CarouselItem = function CarouselItem(props) {
7466
- var listRef = useRef(null);
7467
- var _useState = useState(false),
7468
- isScrolledToLeft = _useState[0],
7469
- setIsScrolledToLeft = _useState[1];
7470
- var _useState2 = useState(true),
7471
- isScrolledToRight = _useState2[0],
7472
- setIsScrolledToRight = _useState2[1];
7473
- var _props$datas = props.datas,
7474
- datas = _props$datas === void 0 ? [] : _props$datas,
7475
- _props$className = props.className,
7476
- className = _props$className === void 0 ? "" : _props$className,
7477
- _props$style = props.style,
7478
- style = _props$style === void 0 ? {} : _props$style,
7479
- _props$primaryColor = props.primaryColor,
7480
- primaryColor = _props$primaryColor === void 0 ? "" : _props$primaryColor,
7481
- _props$textButtonColo = props.textButtonColor,
7482
- textButtonColor = _props$textButtonColo === void 0 ? "" : _props$textButtonColo,
7483
- _props$renderItem = props.renderItem,
7484
- renderItem = _props$renderItem === void 0 ? function () {} : _props$renderItem;
7485
- var handleClickPrevImg = function handleClickPrevImg() {
7536
+ const CarouselItem = props => {
7537
+ const listRef = useRef(null);
7538
+ const [isScrolledToLeft, setIsScrolledToLeft] = useState(false);
7539
+ const [isScrolledToRight, setIsScrolledToRight] = useState(true);
7540
+ const {
7541
+ datas = [],
7542
+ className = "",
7543
+ style = {},
7544
+ primaryColor = "",
7545
+ textButtonColor = "",
7546
+ renderItem = () => {}
7547
+ } = props;
7548
+ const handleClickPrevImg = () => {
7486
7549
  if (listRef.current) {
7487
7550
  setIsScrolledToLeft(true);
7488
7551
  setIsScrolledToRight(false);
@@ -7492,7 +7555,7 @@ var CarouselItem = function CarouselItem(props) {
7492
7555
  });
7493
7556
  }
7494
7557
  };
7495
- var handleClickNextImg = function handleClickNextImg() {
7558
+ const handleClickNextImg = () => {
7496
7559
  setIsScrolledToRight(true);
7497
7560
  setIsScrolledToLeft(false);
7498
7561
  if (listRef.current) {
@@ -7504,16 +7567,14 @@ var CarouselItem = function CarouselItem(props) {
7504
7567
  };
7505
7568
  console.log("check propsss::::::::", datas);
7506
7569
  return /*#__PURE__*/React__default.createElement("div", {
7507
- className: "grid grid-cols-12 h-12 " + className,
7570
+ className: `grid grid-cols-12 h-12 ${className}`,
7508
7571
  style: style
7509
7572
  }, /*#__PURE__*/React__default.createElement("div", {
7510
7573
  className: "col-span-12 lg:col-span-10 md:col-span-9 overflow-hidden "
7511
7574
  }, /*#__PURE__*/React__default.createElement("div", {
7512
7575
  className: "flex overflow-x-auto gap-2 hide-scrollbar items-center",
7513
7576
  ref: listRef
7514
- }, datas && datas.length > 0 && datas.map(function (item, index) {
7515
- return renderItem(item, index);
7516
- }))), datas && datas.length > 0 && /*#__PURE__*/React__default.createElement("div", {
7577
+ }, datas && datas.length > 0 && datas.map((item, index) => renderItem(item, index)))), datas && datas.length > 0 && /*#__PURE__*/React__default.createElement("div", {
7517
7578
  className: "hidden my-auto col-span-5 md:col-span-3 lg:col-span-2 gap-4 md:flex justify-end "
7518
7579
  }, /*#__PURE__*/React__default.createElement("button", {
7519
7580
  className: " px-4 py-3 rounded-full",
@@ -7540,46 +7601,38 @@ var CarouselItem = function CarouselItem(props) {
7540
7601
  }))));
7541
7602
  };
7542
7603
 
7543
- var ListProduct = function ListProduct(props) {
7544
- var _props$datas = props.datas,
7545
- datas = _props$datas === void 0 ? [] : _props$datas,
7546
- _props$style = props.style,
7547
- style = _props$style === void 0 ? {} : _props$style,
7548
- _props$className = props.className,
7549
- className = _props$className === void 0 ? {} : _props$className,
7550
- _props$renderItem = props.renderItem,
7551
- renderItem = _props$renderItem === void 0 ? function () {} : _props$renderItem;
7604
+ const ListProduct = props => {
7605
+ const {
7606
+ datas = [],
7607
+ style = {},
7608
+ className = {},
7609
+ renderItem = () => {}
7610
+ } = props;
7552
7611
  return /*#__PURE__*/React__default.createElement("div", {
7553
- className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-4 2xl:grid-cols-5 mt-6 " + className,
7612
+ className: `grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-4 2xl:grid-cols-5 mt-6 ${className}`,
7554
7613
  style: style
7555
- }, datas && datas.length > 0 && datas.map(function (item, index) {
7556
- return renderItem(item, index);
7557
- }));
7558
- };
7559
-
7560
- var Products10 = function Products10(props) {
7561
- var _useState = useState(""),
7562
- selectCategory = _useState[0],
7563
- setSelectCategory = _useState[1];
7564
- var shopConfigStyle = props.shopConfigStyle,
7565
- data = props.data;
7566
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
7567
- _shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
7568
- primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
7569
- _shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
7570
- textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
7571
- _shopConfigStyle$colo4 = _shopConfigStyle$colo.textButton,
7572
- textButton = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
7573
- _shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
7574
- background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5,
7575
- _shopConfigStyle$colo6 = _shopConfigStyle$colo.bgSecondary,
7576
- bgSecondary = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
7577
- var _CategoryController = CategoryController(props),
7578
- _CategoryController$c = _CategoryController.categories,
7579
- categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
7580
- var _ProductController = ProductController(props),
7581
- _ProductController$pr = _ProductController.products,
7582
- products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
7614
+ }, datas && datas.length > 0 && datas.map((item, index) => renderItem(item, index)));
7615
+ };
7616
+
7617
+ const Products10 = props => {
7618
+ const [selectCategory, setSelectCategory] = useState("");
7619
+ const {
7620
+ shopConfigStyle,
7621
+ data
7622
+ } = props;
7623
+ const {
7624
+ primary = "#000",
7625
+ textBody = "#000",
7626
+ textButton = "#fff",
7627
+ background = "#fff",
7628
+ bgSecondary = "#fff"
7629
+ } = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
7630
+ const {
7631
+ categories = []
7632
+ } = CategoryController(props);
7633
+ const {
7634
+ products = []
7635
+ } = ProductController(props);
7583
7636
  console.log("Products10 products");
7584
7637
  return /*#__PURE__*/React__default.createElement("div", {
7585
7638
  className: "w-full pt-10 px-4 xl:px-20",
@@ -7593,42 +7646,40 @@ var Products10 = function Products10(props) {
7593
7646
  datas: categories,
7594
7647
  primaryColor: primary,
7595
7648
  textButtonColor: textButton,
7596
- renderItem: function renderItem(item, index) {
7597
- return /*#__PURE__*/React__default.createElement("div", {
7598
- key: item.categoryId + "-" + index,
7599
- className: "border-2 items whitespace-nowrap p-2 rounded-lg cursor-pointer ",
7600
- style: {
7601
- borderColor: primary,
7602
- color: selectCategory === item.categoryId ? textButton : primary,
7603
- background: selectCategory === item.categoryId ? primary : bgSecondary
7604
- },
7605
- onClick: function onClick() {
7606
- setSelectCategory(item.categoryId);
7607
- }
7608
- }, item.cateName);
7609
- }
7649
+ renderItem: (item, index) => /*#__PURE__*/React__default.createElement("div", {
7650
+ key: `${item.categoryId}-${index}`,
7651
+ className: `border-2 items whitespace-nowrap p-2 rounded-lg cursor-pointer `,
7652
+ style: {
7653
+ borderColor: primary,
7654
+ color: selectCategory === item.categoryId ? textButton : primary,
7655
+ background: selectCategory === item.categoryId ? primary : bgSecondary
7656
+ },
7657
+ onClick: () => {
7658
+ setSelectCategory(item.categoryId);
7659
+ }
7660
+ }, item.cateName)
7610
7661
  }), /*#__PURE__*/React__default.createElement(ListProduct, {
7611
7662
  datas: products,
7612
- renderItem: function renderItem(item, index) {
7613
- return /*#__PURE__*/React__default.createElement("div", {
7614
- key: "productfsd-" + index
7615
- }, /*#__PURE__*/React__default.createElement(ItemProduct, {
7616
- product: item.productInfo,
7617
- shopConfigStyle: shopConfigStyle
7618
- }));
7619
- }
7663
+ renderItem: (item, index) => /*#__PURE__*/React__default.createElement("div", {
7664
+ key: `productfsd-${index}`
7665
+ }, /*#__PURE__*/React__default.createElement(ItemProduct, {
7666
+ product: item.productInfo,
7667
+ shopConfigStyle: shopConfigStyle
7668
+ }))
7620
7669
  }));
7621
7670
  };
7622
7671
 
7623
- var ProductsTop1 = function ProductsTop1(props) {
7624
- var data = props.data,
7625
- shopConfigStyle = props.shopConfigStyle;
7626
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
7627
- _shopConfigStyle$colo2 = _shopConfigStyle$colo.background,
7628
- background = _shopConfigStyle$colo2 === void 0 ? "#fff" : _shopConfigStyle$colo2;
7629
- var _ProductController = ProductController(props),
7630
- _ProductController$pr = _ProductController.products,
7631
- products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
7672
+ const ProductsTop1 = props => {
7673
+ const {
7674
+ data,
7675
+ shopConfigStyle
7676
+ } = props;
7677
+ const {
7678
+ background = "#fff"
7679
+ } = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
7680
+ const {
7681
+ products = []
7682
+ } = ProductController(props);
7632
7683
  console.log("ProductsTop1 products");
7633
7684
  return /*#__PURE__*/React__default.createElement("div", {
7634
7685
  className: "w-full pt-10 px-4 xl:px-20",
@@ -7639,155 +7690,93 @@ var ProductsTop1 = function ProductsTop1(props) {
7639
7690
  className: "text-2xl md:text-3xl lg:text-4xl font-semibold mb-6"
7640
7691
  }, data === null || data === void 0 ? void 0 : data.sectionTitle), /*#__PURE__*/React__default.createElement(ListProduct, {
7641
7692
  datas: products,
7642
- renderItem: function renderItem(item, index) {
7643
- return /*#__PURE__*/React__default.createElement("div", {
7644
- key: "productfsd-" + index
7645
- }, /*#__PURE__*/React__default.createElement(ItemProduct, {
7646
- product: item.productInfo,
7647
- shopConfigStyle: shopConfigStyle
7648
- }));
7649
- }
7693
+ renderItem: (item, index) => /*#__PURE__*/React__default.createElement("div", {
7694
+ key: `productfsd-${index}`
7695
+ }, /*#__PURE__*/React__default.createElement(ItemProduct, {
7696
+ product: item.productInfo,
7697
+ shopConfigStyle: shopConfigStyle
7698
+ }))
7650
7699
  }));
7651
7700
  };
7652
7701
 
7653
- var getEmployeeListApi = function getEmployeeListApi(shopId) {
7702
+ const getEmployeeListApi = shopId => {
7654
7703
  return api({
7655
7704
  method: "post",
7656
- url: "/chain-employment-profile/filter-employ-by-customer",
7705
+ url: `/chain-employment-profile/filter-employ-by-customer`,
7657
7706
  headers: {
7658
- shopId: shopId
7707
+ shopId
7659
7708
  }
7660
7709
  });
7661
7710
  };
7662
7711
 
7663
- var EmployeeController = function EmployeeController(props) {
7664
- var _props$isAutoGetList = props.isAutoGetList,
7665
- isAutoGetList = _props$isAutoGetList === void 0 ? true : _props$isAutoGetList,
7666
- shopConfig = props.shopConfig;
7667
- var _useState = useState([]),
7668
- listEmployment = _useState[0],
7669
- setListEmployment = _useState[1];
7670
- useEffect(function () {
7712
+ const EmployeeController = props => {
7713
+ const {
7714
+ isAutoGetList = true,
7715
+ shopConfig
7716
+ } = props;
7717
+ const [listEmployment, setListEmployment] = useState([]);
7718
+ useEffect(() => {
7671
7719
  if (isAutoGetList) {
7672
7720
  getListEmployee();
7673
7721
  }
7674
7722
  }, [isAutoGetList]);
7675
- var getListEmployee = function getListEmployee() {
7723
+ const getListEmployee = async () => {
7676
7724
  try {
7677
- return Promise.resolve(_catch(function () {
7678
- return Promise.resolve(getEmployeeListApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId)).then(function (res) {
7679
- var _res$data, _res$data$status;
7680
- 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) {
7681
- var _res$data2;
7682
- setListEmployment((res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data) || []);
7683
- }
7684
- return res;
7685
- });
7686
- }, function (e) {
7687
- console.log(e);
7688
- }));
7725
+ var _res$data, _res$data$status;
7726
+ const res = await getEmployeeListApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId);
7727
+ 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) {
7728
+ var _res$data2;
7729
+ setListEmployment((res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data) || []);
7730
+ }
7731
+ return res;
7689
7732
  } catch (e) {
7690
- return Promise.reject(e);
7733
+ console.log(e);
7691
7734
  }
7692
7735
  };
7693
7736
  return {
7694
- listEmployment: listEmployment,
7695
- getListEmployee: getListEmployee
7737
+ listEmployment,
7738
+ getListEmployee
7696
7739
  };
7697
7740
  };
7698
7741
 
7699
- var createSpaScheduleApi = function createSpaScheduleApi(shopId, data) {
7700
- return api({
7701
- method: "post",
7702
- url: "/spa-schedule/customer/create",
7703
- data: data,
7704
- headers: {
7705
- shopId: shopId
7706
- }
7707
- });
7708
- };
7709
-
7710
- var _excluded = ["productName"];
7711
- var BookingController = function BookingController(props) {
7712
- _objectDestructuringEmpty(props);
7713
- var createSchedule = function createSchedule(customerName, customerPhone, scheduleDate, services, shopId) {
7714
- try {
7715
- return Promise.resolve(_catch(function () {
7716
- var data = {
7717
- appId: "SSPA",
7718
- customerName: customerName,
7719
- customerPhone: customerPhone.replace("+", ""),
7720
- isSellService: true,
7721
- scheduleDate: new Date(scheduleDate).getTime(),
7722
- services: services === null || services === void 0 ? void 0 : services.map(function (_ref) {
7723
- var productName = _ref.productName,
7724
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
7725
- return rest;
7726
- }),
7727
- shopId: shopId
7728
- };
7729
- return Promise.resolve(createSpaScheduleApi(shopId, data));
7730
- }, function (e) {
7731
- console.log(e);
7732
- }));
7733
- } catch (e) {
7734
- return Promise.reject(e);
7742
+ const Input = forwardRef((props, ref) => {
7743
+ const {
7744
+ label = "",
7745
+ placeholder = "",
7746
+ className = "",
7747
+ name = "",
7748
+ style = {},
7749
+ onChange = () => {},
7750
+ defaultValue = "",
7751
+ type = "text",
7752
+ rules = []
7753
+ } = props;
7754
+ const [value, setValue] = useState(defaultValue);
7755
+ const [error, setError] = useState("");
7756
+ useImperativeHandle(ref, () => ({
7757
+ validateData() {
7758
+ return validateData();
7759
+ },
7760
+ setValue(text) {
7761
+ return setValue(text);
7762
+ },
7763
+ getValue() {
7764
+ return value();
7765
+ },
7766
+ setError(err) {
7767
+ return setError(err);
7735
7768
  }
7736
- };
7737
- return {
7738
- createSchedule: createSchedule
7739
- };
7740
- };
7741
-
7742
- var Input = forwardRef(function (props, ref) {
7743
- var _props$label = props.label,
7744
- label = _props$label === void 0 ? "" : _props$label,
7745
- _props$placeholder = props.placeholder,
7746
- placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
7747
- _props$className = props.className,
7748
- className = _props$className === void 0 ? "" : _props$className,
7749
- _props$name = props.name,
7750
- name = _props$name === void 0 ? "" : _props$name,
7751
- _props$onChange = props.onChange,
7752
- onChange = _props$onChange === void 0 ? function () {} : _props$onChange,
7753
- _props$defaultValue = props.defaultValue,
7754
- defaultValue = _props$defaultValue === void 0 ? "" : _props$defaultValue,
7755
- _props$type = props.type,
7756
- type = _props$type === void 0 ? "text" : _props$type,
7757
- _props$rules = props.rules,
7758
- rules = _props$rules === void 0 ? [] : _props$rules;
7759
- var _useState = useState(defaultValue),
7760
- value = _useState[0],
7761
- _setValue = _useState[1];
7762
- var _useState2 = useState(""),
7763
- error = _useState2[0],
7764
- _setError = _useState2[1];
7765
- useImperativeHandle(ref, function () {
7766
- return {
7767
- validateData: function validateData() {
7768
- return _validateData();
7769
- },
7770
- setValue: function setValue(text) {
7771
- return _setValue(text);
7772
- },
7773
- getValue: function getValue() {
7774
- return value();
7775
- },
7776
- setError: function setError(err) {
7777
- return _setError(err);
7778
- }
7779
- };
7780
- });
7781
- var _validateData = function _validateData() {
7782
- var count = 0;
7783
- rules.forEach(function (e) {
7769
+ }));
7770
+ const validateData = () => {
7771
+ let count = 0;
7772
+ rules.forEach(e => {
7784
7773
  var _e$pattern;
7785
7774
  if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
7786
- _setError(e === null || e === void 0 ? void 0 : e.message);
7775
+ setError(e === null || e === void 0 ? void 0 : e.message);
7787
7776
  count++;
7788
7777
  return false;
7789
7778
  } 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))) {
7790
- _setError(e === null || e === void 0 ? void 0 : e.message);
7779
+ setError(e === null || e === void 0 ? void 0 : e.message);
7791
7780
  count++;
7792
7781
  return false;
7793
7782
  }
@@ -7795,20 +7784,20 @@ var Input = forwardRef(function (props, ref) {
7795
7784
  if (count) {
7796
7785
  return false;
7797
7786
  } else {
7798
- _setError('');
7787
+ setError('');
7799
7788
  return true;
7800
7789
  }
7801
7790
  };
7802
- var handleOnChange = function handleOnChange(event) {
7803
- var value = event.target.value;
7804
- _setValue(value);
7791
+ const handleOnChange = event => {
7792
+ const {
7793
+ value
7794
+ } = event.target;
7795
+ setValue(value);
7805
7796
  onChange === null || onChange === void 0 ? void 0 : onChange(value);
7806
7797
  };
7807
- var _className = "h-10 py-1 px-2 border border-stroke rounded " + className;
7808
- var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
7809
- return (e === null || e === void 0 ? void 0 : e.type) === "required";
7810
- }));
7811
- var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
7798
+ const _className = `h-10 py-1 px-2 border border-stroke rounded ${className}`;
7799
+ const required = !!(rules !== null && rules !== void 0 && rules.find(e => (e === null || e === void 0 ? void 0 : e.type) === "required"));
7800
+ const labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
7812
7801
  className: "text-danger"
7813
7802
  }, " *") : null;
7814
7803
  return /*#__PURE__*/React__default.createElement("div", null, label ? /*#__PURE__*/React__default.createElement("div", {
@@ -7824,57 +7813,46 @@ var Input = forwardRef(function (props, ref) {
7824
7813
  }), error ? /*#__PURE__*/React__default.createElement("div", null, error) : null);
7825
7814
  });
7826
7815
 
7827
- var Select = forwardRef(function (props, ref) {
7828
- var _props$label = props.label,
7829
- label = _props$label === void 0 ? "" : _props$label,
7830
- _props$placeholder = props.placeholder,
7831
- placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
7832
- _props$className = props.className,
7833
- className = _props$className === void 0 ? "" : _props$className,
7834
- _props$name = props.name,
7835
- name = _props$name === void 0 ? "" : _props$name,
7836
- _props$onChange = props.onChange,
7837
- onChange = _props$onChange === void 0 ? function () {} : _props$onChange,
7838
- _props$defaultValue = props.defaultValue,
7839
- defaultValue = _props$defaultValue === void 0 ? null : _props$defaultValue,
7840
- _props$rules = props.rules,
7841
- rules = _props$rules === void 0 ? [] : _props$rules,
7842
- _props$options = props.options,
7843
- options = _props$options === void 0 ? [] : _props$options,
7844
- _props$required = props.required,
7845
- required = _props$required === void 0 ? false : _props$required;
7846
- var _useState = useState(defaultValue),
7847
- value = _useState[0],
7848
- _setValue = _useState[1];
7849
- var _useState2 = useState(""),
7850
- error = _useState2[0],
7851
- _setError = _useState2[1];
7852
- useImperativeHandle(ref, function () {
7853
- return {
7854
- validateData: function validateData() {
7855
- return _validateData();
7856
- },
7857
- setValue: function setValue(text) {
7858
- return _setValue(text);
7859
- },
7860
- getValue: function getValue() {
7861
- return value();
7862
- },
7863
- setError: function setError(err) {
7864
- return _setError(err);
7865
- }
7866
- };
7867
- });
7868
- var _validateData = function _validateData() {
7869
- var count = 0;
7870
- rules.forEach(function (e) {
7816
+ const Select = forwardRef((props, ref) => {
7817
+ const {
7818
+ label = "",
7819
+ placeholder = "",
7820
+ className = "",
7821
+ name = "",
7822
+ style = {},
7823
+ onChange = () => {},
7824
+ defaultValue = null,
7825
+ type = "text",
7826
+ rules = [],
7827
+ options = [],
7828
+ required = false
7829
+ } = props;
7830
+ const [value, setValue] = useState(defaultValue);
7831
+ const [error, setError] = useState("");
7832
+ useImperativeHandle(ref, () => ({
7833
+ validateData() {
7834
+ return validateData();
7835
+ },
7836
+ setValue(text) {
7837
+ return setValue(text);
7838
+ },
7839
+ getValue() {
7840
+ return value();
7841
+ },
7842
+ setError(err) {
7843
+ return setError(err);
7844
+ }
7845
+ }));
7846
+ const validateData = () => {
7847
+ let count = 0;
7848
+ rules.forEach(e => {
7871
7849
  var _e$pattern;
7872
7850
  if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
7873
- _setError(e === null || e === void 0 ? void 0 : e.message);
7851
+ setError(e === null || e === void 0 ? void 0 : e.message);
7874
7852
  count++;
7875
7853
  return false;
7876
7854
  } 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))) {
7877
- _setError(e === null || e === void 0 ? void 0 : e.message);
7855
+ setError(e === null || e === void 0 ? void 0 : e.message);
7878
7856
  count++;
7879
7857
  return false;
7880
7858
  }
@@ -7882,17 +7860,19 @@ var Select = forwardRef(function (props, ref) {
7882
7860
  if (count) {
7883
7861
  return false;
7884
7862
  } else {
7885
- _setError('');
7863
+ setError('');
7886
7864
  return true;
7887
7865
  }
7888
7866
  };
7889
- var handleOnChange = function handleOnChange(event) {
7890
- var value = event.target.value;
7891
- _setValue(value);
7867
+ const handleOnChange = event => {
7868
+ const {
7869
+ value
7870
+ } = event.target;
7871
+ setValue(value);
7892
7872
  onChange === null || onChange === void 0 ? void 0 : onChange(value);
7893
7873
  };
7894
- var _className = "h-10 py-1 px-2 border border-stroke rounded " + className;
7895
- var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
7874
+ const _className = `h-10 py-1 px-2 border border-stroke rounded ${className}`;
7875
+ const labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
7896
7876
  className: "text-danger"
7897
7877
  }, " *") : null;
7898
7878
  return /*#__PURE__*/React__default.createElement("div", null, label ? /*#__PURE__*/React__default.createElement("div", {
@@ -7908,51 +7888,45 @@ var Select = forwardRef(function (props, ref) {
7908
7888
  disabled: true,
7909
7889
  selected: true,
7910
7890
  hidden: true
7911
- }, placeholder), options === null || options === void 0 ? void 0 : options.map(function (option, index) {
7912
- return /*#__PURE__*/React__default.createElement("option", {
7913
- value: option.value,
7914
- key: index
7915
- }, option === null || option === void 0 ? void 0 : option.label);
7916
- })), error ? /*#__PURE__*/React__default.createElement("div", null, error) : null);
7891
+ }, placeholder), options === null || options === void 0 ? void 0 : options.map((option, index) => /*#__PURE__*/React__default.createElement("option", {
7892
+ value: option.value,
7893
+ key: index
7894
+ }, option === null || option === void 0 ? void 0 : option.label))), error ? /*#__PURE__*/React__default.createElement("div", null, error) : null);
7917
7895
  });
7918
7896
 
7919
- var DateTimePicker = function DateTimePicker(props) {
7920
- var _props$label = props.label,
7921
- label = _props$label === void 0 ? "" : _props$label,
7922
- _props$className = props.className,
7923
- className = _props$className === void 0 ? "" : _props$className,
7924
- _props$defaultValue = props.defaultValue,
7925
- defaultValue = _props$defaultValue === void 0 ? new Date() : _props$defaultValue,
7926
- _props$required = props.required,
7927
- required = _props$required === void 0 ? false : _props$required;
7928
- var _useState = useState(defaultValue),
7929
- value = _useState[0],
7930
- setValue = _useState[1];
7931
- var _useState2 = useState(""),
7932
- error = _useState2[0];
7933
- var _className = "h-10 flex items-center py-1 px-2 border border-stroke rounded bg-white cursor-pointer " + className;
7934
- var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
7897
+ const DateTimePicker = props => {
7898
+ const {
7899
+ label = "",
7900
+ placeholder = "",
7901
+ className = "",
7902
+ name = "",
7903
+ style = {},
7904
+ onChange = () => {},
7905
+ defaultValue = new Date(),
7906
+ required = false
7907
+ } = props;
7908
+ const [value, setValue] = useState(defaultValue);
7909
+ const [error, setError] = useState("");
7910
+ const _className = `h-10 flex items-center py-1 px-2 border border-stroke rounded bg-white cursor-pointer ${className}`;
7911
+ const labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
7935
7912
  className: "text-danger"
7936
7913
  }, " *") : null;
7937
- var CustomInput = forwardRef(function (_ref, ref) {
7938
- var value = _ref.value,
7939
- onClick = _ref.onClick,
7940
- className = _ref.className;
7941
- return /*#__PURE__*/React__default.createElement("div", {
7942
- className: className,
7943
- onClick: onClick,
7944
- ref: ref
7945
- }, value);
7946
- });
7914
+ const CustomInput = forwardRef(({
7915
+ value,
7916
+ onClick,
7917
+ className
7918
+ }, ref) => /*#__PURE__*/React__default.createElement("div", {
7919
+ className: className,
7920
+ onClick: onClick,
7921
+ ref: ref
7922
+ }, value));
7947
7923
  return /*#__PURE__*/React__default.createElement("div", {
7948
7924
  className: "w-full"
7949
7925
  }, label ? /*#__PURE__*/React__default.createElement("div", {
7950
7926
  className: "mb-1"
7951
7927
  }, label, labelRequired) : null, /*#__PURE__*/React__default.createElement(DatePicker, {
7952
7928
  selected: value,
7953
- onChange: function onChange(date) {
7954
- return setValue(date);
7955
- },
7929
+ onChange: date => setValue(date),
7956
7930
  customInput: /*#__PURE__*/React__default.createElement(CustomInput, {
7957
7931
  className: _className
7958
7932
  }),
@@ -7960,30 +7934,37 @@ var DateTimePicker = function DateTimePicker(props) {
7960
7934
  }), error ? /*#__PURE__*/React__default.createElement("div", null, error) : null);
7961
7935
  };
7962
7936
 
7963
- var BookingForm = function BookingForm(props) {
7964
- var _props$shopConfigStyl = props.shopConfigStyle,
7965
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
7966
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
7967
- _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
7968
- secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
7969
- var _useState = useState(false),
7970
- isAutoGetListProduct = _useState[0];
7971
- var _useState2 = useState({
7972
- types: "1,10"
7973
- }),
7974
- productsParams = _useState2[0];
7975
- var _useState3 = useState(false),
7976
- isAutoGetListEmployee = _useState3[0];
7977
- var _useState4 = useState(new Date());
7978
- var _EmployeeController = EmployeeController(_extends({}, props, {
7979
- isAutoGetList: isAutoGetListEmployee
7980
- }));
7981
- var _ProductController = ProductController(_extends({}, props, {
7982
- isAutoGetList: isAutoGetListProduct,
7983
- params: productsParams
7984
- }));
7937
+ const BookingForm = props => {
7938
+ const {
7939
+ shopConfig = {},
7940
+ shopConfigStyle = {}
7941
+ } = props;
7942
+ const {
7943
+ primary = "#000",
7944
+ secondary = "#000",
7945
+ textBody = "#000",
7946
+ background = "#fff"
7947
+ } = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
7948
+ const [isAutoGetListProduct, setIsAutoGetListProduct] = useState(false);
7949
+ const [productsParams, setProductsParams] = useState({
7950
+ types: "1,10"
7951
+ });
7952
+ const [isAutoGetListEmployee, setIsAutoGetListEmployee] = useState(false);
7953
+ const [startDate, setStartDate] = useState(new Date());
7954
+ const {
7955
+ listEmployment = []
7956
+ } = EmployeeController({
7957
+ ...props,
7958
+ isAutoGetList: isAutoGetListEmployee
7959
+ });
7960
+ const {
7961
+ products
7962
+ } = ProductController({
7963
+ ...props,
7964
+ isAutoGetList: isAutoGetListProduct,
7965
+ params: productsParams
7966
+ });
7985
7967
  console.log("BookingForm products");
7986
- var _BookingController = BookingController(props);
7987
7968
  return /*#__PURE__*/React__default.createElement("div", {
7988
7969
  className: "grid gap-4 rounded-lg p-6",
7989
7970
  style: {
@@ -8032,19 +8013,20 @@ var BookingForm = function BookingForm(props) {
8032
8013
  })));
8033
8014
  };
8034
8015
 
8035
- var Booking1 = function Booking1(props) {
8016
+ const Booking1 = props => {
8036
8017
  var _data$data, _data$data$, _data$data2, _data$data2$;
8037
- var _props$shopConfigStyl = props.shopConfigStyle,
8038
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
8039
- _props$shopConfig = props.shopConfig,
8040
- shopConfig = _props$shopConfig === void 0 ? {} : _props$shopConfig,
8041
- _props$data = props.data,
8042
- data = _props$data === void 0 ? {} : _props$data,
8043
- _props$SectionTitle = props.SectionTitle,
8044
- SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
8045
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
8046
- _shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
8047
- background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
8018
+ const {
8019
+ shopConfigStyle = {},
8020
+ shopConfig = {},
8021
+ data = {},
8022
+ SectionTitle = null
8023
+ } = props;
8024
+ const {
8025
+ primary = "#000",
8026
+ secondary = "#000",
8027
+ textBody = "#000",
8028
+ background = "#fff"
8029
+ } = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
8048
8030
  console.log("booking data", data);
8049
8031
  return /*#__PURE__*/React__default.createElement("div", {
8050
8032
  className: "relative w-full px-4 xl:px-20 py-12",
@@ -8066,34 +8048,40 @@ var Booking1 = function Booking1(props) {
8066
8048
  }, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.description))));
8067
8049
  };
8068
8050
 
8069
- var Banner1 = function Banner1(props) {
8070
- var data = props.data;
8071
- var sectionData = data === null || data === void 0 ? void 0 : data.data;
8051
+ const Banner1 = props => {
8052
+ const {
8053
+ data
8054
+ } = props;
8055
+ const sectionData = data === null || data === void 0 ? void 0 : data.data;
8072
8056
  return /*#__PURE__*/React__default.createElement("div", {
8073
8057
  className: "w-full pt-10 px-4 xl:px-20 bg-background"
8074
8058
  }, /*#__PURE__*/React__default.createElement("h3", {
8075
8059
  className: "text-2xl lg:text-3xl xl:text-4xl font-semibold"
8076
8060
  }, data === null || data === void 0 ? void 0 : data.sectionTitle), /*#__PURE__*/React__default.createElement("div", {
8077
8061
  className: "grid grid-cols-1 sm:grid-cols-3 gap-6 mt-6"
8078
- }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
8062
+ }, sectionData && sectionData.length > 0 && sectionData.map((item, index) => {
8079
8063
  return /*#__PURE__*/React__default.createElement("img", {
8080
8064
  src: item === null || item === void 0 ? void 0 : item.srcImage,
8081
8065
  alt: "",
8082
8066
  className: "rounded-2xl",
8083
- key: "hnfhn-" + index
8067
+ key: `hnfhn-${index}`
8084
8068
  });
8085
8069
  })));
8086
8070
  };
8087
8071
 
8088
- var Partner1 = function Partner1(props) {
8089
- var shopConfigStyle = props.shopConfigStyle,
8090
- data = props.data;
8091
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
8092
- _shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
8093
- background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5,
8094
- _shopConfigStyle$colo6 = _shopConfigStyle$colo.bgSecondary,
8095
- bgSecondary = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
8096
- var sectionData = data === null || data === void 0 ? void 0 : data.data;
8072
+ const Partner1 = props => {
8073
+ const {
8074
+ shopConfigStyle,
8075
+ data
8076
+ } = props;
8077
+ const {
8078
+ primary = "#000",
8079
+ textBody = "#000",
8080
+ textButton = "#fff",
8081
+ background = "#fff",
8082
+ bgSecondary = "#fff"
8083
+ } = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
8084
+ const sectionData = data === null || data === void 0 ? void 0 : data.data;
8097
8085
  return /*#__PURE__*/React__default.createElement("div", {
8098
8086
  className: "w-full pt-10 px-4 xl:px-20",
8099
8087
  style: {
@@ -8106,9 +8094,9 @@ var Partner1 = function Partner1(props) {
8106
8094
  style: {
8107
8095
  background: bgSecondary
8108
8096
  }
8109
- }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
8097
+ }, sectionData && sectionData.length > 0 && sectionData.map((item, index) => {
8110
8098
  return /*#__PURE__*/React__default.createElement("div", {
8111
- key: "xfriidj-" + index
8099
+ key: `xfriidj-${index}`
8112
8100
  }, /*#__PURE__*/React__default.createElement("img", {
8113
8101
  src: item.srcImage,
8114
8102
  alt: ""
@@ -8116,17 +8104,19 @@ var Partner1 = function Partner1(props) {
8116
8104
  })));
8117
8105
  };
8118
8106
 
8119
- var Address1 = function Address1(props) {
8120
- var shopConfigStyle = props.shopConfigStyle,
8121
- data = props.data;
8122
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
8123
- _shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
8124
- textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
8125
- _shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
8126
- background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5,
8127
- _shopConfigStyle$colo6 = _shopConfigStyle$colo.bgSecondary,
8128
- bgSecondary = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
8129
- var sectionData = data === null || data === void 0 ? void 0 : data.data;
8107
+ const Address1 = props => {
8108
+ const {
8109
+ shopConfigStyle,
8110
+ data
8111
+ } = props;
8112
+ const {
8113
+ primary = "#000",
8114
+ textBody = "#000",
8115
+ textButton = "#fff",
8116
+ background = "#fff",
8117
+ bgSecondary = "#fff"
8118
+ } = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
8119
+ const sectionData = data === null || data === void 0 ? void 0 : data.data;
8130
8120
  return /*#__PURE__*/React__default.createElement("div", {
8131
8121
  className: "w-full pt-10 px-4 xl:px-20 ",
8132
8122
  style: {
@@ -8137,10 +8127,10 @@ var Address1 = function Address1(props) {
8137
8127
  className: "text-2xl lg:text-3xl xl:text-4xl font-semibold"
8138
8128
  }, data === null || data === void 0 ? void 0 : data.sectionTitle), /*#__PURE__*/React__default.createElement("div", {
8139
8129
  className: "grid grid-cols-2 sm:grid-cols-3 gap-4 mt-6 "
8140
- }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
8130
+ }, sectionData && sectionData.length > 0 && sectionData.map((item, index) => {
8141
8131
  return /*#__PURE__*/React__default.createElement("div", {
8142
8132
  className: "lg:leading-6 p-4 rounded-xl",
8143
- key: "fyfoy-" + index,
8133
+ key: `fyfoy-${index}`,
8144
8134
  style: {
8145
8135
  background: bgSecondary
8146
8136
  }
@@ -8158,14 +8148,16 @@ var Address1 = function Address1(props) {
8158
8148
  })));
8159
8149
  };
8160
8150
 
8161
- var Links1 = function Links1(props) {
8162
- var data = props.data;
8163
- var sectionData = data === null || data === void 0 ? void 0 : data.data;
8151
+ const Links1 = props => {
8152
+ const {
8153
+ data
8154
+ } = props;
8155
+ const sectionData = data === null || data === void 0 ? void 0 : data.data;
8164
8156
  return /*#__PURE__*/React__default.createElement("div", {
8165
8157
  className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 w-full pt-10 px-4 xl:px-20 bg-background"
8166
- }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
8158
+ }, sectionData && sectionData.length > 0 && sectionData.map((item, index) => {
8167
8159
  return /*#__PURE__*/React__default.createElement("div", {
8168
- key: "qwikf-" + index
8160
+ key: `qwikf-${index}`
8169
8161
  }, /*#__PURE__*/React__default.createElement("h4", {
8170
8162
  className: "text-lg md:text-xl lg:text-2xl font-semibold mb-4"
8171
8163
  }, "\u0110a d\u1EA1ng thanh to\xE1n"), /*#__PURE__*/React__default.createElement("div", {
@@ -8182,17 +8174,17 @@ var Links1 = function Links1(props) {
8182
8174
  }));
8183
8175
  };
8184
8176
 
8185
- var Footer1 = function Footer1(props) {
8186
- var shopConfigStyle = props.shopConfigStyle;
8187
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
8188
- _shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
8189
- primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
8190
- _shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
8191
- textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
8192
- _shopConfigStyle$colo4 = _shopConfigStyle$colo.textButton,
8193
- textButton = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
8194
- _shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
8195
- bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
8177
+ const Footer1 = props => {
8178
+ const {
8179
+ shopConfigStyle,
8180
+ data
8181
+ } = props;
8182
+ const {
8183
+ primary = "#000",
8184
+ textBody = "#000",
8185
+ textButton = "#fff",
8186
+ bgSecondary = "#fff"
8187
+ } = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
8196
8188
  return /*#__PURE__*/React__default.createElement("div", {
8197
8189
  className: "footer px-4 py-10 xl:px-20 ",
8198
8190
  style: {
@@ -8279,49 +8271,49 @@ var Footer1 = function Footer1(props) {
8279
8271
  }, "Xem \u0111i\u1EC1u kho\u1EA3n v\xE0 ch\xEDnh s\xE1ch"))));
8280
8272
  };
8281
8273
 
8282
- var RatingStar = function RatingStar(props) {
8283
- var _props$star = props.star,
8284
- star = _props$star === void 0 ? 5 : _props$star,
8285
- _props$style = props.style,
8286
- style = _props$style === void 0 ? {} : _props$style,
8287
- _props$className = props.className,
8288
- className = _props$className === void 0 ? "" : _props$className;
8289
- var res = [];
8290
- for (var i = 1; i < star; i++) {
8274
+ const RatingStar = props => {
8275
+ const {
8276
+ star = 5,
8277
+ style = {},
8278
+ className = ""
8279
+ } = props;
8280
+ const res = [];
8281
+ for (let i = 1; i < star; i++) {
8291
8282
  res.push(/*#__PURE__*/React__default.createElement(FaStar, {
8292
8283
  color: "#E2B93B"
8293
8284
  }));
8294
8285
  }
8295
- var decimalPart = star % 1;
8286
+ const decimalPart = star % 1;
8296
8287
  if (decimalPart && decimalPart >= 0.5) {
8297
8288
  res.push(/*#__PURE__*/React__default.createElement(FaRegStarHalfStroke, {
8298
8289
  color: "#E2B93B"
8299
8290
  }));
8300
8291
  }
8301
- for (var _i = res === null || res === void 0 ? void 0 : res.length; _i < 5; _i++) {
8292
+ for (let i = res === null || res === void 0 ? void 0 : res.length; i < 5; i++) {
8302
8293
  res.push(/*#__PURE__*/React__default.createElement(FaRegStar, {
8303
8294
  color: "#E2B93B"
8304
8295
  }));
8305
8296
  }
8306
8297
  return /*#__PURE__*/React__default.createElement("div", {
8307
- className: "flex gap-1 " + className,
8298
+ className: `flex gap-1 ${className}`,
8308
8299
  style: style
8309
8300
  }, res);
8310
8301
  };
8311
8302
 
8312
- var CustomerRating10 = function CustomerRating10(props) {
8303
+ const CustomerRating10 = props => {
8313
8304
  var _data$data;
8314
- var _props$shopConfigStyl = props.shopConfigStyle,
8315
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
8316
- _props$data = props.data,
8317
- data = _props$data === void 0 ? {} : _props$data,
8318
- _props$SectionTitle = props.SectionTitle,
8319
- SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
8320
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
8321
- _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
8322
- secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
8323
- _shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
8324
- background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
8305
+ const {
8306
+ shopConfigStyle = {},
8307
+ shopConfig = {},
8308
+ data = {},
8309
+ SectionTitle = null
8310
+ } = props;
8311
+ const {
8312
+ primary = "#000",
8313
+ secondary = "#000",
8314
+ textBody = "#000",
8315
+ background = "#fff"
8316
+ } = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
8325
8317
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
8326
8318
  className: "relative w-full py-12 px-4 xl:px-20",
8327
8319
  style: {
@@ -8332,40 +8324,39 @@ var CustomerRating10 = function CustomerRating10(props) {
8332
8324
  shopConfigStyle: shopConfigStyle
8333
8325
  }), /*#__PURE__*/React__default.createElement("div", {
8334
8326
  className: "mt-12 grid grid-cols-1 md:grid-cols-2 gap-12"
8335
- }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, index) {
8336
- return /*#__PURE__*/React__default.createElement("div", {
8337
- key: index,
8338
- className: "flex"
8339
- }, /*#__PURE__*/React__default.createElement("img", {
8340
- src: item === null || item === void 0 ? void 0 : item.avatar,
8341
- className: "w-[136px] h-[136px] rounded-2xl"
8342
- }), /*#__PURE__*/React__default.createElement("div", {
8343
- className: "ml-4"
8344
- }, /*#__PURE__*/React__default.createElement(RatingStar, {
8345
- star: (item === null || item === void 0 ? void 0 : item.rate) || 5
8346
- }), /*#__PURE__*/React__default.createElement("div", {
8347
- className: "text-xl md:text-2xl mt-2"
8348
- }, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
8349
- className: "mt-2"
8350
- }, item === null || item === void 0 ? void 0 : item.content)));
8351
- }))), /*#__PURE__*/React__default.createElement(Dash, {
8327
+ }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map((item, index) => /*#__PURE__*/React__default.createElement("div", {
8328
+ key: index,
8329
+ className: "flex"
8330
+ }, /*#__PURE__*/React__default.createElement("img", {
8331
+ src: item === null || item === void 0 ? void 0 : item.avatar,
8332
+ className: "w-[136px] h-[136px] rounded-2xl"
8333
+ }), /*#__PURE__*/React__default.createElement("div", {
8334
+ className: "ml-4"
8335
+ }, /*#__PURE__*/React__default.createElement(RatingStar, {
8336
+ star: (item === null || item === void 0 ? void 0 : item.rate) || 5
8337
+ }), /*#__PURE__*/React__default.createElement("div", {
8338
+ className: "text-xl md:text-2xl mt-2"
8339
+ }, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
8340
+ className: "mt-2"
8341
+ }, item === null || item === void 0 ? void 0 : item.content)))))), /*#__PURE__*/React__default.createElement(Dash, {
8352
8342
  color: secondary
8353
8343
  }));
8354
8344
  };
8355
8345
 
8356
- var Employees1 = function Employees1(props) {
8346
+ const Employees1 = props => {
8357
8347
  var _data$data;
8358
- var _props$shopConfigStyl = props.shopConfigStyle,
8359
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
8360
- _props$data = props.data,
8361
- data = _props$data === void 0 ? {} : _props$data,
8362
- _props$SectionTitle = props.SectionTitle,
8363
- SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
8364
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
8365
- _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
8366
- secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
8367
- _shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
8368
- background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
8348
+ const {
8349
+ shopConfigStyle = {},
8350
+ shopConfig = {},
8351
+ data = {},
8352
+ SectionTitle = null
8353
+ } = props;
8354
+ const {
8355
+ primary = "#000",
8356
+ secondary = "#000",
8357
+ textBody = "#000",
8358
+ background = "#fff"
8359
+ } = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
8369
8360
  console.log("Employee data", data);
8370
8361
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
8371
8362
  className: "relative w-full py-12 px-4 xl:px-20",
@@ -8377,38 +8368,37 @@ var Employees1 = function Employees1(props) {
8377
8368
  shopConfigStyle: shopConfigStyle
8378
8369
  }), /*#__PURE__*/React__default.createElement("div", {
8379
8370
  className: "mt-12 grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 lg:gap-12"
8380
- }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, index) {
8381
- return /*#__PURE__*/React__default.createElement("div", {
8382
- key: index,
8383
- className: "w-full aspect-[3/4] relative overflow-hidden rounded-2xl"
8384
- }, /*#__PURE__*/React__default.createElement("div", {
8385
- className: "absolute bottom-0 h-1/2 w-full flex flex-col justify-end p-4 bg-gradient-to-t from-black to-transparent bg-opacity-70 text-center"
8386
- }, /*#__PURE__*/React__default.createElement("div", {
8387
- className: "text-2xl text-white"
8388
- }, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
8389
- className: "text-white mt-1"
8390
- }, item === null || item === void 0 ? void 0 : item.role)), /*#__PURE__*/React__default.createElement("img", {
8391
- src: item === null || item === void 0 ? void 0 : item.avatar,
8392
- className: "w-full h-full"
8393
- }));
8394
- }))), /*#__PURE__*/React__default.createElement(Dash, {
8371
+ }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map((item, index) => /*#__PURE__*/React__default.createElement("div", {
8372
+ key: index,
8373
+ className: "w-full aspect-[3/4] relative overflow-hidden rounded-2xl"
8374
+ }, /*#__PURE__*/React__default.createElement("div", {
8375
+ className: "absolute bottom-0 h-1/2 w-full flex flex-col justify-end p-4 bg-gradient-to-t from-black to-transparent bg-opacity-70 text-center"
8376
+ }, /*#__PURE__*/React__default.createElement("div", {
8377
+ className: "text-2xl text-white"
8378
+ }, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
8379
+ className: "text-white mt-1"
8380
+ }, item === null || item === void 0 ? void 0 : item.role)), /*#__PURE__*/React__default.createElement("img", {
8381
+ src: item === null || item === void 0 ? void 0 : item.avatar,
8382
+ className: "w-full h-full"
8383
+ }))))), /*#__PURE__*/React__default.createElement(Dash, {
8395
8384
  color: secondary
8396
8385
  }));
8397
8386
  };
8398
8387
 
8399
- var Gallery1 = function Gallery1(props) {
8388
+ const Gallery1 = props => {
8400
8389
  var _data$data;
8401
- var _props$shopConfigStyl = props.shopConfigStyle,
8402
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
8403
- _props$data = props.data,
8404
- data = _props$data === void 0 ? {} : _props$data,
8405
- _props$SectionTitle = props.SectionTitle,
8406
- SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
8407
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
8408
- _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
8409
- secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
8410
- _shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
8411
- background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
8390
+ const {
8391
+ shopConfigStyle = {},
8392
+ shopConfig = {},
8393
+ data = {},
8394
+ SectionTitle = null
8395
+ } = props;
8396
+ const {
8397
+ primary = "#000",
8398
+ secondary = "#000",
8399
+ textBody = "#000",
8400
+ background = "#fff"
8401
+ } = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
8412
8402
  console.log("Gallery1 data", data);
8413
8403
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
8414
8404
  className: "relative w-full py-12 px-4 xl:px-20",
@@ -8420,16 +8410,14 @@ var Gallery1 = function Gallery1(props) {
8420
8410
  shopConfigStyle: shopConfigStyle
8421
8411
  }), /*#__PURE__*/React__default.createElement("div", {
8422
8412
  className: "mt-6 grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-1 md:gap-2"
8423
- }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
8424
- return /*#__PURE__*/React__default.createElement("div", {
8425
- key: index
8426
- }, /*#__PURE__*/React__default.createElement("img", {
8427
- src: it === null || it === void 0 ? void 0 : it.srcImage
8428
- }));
8429
- }))), /*#__PURE__*/React__default.createElement(Dash, {
8413
+ }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map((it, index) => /*#__PURE__*/React__default.createElement("div", {
8414
+ key: index
8415
+ }, /*#__PURE__*/React__default.createElement("img", {
8416
+ src: it === null || it === void 0 ? void 0 : it.srcImage
8417
+ }))))), /*#__PURE__*/React__default.createElement(Dash, {
8430
8418
  color: secondary
8431
8419
  }));
8432
8420
  };
8433
8421
 
8434
- export { Address1, Banner1, Booking1, CustomerRating10, Employees1, Features1, Features2, Features3, Footer1, Gallery1, Hero10, Hero11, Hero11$1 as Hero12, Hero13, Links1, Partner1, Products1, Products10, Products2, ProductsTop1, SectionTitle1, Treatments1, Treatments1$1 as Treatments2 };
8422
+ export { Address1, Banner1, Booking1, CustomerRating10, Employees1, Features1, Features2, Features3, Footer1, Gallery1, Hero10, Hero11, Hero11$1 as Hero12, Hero13, Links1, NavBar7, Partner1, Products1, Products10, Products2, ProductsTop1, SectionTitle1, Treatments1, Treatments1$1 as Treatments2 };
8435
8423
  //# sourceMappingURL=index.modern.js.map