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

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.
@@ -14,20 +14,44 @@ import 'react-icons/io';
14
14
  import { SiVisa, SiZalo } from 'react-icons/si';
15
15
  import { GoCreditCard } from 'react-icons/go';
16
16
 
17
- const Button = props => {
17
+ function _extends() {
18
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
19
+ for (var e = 1; e < arguments.length; e++) {
20
+ var t = arguments[e];
21
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
22
+ }
23
+ return n;
24
+ }, _extends.apply(null, arguments);
25
+ }
26
+ function _objectDestructuringEmpty(t) {
27
+ if (null == t) throw new TypeError("Cannot destructure " + t);
28
+ }
29
+ function _objectWithoutPropertiesLoose(r, e) {
30
+ if (null == r) return {};
31
+ var t = {};
32
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
33
+ if (e.includes(n)) continue;
34
+ t[n] = r[n];
35
+ }
36
+ return t;
37
+ }
38
+
39
+ var Button = function Button(props) {
18
40
  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
- };
41
+ var _props$label = props.label,
42
+ label = _props$label === void 0 ? "" : _props$label,
43
+ _props$className = props.className,
44
+ className = _props$className === void 0 ? "" : _props$className,
45
+ _props$style = props.style,
46
+ style = _props$style === void 0 ? {} : _props$style,
47
+ _props$shopConfigStyl = props.shopConfigStyle,
48
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
49
+ _props$onClick = props.onClick,
50
+ onClick = _props$onClick === void 0 ? function () {} : _props$onClick;
51
+ 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;
52
+ var _style = _extends({
53
+ backgroundColor: shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : (_shopConfigStyle$colo = shopConfigStyle.color) === null || _shopConfigStyle$colo === void 0 ? void 0 : _shopConfigStyle$colo.primary
54
+ }, style);
31
55
  return /*#__PURE__*/React__default.createElement("button", {
32
56
  type: "button",
33
57
  className: _className,
@@ -36,33 +60,49 @@ const Button = props => {
36
60
  }, label);
37
61
  };
38
62
 
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);
63
+ var NavBar7 = function NavBar7(props) {
64
+ var listRef = useRef(null);
65
+ var _useState = useState(false),
66
+ isOpen = _useState[0],
67
+ setIsOpen = _useState[1];
68
+ var _props$shopConfig = props.shopConfig,
69
+ shopConfig = _props$shopConfig === void 0 ? {} : _props$shopConfig,
70
+ shopConfigStyle = props.shopConfigStyle,
71
+ _props$routes = props.routes,
72
+ routes = _props$routes === void 0 ? [] : _props$routes,
73
+ _props$section = props.section,
74
+ section = _props$section === void 0 ? {} : _props$section,
75
+ _props$userInfo = props.userInfo,
76
+ userInfo = _props$userInfo === void 0 ? null : _props$userInfo,
77
+ _props$cartItems = props.cartItems,
78
+ cartItems = _props$cartItems === void 0 ? [] : _props$cartItems,
79
+ _props$navToLogin = props.navToLogin,
80
+ navToLogin = _props$navToLogin === void 0 ? function () {} : _props$navToLogin,
81
+ _props$navToRegister = props.navToRegister,
82
+ navToRegister = _props$navToRegister === void 0 ? function () {} : _props$navToRegister;
83
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
84
+ _shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
85
+ primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
86
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.textHeading,
87
+ textHeading = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
88
+ _shopConfigStyle$colo4 = _shopConfigStyle$colo.textBody,
89
+ textBody = _shopConfigStyle$colo4 === void 0 ? "#000" : _shopConfigStyle$colo4,
90
+ _shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
91
+ background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5,
92
+ _shopConfigStyle$colo6 = _shopConfigStyle$colo.bgSecondary,
93
+ bgSecondary = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6,
94
+ _shopConfigStyle$colo7 = _shopConfigStyle$colo.textButton,
95
+ textButton = _shopConfigStyle$colo7 === void 0 ? "#fff" : _shopConfigStyle$colo7;
96
+ console.log("NavBar7 routes", routes);
97
+ console.log("NavBar7 userInfo", userInfo);
98
+ console.log("NavBar7 cartItems", cartItems);
99
+ var totalItem = cartItems.reduce(function (total, item) {
100
+ return total + item.quantity;
101
+ }, 0);
62
102
  if (totalItem > 9) {
63
103
  totalItem = "9+";
64
104
  }
65
- const cart = () => {
105
+ var cart = function cart() {
66
106
  return /*#__PURE__*/React__default.createElement("div", {
67
107
  className: "flex"
68
108
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -105,17 +145,19 @@ const NavBar7 = props => {
105
145
  }
106
146
  }, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName)), /*#__PURE__*/React__default.createElement("div", {
107
147
  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 ?
148
+ }, routes === null || routes === void 0 ? void 0 : routes.map(function (route, index) {
149
+ return /*#__PURE__*/React__default.createElement("a", {
150
+ href: route === null || route === void 0 ? void 0 : route.route
151
+ }, (section === null || section === void 0 ? void 0 : section.pageRoute) === (route === null || route === void 0 ? void 0 : route.name) ? /*#__PURE__*/React__default.createElement("div", {
152
+ className: "py-1 border-b",
153
+ style: {
154
+ color: textHeading,
155
+ borderColor: textHeading
156
+ }
157
+ }, route === null || route === void 0 ? void 0 : route.label) : /*#__PURE__*/React__default.createElement("div", {
158
+ className: "py-1"
159
+ }, route === null || route === void 0 ? void 0 : route.label));
160
+ })), cart(), !userInfo ?
119
161
  /*#__PURE__*/
120
162
  React__default.createElement("div", {
121
163
  className: "flex justify-center"
@@ -133,7 +175,9 @@ const NavBar7 = props => {
133
175
  }, /*#__PURE__*/React__default.createElement(Button, {
134
176
  label: "Đăng nhập",
135
177
  shopConfigStyle: shopConfigStyle,
136
- onClick: () => navToLogin()
178
+ onClick: function onClick() {
179
+ return navToLogin();
180
+ }
137
181
  }), /*#__PURE__*/React__default.createElement(Button, {
138
182
  label: "Đăng ký",
139
183
  shopConfigStyle: shopConfigStyle,
@@ -143,7 +187,9 @@ const NavBar7 = props => {
143
187
  color: primary
144
188
  },
145
189
  className: "border",
146
- onClick: () => navToRegister()
190
+ onClick: function onClick() {
191
+ return navToRegister();
192
+ }
147
193
  }))), /*#__PURE__*/React__default.createElement("div", {
148
194
  className: "relative lg:hidden flex gap-4 items-center px-4 py-2"
149
195
  }, /*#__PURE__*/React__default.createElement("a", {
@@ -160,7 +206,7 @@ const NavBar7 = props => {
160
206
  }
161
207
  }, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName)), /*#__PURE__*/React__default.createElement("button", {
162
208
  type: "button",
163
- onClick: () => {
209
+ onClick: function onClick() {
164
210
  setIsOpen(true);
165
211
  }
166
212
  }, /*#__PURE__*/React__default.createElement(FiMenu, {
@@ -168,7 +214,7 @@ const NavBar7 = props => {
168
214
  color: primary
169
215
  })), isOpen ? /*#__PURE__*/React__default.createElement("div", {
170
216
  className: "absolute bg-[rgba(0,0,0,0.5)] h-screen w-full top-0 left-0 z-50 flex justify-end",
171
- onClick: () => {
217
+ onClick: function onClick() {
172
218
  setIsOpen(false);
173
219
  }
174
220
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -176,35 +222,38 @@ const NavBar7 = props => {
176
222
  style: {
177
223
  background: bgSecondary
178
224
  },
179
- onClick: event => event.stopPropagation()
225
+ onClick: function onClick(event) {
226
+ return event.stopPropagation();
227
+ }
180
228
  }, /*#__PURE__*/React__default.createElement("button", {
181
229
  className: "flex w-full justify-end text-gray4",
182
- onClick: () => {
230
+ onClick: function onClick() {
183
231
  setIsOpen(false);
184
232
  }
185
233
  }, /*#__PURE__*/React__default.createElement(RxCross2, {
186
234
  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()));
235
+ })), /*#__PURE__*/React__default.createElement("div", null, routes === null || routes === void 0 ? void 0 : routes.map(function (route, index) {
236
+ return /*#__PURE__*/React__default.createElement("a", {
237
+ href: route === null || route === void 0 ? void 0 : route.route
238
+ }, /*#__PURE__*/React__default.createElement("div", {
239
+ className: "py-2",
240
+ style: (section === null || section === void 0 ? void 0 : section.pageRoute) === (route === null || route === void 0 ? void 0 : route.name) ? {
241
+ color: textHeading
242
+ } : null
243
+ }, route === null || route === void 0 ? void 0 : route.label));
244
+ })))) : null, cart()));
195
245
  };
196
246
 
197
- const SvgIcon = ({
198
- className,
199
- style
200
- }) => {
247
+ var SvgIcon = function SvgIcon(_ref) {
248
+ var className = _ref.className,
249
+ style = _ref.style;
201
250
  return /*#__PURE__*/React__default.createElement("svg", {
202
251
  width: "42",
203
252
  height: "42",
204
253
  viewBox: "0 0 42 42",
205
254
  fill: "none",
206
255
  xmlns: "http://www.w3.org/2000/svg",
207
- className: `${className}`,
256
+ className: "" + className,
208
257
  style: style
209
258
  }, /*#__PURE__*/React__default.createElement("path", {
210
259
  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",
@@ -217,23 +266,25 @@ const SvgIcon = ({
217
266
  fill: "currentColor"
218
267
  }));
219
268
  };
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;
269
+ var SectionTitle1 = function SectionTitle1(props) {
270
+ var _props$shopConfigStyl = props.shopConfigStyle,
271
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
272
+ _props$data = props.data,
273
+ data = _props$data === void 0 ? {} : _props$data;
274
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
275
+ _shopConfigStyle$colo2 = _shopConfigStyle$colo.textHeading,
276
+ textHeading = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
277
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
278
+ secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
279
+ _shopConfigStyle$colo4 = _shopConfigStyle$colo.textSecondary,
280
+ textSecondary = _shopConfigStyle$colo4 === void 0 ? "#000" : _shopConfigStyle$colo4;
230
281
  return /*#__PURE__*/React__default.createElement("div", null, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement("div", {
231
282
  className: "text-center text-2xl md:text-4xl font-merienda font-semibold leading-relaxed",
232
283
  style: {
233
284
  color: textHeading
234
285
  }
235
286
  }, data === null || data === void 0 ? void 0 : data.sectionTitle) : null, /*#__PURE__*/React__default.createElement("div", {
236
- className: `flex items-center justify-center`
287
+ className: "flex items-center justify-center"
237
288
  }, /*#__PURE__*/React__default.createElement("div", {
238
289
  className: "w-32 h-0.5 rounded-full",
239
290
  style: {
@@ -257,58 +308,57 @@ const SectionTitle1 = props => {
257
308
  }, data === null || data === void 0 ? void 0 : data.sectionDescription) : null);
258
309
  };
259
310
 
260
- const Hero10 = props => {
311
+ var Hero10 = function Hero10(props) {
261
312
  var _data$data, _data$data$, _data$data$$srcImages, _sectionData$, _sectionData$2, _sectionData$2$button;
262
- const {
263
- shopConfigStyle,
264
- data
265
- } = props;
266
- const sectionData = data === null || data === void 0 ? void 0 : data.data;
313
+ var shopConfigStyle = props.shopConfigStyle,
314
+ data = props.data;
315
+ var sectionData = data === null || data === void 0 ? void 0 : data.data;
267
316
  return /*#__PURE__*/React__default.createElement("div", {
268
317
  className: "relative w-full bg-cover bg-center bg-no-repeat ",
269
318
  style: {
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]})`
319
+ 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]) + ")"
271
320
  }
272
321
  }, /*#__PURE__*/React__default.createElement("div", {
273
322
  className: "absolute top-0 w-full h-full bg-black opacity-40 z-0"
274
323
  }), /*#__PURE__*/React__default.createElement("div", {
275
324
  className: "relative w-full min-h-[540px] p-12 z-10 flex flex-col gap-6 items-center justify-center"
276
325
  }, /*#__PURE__*/React__default.createElement("div", {
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
- }))));
326
+ 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)
327
+ }, 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) {
328
+ return /*#__PURE__*/React__default.createElement(Button, {
329
+ label: button === null || button === void 0 ? void 0 : button.label,
330
+ shopConfigStyle: shopConfigStyle
331
+ });
332
+ })));
282
333
  };
283
334
 
284
- const Dash = props => {
285
- const {
286
- color = "#ccc",
287
- className = ""
288
- } = props;
335
+ var Dash = function Dash(props) {
336
+ var _props$color = props.color,
337
+ color = _props$color === void 0 ? "#ccc" : _props$color,
338
+ _props$className = props.className,
339
+ className = _props$className === void 0 ? "" : _props$className;
289
340
  return /*#__PURE__*/React__default.createElement("div", {
290
- className: `mx-auto w-full max-w-[240px] md:max-w-[720px] border-b-0 ${className}`,
341
+ className: "mx-auto w-full max-w-[240px] md:max-w-[720px] border-b-0 " + className,
291
342
  style: {
292
- backgroundImage: `repeating-linear-gradient(to right, ${color} 0, ${color} 10px, transparent 10px, transparent 20px)`,
343
+ backgroundImage: "repeating-linear-gradient(to right, " + color + " 0, " + color + " 10px, transparent 10px, transparent 20px)",
293
344
  height: "1px"
294
345
  }
295
346
  });
296
347
  };
297
348
 
298
- const Hero11 = props => {
349
+ var Hero11 = function Hero11(props) {
299
350
  var _data$data;
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;
351
+ var _props$shopConfigStyl = props.shopConfigStyle,
352
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
353
+ _props$data = props.data,
354
+ data = _props$data === void 0 ? {} : _props$data,
355
+ _props$SectionTitle = props.SectionTitle,
356
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
357
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
358
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
359
+ secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
360
+ _shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
361
+ background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
312
362
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
313
363
  className: "relative w-full py-12 px-4 xl:px-20",
314
364
  style: {
@@ -319,7 +369,7 @@ const Hero11 = props => {
319
369
  shopConfigStyle: shopConfigStyle
320
370
  }), /*#__PURE__*/React__default.createElement("div", {
321
371
  className: "mt-6 grid grid-cols-2 md:grid-cols-4 gap-1 md:gap-2"
322
- }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map((it, index) => {
372
+ }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
323
373
  var _it$srcImages;
324
374
  return /*#__PURE__*/React__default.createElement("div", {
325
375
  key: index
@@ -331,26 +381,20 @@ const Hero11 = props => {
331
381
  }));
332
382
  };
333
383
 
334
- const Hero11$1 = props => {
384
+ var Hero11$1 = function Hero11(props) {
335
385
  var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$;
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;
386
+ var _props$shopConfigStyl = props.shopConfigStyle,
387
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
388
+ _props$data = props.data,
389
+ data = _props$data === void 0 ? {} : _props$data;
390
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
391
+ _shopConfigStyle$colo2 = _shopConfigStyle$colo.textHeading,
392
+ textHeading = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2;
349
393
  console.log("Hero11 data", data);
350
394
  return /*#__PURE__*/React__default.createElement("div", {
351
395
  className: "relative w-full bg-cover bg-center bg-no-repeat grid grid-cols-1 md:grid-cols-2",
352
396
  style: {
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]})`
397
+ 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]) + ")"
354
398
  }
355
399
  }, /*#__PURE__*/React__default.createElement("div", {
356
400
  className: "absolute top-0 w-full h-full bg-white opacity-60 z-0 md:hidden"
@@ -359,7 +403,7 @@ const Hero11$1 = props => {
359
403
  }), /*#__PURE__*/React__default.createElement("div", {
360
404
  className: "relative p-12 z-1"
361
405
  }, /*#__PURE__*/React__default.createElement("div", {
362
- className: `text-2xl md:text-4xl leading-[1.6] ${shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.headingFont}`,
406
+ className: "text-2xl md:text-4xl leading-[1.6] " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.headingFont),
363
407
  style: {
364
408
  color: textHeading
365
409
  }
@@ -368,6 +412,25 @@ const Hero11$1 = props => {
368
412
  }, 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)));
369
413
  };
370
414
 
415
+ // A type of promise-like that resolves synchronously and supports only one observer
416
+
417
+ const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
418
+
419
+ const _asyncIteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";
420
+
421
+ // Asynchronously call a function and send errors to recovery continuation
422
+ function _catch(body, recover) {
423
+ try {
424
+ var result = body();
425
+ } catch(e) {
426
+ return recover(e);
427
+ }
428
+ if (result && result.then) {
429
+ return result.then(void 0, recover);
430
+ }
431
+ return result;
432
+ }
433
+
371
434
  function bind(fn, thisArg) {
372
435
  return function wrap() {
373
436
  return fn.apply(thisArg, arguments);
@@ -1688,12 +1751,12 @@ const hasStandardBrowserWebWorkerEnv = (() => {
1688
1751
  const origin = hasBrowserEnv && window.location.href || 'http://localhost';
1689
1752
 
1690
1753
  var utils$1 = {
1691
- __proto__: null,
1692
- hasBrowserEnv: hasBrowserEnv,
1693
- hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
1694
- hasStandardBrowserEnv: hasStandardBrowserEnv,
1695
- navigator: _navigator,
1696
- origin: origin
1754
+ __proto__: null,
1755
+ hasBrowserEnv: hasBrowserEnv,
1756
+ hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
1757
+ hasStandardBrowserEnv: hasStandardBrowserEnv,
1758
+ navigator: _navigator,
1759
+ origin: origin
1697
1760
  };
1698
1761
 
1699
1762
  var platform$1 = {
@@ -4832,8 +4895,8 @@ var callBound = function callBoundIntrinsic(name, allowMissing) {
4832
4895
  var _nodeResolve_empty = {};
4833
4896
 
4834
4897
  var _nodeResolve_empty$1 = {
4835
- __proto__: null,
4836
- 'default': _nodeResolve_empty
4898
+ __proto__: null,
4899
+ 'default': _nodeResolve_empty
4837
4900
  };
4838
4901
 
4839
4902
  var utilInspect = getCjsExportFromNamespace(_nodeResolve_empty$1);
@@ -6419,116 +6482,125 @@ var lib = {
6419
6482
  stringify: stringify_1
6420
6483
  };
6421
6484
 
6422
- const getBaseUrl = () => {
6485
+ var getBaseUrl = function getBaseUrl() {
6423
6486
  return process.env.NEXT_PUBLIC_BASE_URL || "https://test-apigateway.sfin.vn";
6424
6487
  };
6425
- const request = axios.create();
6426
- request.interceptors.request.use(config => {
6488
+ var request = axios.create();
6489
+ request.interceptors.request.use(function (config) {
6427
6490
  return config;
6428
- }, error => {
6491
+ }, function (error) {
6429
6492
  return Promise.reject(error.response || {
6430
6493
  data: {}
6431
6494
  });
6432
6495
  });
6433
- request.interceptors.response.use(response => {
6496
+ request.interceptors.response.use(function (response) {
6434
6497
  return response;
6435
- }, error => {
6498
+ }, function (error) {
6436
6499
  return Promise.reject((error === null || error === void 0 ? void 0 : error.response) || {
6437
6500
  data: {}
6438
6501
  });
6439
6502
  });
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
- };
6503
+ var api = function api(options) {
6504
+ var config = _extends({
6505
+ baseURL: getBaseUrl()
6506
+ }, options, {
6507
+ paramsSerializer: function paramsSerializer(params) {
6508
+ return lib.stringify(params, {
6509
+ arrayFormat: "repeat"
6510
+ });
6511
+ },
6512
+ headers: _extends({}, options.headers)
6513
+ });
6451
6514
  return request(config);
6452
6515
  };
6453
6516
 
6454
- const getShopCategoriesApi = (shopId, types) => {
6517
+ var getShopCategoriesApi = function getShopCategoriesApi(shopId, types) {
6455
6518
  return api({
6456
6519
  method: "get",
6457
- url: `/landing-shop/get-product-category-on-landing`,
6520
+ url: "/landing-shop/get-product-category-on-landing",
6458
6521
  params: {
6459
- shopId,
6460
- types,
6522
+ shopId: shopId,
6523
+ types: types,
6461
6524
  isShowOnLanding: true
6462
6525
  },
6463
6526
  headers: {
6464
- shopId
6527
+ shopId: shopId
6465
6528
  }
6466
6529
  });
6467
6530
  };
6468
- const getProductListApi = (shopId, params = {}) => {
6531
+ var getProductListApi = function getProductListApi(shopId, params) {
6532
+ if (params === void 0) {
6533
+ params = {};
6534
+ }
6469
6535
  return api({
6470
6536
  method: "get",
6471
- url: `/landing-shop/get-product-on-landing`,
6472
- params: {
6473
- shopId,
6474
- isShowOnLanding: true,
6475
- ...params
6476
- },
6537
+ url: "/landing-shop/get-product-on-landing",
6538
+ params: _extends({
6539
+ shopId: shopId,
6540
+ isShowOnLanding: true
6541
+ }, params),
6477
6542
  headers: {
6478
- shopId
6543
+ shopId: shopId
6479
6544
  }
6480
6545
  });
6481
6546
  };
6482
6547
 
6483
- const CategoryController = props => {
6484
- const {
6485
- shopConfig,
6486
- params
6487
- } = props;
6488
- const [categories, setCategories] = useState([]);
6489
- const defaultParams = {};
6490
- useEffect(() => {
6548
+ var CategoryController = function CategoryController(props) {
6549
+ var shopConfig = props.shopConfig,
6550
+ params = props.params;
6551
+ var _useState = useState([]),
6552
+ categories = _useState[0],
6553
+ setCategories = _useState[1];
6554
+ var defaultParams = {};
6555
+ useEffect(function () {
6491
6556
  getCategoryList();
6492
6557
  }, []);
6493
- const getCategoryList = async () => {
6558
+ var getCategoryList = function getCategoryList() {
6494
6559
  try {
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
6560
+ var _temp = _catch(function () {
6561
+ return Promise.resolve(getShopCategoriesApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId, _extends({}, defaultParams, params))).then(function (res) {
6562
+ var _res$data, _res$data$status;
6563
+ 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) {
6564
+ var _res$data2;
6565
+ setCategories(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
6566
+ }
6567
+ });
6568
+ }, function (e) {
6569
+ console.log(e);
6499
6570
  });
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
- }
6571
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
6504
6572
  } catch (e) {
6505
- console.log(e);
6573
+ return Promise.reject(e);
6506
6574
  }
6507
6575
  };
6508
6576
  return {
6509
- categories
6577
+ categories: categories
6510
6578
  };
6511
6579
  };
6512
6580
 
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 = () => {
6581
+ var Hero13 = function Hero13(props) {
6582
+ var listRef = useRef(null);
6583
+ var _useState = useState(false),
6584
+ isOpen = _useState[0],
6585
+ setIsOpen = _useState[1];
6586
+ var shopConfigStyle = props.shopConfigStyle,
6587
+ data = props.data;
6588
+ var sectionData = data === null || data === void 0 ? void 0 : data.data;
6589
+ var _CategoryController = CategoryController(props),
6590
+ _CategoryController$c = _CategoryController.categories,
6591
+ categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
6592
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
6593
+ _shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
6594
+ primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
6595
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
6596
+ textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
6597
+ _shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
6598
+ background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
6599
+ _shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
6600
+ bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5,
6601
+ _shopConfigStyle$colo6 = _shopConfigStyle$colo.textButton,
6602
+ textButton = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
6603
+ var handleClickPrevImg = function handleClickPrevImg() {
6532
6604
  if (listRef.current) {
6533
6605
  listRef.current.scrollBy({
6534
6606
  left: -90,
@@ -6536,7 +6608,7 @@ const Hero13 = props => {
6536
6608
  });
6537
6609
  }
6538
6610
  };
6539
- const handleClickNextImg = () => {
6611
+ var handleClickNextImg = function handleClickNextImg() {
6540
6612
  if (listRef.current) {
6541
6613
  listRef.current.scrollBy({
6542
6614
  left: 90,
@@ -6571,7 +6643,7 @@ const Hero13 = props => {
6571
6643
  }, /*#__PURE__*/React__default.createElement("a", {
6572
6644
  href: "/"
6573
6645
  }, /*#__PURE__*/React__default.createElement("div", {
6574
- className: `border-b-2`,
6646
+ className: "border-b-2",
6575
6647
  style: {
6576
6648
  color: primary,
6577
6649
  borderColor: primary
@@ -6579,18 +6651,18 @@ const Hero13 = props => {
6579
6651
  }, "Trang ch\u1EE7")), /*#__PURE__*/React__default.createElement("div", {
6580
6652
  className: "relative group "
6581
6653
  }, /*#__PURE__*/React__default.createElement("div", {
6582
- className: ` mx-4 `
6654
+ className: " mx-4 "
6583
6655
  }, "Danh m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
6584
6656
  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",
6585
6657
  style: {
6586
6658
  background: bgSecondary
6587
6659
  }
6588
- }, categories && categories.length > 0 && categories.map(item => {
6660
+ }, categories && categories.length > 0 && categories.map(function (item) {
6589
6661
  return /*#__PURE__*/React__default.createElement("div", {
6590
- key: `hover-${item.categoryId}`,
6662
+ key: "hover-" + item.categoryId,
6591
6663
  className: "hover:bg-gray4 hover:text-white mx-auto px-6"
6592
6664
  }, /*#__PURE__*/React__default.createElement("a", {
6593
- href: `#`
6665
+ href: "#"
6594
6666
  }, /*#__PURE__*/React__default.createElement("div", null, item.cateName)));
6595
6667
  }))), /*#__PURE__*/React__default.createElement("a", {
6596
6668
  href: "/introduction"
@@ -6652,7 +6724,7 @@ const Hero13 = props => {
6652
6724
  className: ""
6653
6725
  }, isOpen === false ? /*#__PURE__*/React__default.createElement("button", {
6654
6726
  type: "button",
6655
- onClick: () => {
6727
+ onClick: function onClick() {
6656
6728
  setIsOpen(true);
6657
6729
  }
6658
6730
  }, /*#__PURE__*/React__default.createElement(FiMenu, {
@@ -6678,7 +6750,7 @@ const Hero13 = props => {
6678
6750
  }
6679
6751
  }, data !== null && data !== void 0 && data.sectionTitle ? data.sectionTitle : "Điện thoại Hải Anh")), /*#__PURE__*/React__default.createElement("button", {
6680
6752
  className: "text-4xl text-gray3",
6681
- onClick: () => {
6753
+ onClick: function onClick() {
6682
6754
  setIsOpen(false);
6683
6755
  }
6684
6756
  }, /*#__PURE__*/React__default.createElement(RxCross2, null))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
@@ -6688,15 +6760,15 @@ const Hero13 = props => {
6688
6760
  }, /*#__PURE__*/React__default.createElement("a", {
6689
6761
  href: "/"
6690
6762
  }, /*#__PURE__*/React__default.createElement("div", {
6691
- className: ` border-2 rounded-lg p-4`
6763
+ className: " border-2 rounded-lg p-4"
6692
6764
  }, "Trang ch\u1EE7")), /*#__PURE__*/React__default.createElement("a", {
6693
6765
  href: "/product/category"
6694
6766
  }, /*#__PURE__*/React__default.createElement("div", {
6695
- className: `border-2 rounded-lg p-4`
6767
+ className: "border-2 rounded-lg p-4"
6696
6768
  }, "Danh m\u1EE5c")), /*#__PURE__*/React__default.createElement("a", {
6697
6769
  href: "/introduction"
6698
6770
  }, /*#__PURE__*/React__default.createElement("div", {
6699
- className: `border-2 rounded-lg p-4`
6771
+ className: "border-2 rounded-lg p-4"
6700
6772
  }, "Gi\u1EDBi thi\u1EC7u"))))))), /*#__PURE__*/React__default.createElement("a", {
6701
6773
  href: "/",
6702
6774
  className: "flex items-center"
@@ -6745,12 +6817,12 @@ const Hero13 = props => {
6745
6817
  }, /*#__PURE__*/React__default.createElement("div", {
6746
6818
  className: " flex my-auto h-full overflow-x-auto hide-scrollbar",
6747
6819
  ref: listRef
6748
- }, categories && categories.length > 0 && categories.map(item => {
6820
+ }, categories && categories.length > 0 && categories.map(function (item) {
6749
6821
  return /*#__PURE__*/React__default.createElement("button", {
6750
- key: `cateN-${item.categoryId}`,
6822
+ key: "cateN-" + item.categoryId,
6751
6823
  className: "items whitespace-nowrap border-r-2 border-r-white px-6 "
6752
6824
  }, /*#__PURE__*/React__default.createElement("a", {
6753
- href: `/products/category?id=${item.categoryId}`
6825
+ href: "/products/category?id=" + item.categoryId
6754
6826
  }, item.cateName));
6755
6827
  }))), /*#__PURE__*/React__default.createElement("div", {
6756
6828
  className: "lg:block hidden lg:col-span-1 my-auto flex "
@@ -6778,20 +6850,23 @@ const Hero13 = props => {
6778
6850
  })));
6779
6851
  };
6780
6852
 
6781
- const Features1 = props => {
6853
+ var Features1 = function Features1(props) {
6782
6854
  var _data$data;
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;
6855
+ var _props$shopConfigStyl = props.shopConfigStyle,
6856
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
6857
+ _props$data = props.data,
6858
+ data = _props$data === void 0 ? {} : _props$data,
6859
+ _props$SectionTitle = props.SectionTitle,
6860
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
6861
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
6862
+ _shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
6863
+ primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
6864
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
6865
+ secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
6866
+ _shopConfigStyle$colo4 = _shopConfigStyle$colo.textBody,
6867
+ textBody = _shopConfigStyle$colo4 === void 0 ? "#000" : _shopConfigStyle$colo4,
6868
+ _shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
6869
+ background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
6795
6870
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
6796
6871
  className: "relative w-full py-12 px-4 xl:px-20",
6797
6872
  style: {
@@ -6802,58 +6877,61 @@ const Features1 = props => {
6802
6877
  shopConfigStyle: shopConfigStyle
6803
6878
  }), /*#__PURE__*/React__default.createElement("div", {
6804
6879
  className: "mt-6 grid grid-cols-3 gap-4 md:gap-8"
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, {
6880
+ }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
6881
+ return /*#__PURE__*/React__default.createElement("div", {
6882
+ key: index,
6883
+ className: "pt-6 col-span-3 md:col-span-1"
6884
+ }, /*#__PURE__*/React__default.createElement("div", {
6885
+ className: "relative w-40 h-24 flex items-center justify-center m-auto md:m-0"
6886
+ }, /*#__PURE__*/React__default.createElement("div", {
6887
+ className: "absolute w-40 h-24 rounded-2xl z-10",
6888
+ style: {
6889
+ backgroundColor: primary
6890
+ }
6891
+ }), /*#__PURE__*/React__default.createElement("div", {
6892
+ className: "absolute w-24 h-16 rounded-2xl -right-2 -top-2 z-0",
6893
+ style: {
6894
+ backgroundColor: secondary
6895
+ }
6896
+ }), /*#__PURE__*/React__default.createElement("div", {
6897
+ className: "h-16 m-auto bg-center w-16 bg-cover bg-no-repeat z-20",
6898
+ style: {
6899
+ backgroundImage: "url(" + it.srcImage + ")"
6900
+ }
6901
+ })), /*#__PURE__*/React__default.createElement("p", {
6902
+ className: "mx-auto md:mt-3 md:mx-0 text-xl py-2 font-medium w-fit rounded-lg",
6903
+ style: {
6904
+ color: textBody
6905
+ }
6906
+ }, it.title), /*#__PURE__*/React__default.createElement("div", {
6907
+ className: "mx-auto md:mx-0 mb-2 w-28 h-2px rounded-full",
6908
+ style: {
6909
+ backgroundColor: secondary
6910
+ }
6911
+ }), /*#__PURE__*/React__default.createElement("p", {
6912
+ className: "text-base mx-auto md:mx-0 text-center md:text-start",
6913
+ style: {
6914
+ color: textBody
6915
+ }
6916
+ }, it.description));
6917
+ }))), /*#__PURE__*/React__default.createElement(Dash, {
6841
6918
  color: secondary
6842
6919
  }));
6843
6920
  };
6844
6921
 
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;
6922
+ var Features2 = function Features2(props) {
6923
+ var data = props.data,
6924
+ shopConfigStyle = props.shopConfigStyle;
6925
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
6926
+ _shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
6927
+ primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
6928
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
6929
+ textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
6930
+ _shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
6931
+ background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
6932
+ _shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
6933
+ bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
6934
+ var sectionData = data === null || data === void 0 ? void 0 : data.data;
6857
6935
  return /*#__PURE__*/React__default.createElement("div", {
6858
6936
  className: "w-full pt-10 px-4 xl:px-20",
6859
6937
  style: {
@@ -6865,10 +6943,10 @@ const Features2 = props => {
6865
6943
  style: {
6866
6944
  background: bgSecondary
6867
6945
  }
6868
- }, sectionData && sectionData.length > 0 && sectionData.map((item, index) => {
6946
+ }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
6869
6947
  return /*#__PURE__*/React__default.createElement("div", {
6870
6948
  className: "flex flex-col gap-2 items-center text-sm lg:text-lg font-semibold text-center",
6871
- key: `dfgg-${index}`,
6949
+ key: "dfgg-" + index,
6872
6950
  style: {
6873
6951
  color: textBody
6874
6952
  }
@@ -6883,20 +6961,19 @@ const Features2 = props => {
6883
6961
  })));
6884
6962
  };
6885
6963
 
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;
6964
+ var Features3 = function Features3(props) {
6965
+ var shopConfigStyle = props.shopConfigStyle,
6966
+ shopConfig = props.shopConfig,
6967
+ data = props.data;
6968
+ var sectionData = data === null || data === void 0 ? void 0 : data.data;
6893
6969
  data.sectionTitle = data.sectionTitle.replace("{shopName}", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName);
6894
- const {
6895
- primary = "#000",
6896
- textBody = "#000",
6897
- background = "#fff",
6898
- bgSecondary = "#fff"
6899
- } = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
6970
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
6971
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
6972
+ textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
6973
+ _shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
6974
+ background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
6975
+ _shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
6976
+ bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
6900
6977
  return /*#__PURE__*/React__default.createElement("div", {
6901
6978
  className: " w-full pt-10 px-4 xl:px-20",
6902
6979
  style: {
@@ -6909,10 +6986,10 @@ const Features3 = props => {
6909
6986
  className: "text-gray3 text-lg sm:text-xl md:text-2xl"
6910
6987
  }, data === null || data === void 0 ? void 0 : data.sectionDescription), /*#__PURE__*/React__default.createElement("div", {
6911
6988
  className: "grid grid-cols-2 sm:grid-cols-4 gap-6 mt-6 text-sm md:text-base"
6912
- }, sectionData && sectionData.length > 0 && sectionData.map((item, index) => {
6989
+ }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
6913
6990
  return /*#__PURE__*/React__default.createElement("div", {
6914
6991
  className: "grid grid-cols-2 p-3 rounded-lg font-semibold",
6915
- key: `dfsdfj-${index}`,
6992
+ key: "dfsdfj-" + index,
6916
6993
  style: {
6917
6994
  background: bgSecondary
6918
6995
  }
@@ -6923,55 +7000,59 @@ const Features3 = props => {
6923
7000
  })));
6924
7001
  };
6925
7002
 
6926
- const ProductController = props => {
6927
- const {
6928
- shopConfig,
6929
- params,
6930
- isAutoGetList = true
6931
- } = props;
6932
- const [products, setProducts] = useState([]);
6933
- const defaultParams = {
7003
+ var ProductController = function ProductController(props) {
7004
+ var shopConfig = props.shopConfig,
7005
+ params = props.params,
7006
+ _props$isAutoGetList = props.isAutoGetList,
7007
+ isAutoGetList = _props$isAutoGetList === void 0 ? true : _props$isAutoGetList;
7008
+ var _useState = useState([]),
7009
+ products = _useState[0],
7010
+ setProducts = _useState[1];
7011
+ var defaultParams = {
6934
7012
  page: 0,
6935
7013
  size: 8,
6936
7014
  types: "0"
6937
7015
  };
6938
- useEffect(() => {
7016
+ useEffect(function () {
6939
7017
  if (isAutoGetList) {
6940
7018
  getProductList();
6941
7019
  }
6942
7020
  }, [params, isAutoGetList]);
6943
- const getProductList = async () => {
7021
+ var getProductList = function getProductList() {
6944
7022
  try {
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
7023
+ var _temp = _catch(function () {
7024
+ return Promise.resolve(getProductListApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId, _extends({}, defaultParams, params))).then(function (res) {
7025
+ var _res$data, _res$data$status;
7026
+ 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) {
7027
+ var _res$data2;
7028
+ setProducts(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
7029
+ }
7030
+ });
7031
+ }, function (e) {
7032
+ console.log(e);
6949
7033
  });
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
- }
7034
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
6954
7035
  } catch (e) {
6955
- console.log(e);
7036
+ return Promise.reject(e);
6956
7037
  }
6957
7038
  };
6958
7039
  return {
6959
- products
7040
+ products: products
6960
7041
  };
6961
7042
  };
6962
7043
 
6963
7044
  var _path, _path2, _path3;
6964
- function _extends() {
6965
- return _extends = Object.assign ? Object.assign.bind() : function (n) {
7045
+ function _extends$1() {
7046
+ return _extends$1 = Object.assign ? Object.assign.bind() : function (n) {
6966
7047
  for (var e = 1; e < arguments.length; e++) {
6967
7048
  var t = arguments[e];
6968
7049
  for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
6969
7050
  }
6970
7051
  return n;
6971
- }, _extends.apply(null, arguments);
7052
+ }, _extends$1.apply(null, arguments);
6972
7053
  }
6973
7054
  function SvgImageGallery(props) {
6974
- return /*#__PURE__*/createElement("svg", _extends({
7055
+ return /*#__PURE__*/createElement("svg", _extends$1({
6975
7056
  height: 512,
6976
7057
  viewBox: "0 0 24 24",
6977
7058
  width: 512,
@@ -6985,13 +7066,11 @@ function SvgImageGallery(props) {
6985
7066
  })));
6986
7067
  }
6987
7068
 
6988
- const DefaultImage = props => {
6989
- const {
6990
- size = 0,
6991
- className = ""
6992
- } = props;
7069
+ var DefaultImage = function DefaultImage(props) {
7070
+ var _props$className = props.className,
7071
+ className = _props$className === void 0 ? "" : _props$className;
6993
7072
  return /*#__PURE__*/React__default.createElement("div", {
6994
- className: `flex justify-center items-center w-full aspect-square ${className}`,
7073
+ className: "flex justify-center items-center w-full aspect-square " + className,
6995
7074
  style: {
6996
7075
  backgroundColor: "#FAFAFA"
6997
7076
  }
@@ -7001,24 +7080,26 @@ const DefaultImage = props => {
7001
7080
  fill: "#D9D9D9"
7002
7081
  }));
7003
7082
  };
7004
- const ProductImage = props => {
7005
- const {
7006
- size = 0,
7007
- className = "",
7008
- product
7009
- } = props;
7010
- const [src, setSrc] = useState("");
7011
- useEffect(() => {
7083
+ var ProductImage = function ProductImage(props) {
7084
+ var _props$size2 = props.size,
7085
+ size = _props$size2 === void 0 ? 0 : _props$size2,
7086
+ _props$className2 = props.className,
7087
+ className = _props$className2 === void 0 ? "" : _props$className2,
7088
+ product = props.product;
7089
+ var _useState = useState(""),
7090
+ src = _useState[0],
7091
+ setSrc = _useState[1];
7092
+ useEffect(function () {
7012
7093
  getProductImage();
7013
7094
  }, [product]);
7014
- const getProductImage = () => {
7095
+ var getProductImage = function getProductImage() {
7015
7096
  var _JSON$parse, _JSON$parse$;
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;
7097
+ 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;
7017
7098
  setSrc(src);
7018
7099
  };
7019
7100
  return src ? /*#__PURE__*/React__default.createElement("img", {
7020
7101
  src: src,
7021
- className: `w-full aspect-square ${className}`,
7102
+ className: "w-full aspect-square " + className,
7022
7103
  style: size ? {
7023
7104
  width: size,
7024
7105
  height: size
@@ -7029,28 +7110,29 @@ const ProductImage = props => {
7029
7110
  });
7030
7111
  };
7031
7112
 
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
- });
7113
+ var Treatments1 = function Treatments1(props) {
7114
+ var _props$shopConfigStyl = props.shopConfigStyle,
7115
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
7116
+ _props$data = props.data,
7117
+ data = _props$data === void 0 ? {} : _props$data,
7118
+ _props$SectionTitle = props.SectionTitle,
7119
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
7120
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
7121
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
7122
+ secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
7123
+ _shopConfigStyle$colo4 = _shopConfigStyle$colo.textBody,
7124
+ textBody = _shopConfigStyle$colo4 === void 0 ? "#000" : _shopConfigStyle$colo4,
7125
+ _shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
7126
+ background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
7127
+ var _useState = useState({
7128
+ size: 1
7129
+ }),
7130
+ params = _useState[0];
7131
+ var _ProductController = ProductController(_extends({}, props, {
7132
+ params: params
7133
+ })),
7134
+ _ProductController$pr = _ProductController.products,
7135
+ products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
7054
7136
  console.log("Treatments1 products 1", products);
7055
7137
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
7056
7138
  className: "relative w-full py-12 px-4 xl:px-20",
@@ -7060,7 +7142,7 @@ const Treatments1 = props => {
7060
7142
  }, /*#__PURE__*/React__default.createElement(SectionTitle, {
7061
7143
  data: data,
7062
7144
  shopConfigStyle: shopConfigStyle
7063
- }), products === null || products === void 0 ? void 0 : products.map((product, index) => {
7145
+ }), products === null || products === void 0 ? void 0 : products.map(function (product, index) {
7064
7146
  var _product$productInfo, _product$productInfo2;
7065
7147
  return /*#__PURE__*/React__default.createElement("div", {
7066
7148
  className: "grid grid-cols-1 md:grid-cols-2 gap-6 mt-12",
@@ -7069,7 +7151,7 @@ const Treatments1 = props => {
7069
7151
  product: product === null || product === void 0 ? void 0 : product.productInfo,
7070
7152
  className: "aspect-video rounded-2xl"
7071
7153
  }), /*#__PURE__*/React__default.createElement("div", {
7072
- className: `${index % 2 ? "text-right" : "text-left"}`
7154
+ className: "" + (index % 2 ? "text-right" : "text-left")
7073
7155
  }, /*#__PURE__*/React__default.createElement("div", {
7074
7156
  className: "font-medium text-2xl",
7075
7157
  style: {
@@ -7097,17 +7179,17 @@ const Treatments1 = props => {
7097
7179
  };
7098
7180
 
7099
7181
  var _path$1;
7100
- function _extends$1() {
7101
- return _extends$1 = Object.assign ? Object.assign.bind() : function (n) {
7182
+ function _extends$2() {
7183
+ return _extends$2 = Object.assign ? Object.assign.bind() : function (n) {
7102
7184
  for (var e = 1; e < arguments.length; e++) {
7103
7185
  var t = arguments[e];
7104
7186
  for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
7105
7187
  }
7106
7188
  return n;
7107
- }, _extends$1.apply(null, arguments);
7189
+ }, _extends$2.apply(null, arguments);
7108
7190
  }
7109
7191
  function SvgAngleSmallLeft(props) {
7110
- return /*#__PURE__*/createElement("svg", _extends$1({
7192
+ return /*#__PURE__*/createElement("svg", _extends$2({
7111
7193
  xmlns: "http://www.w3.org/2000/svg",
7112
7194
  viewBox: "0 0 24 24",
7113
7195
  width: 512,
@@ -7118,17 +7200,17 @@ function SvgAngleSmallLeft(props) {
7118
7200
  }
7119
7201
 
7120
7202
  var _path$2;
7121
- function _extends$2() {
7122
- return _extends$2 = Object.assign ? Object.assign.bind() : function (n) {
7203
+ function _extends$3() {
7204
+ return _extends$3 = Object.assign ? Object.assign.bind() : function (n) {
7123
7205
  for (var e = 1; e < arguments.length; e++) {
7124
7206
  var t = arguments[e];
7125
7207
  for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
7126
7208
  }
7127
7209
  return n;
7128
- }, _extends$2.apply(null, arguments);
7210
+ }, _extends$3.apply(null, arguments);
7129
7211
  }
7130
7212
  function SvgAngleSmallRight(props) {
7131
- return /*#__PURE__*/createElement("svg", _extends$2({
7213
+ return /*#__PURE__*/createElement("svg", _extends$3({
7132
7214
  xmlns: "http://www.w3.org/2000/svg",
7133
7215
  viewBox: "0 0 24 24",
7134
7216
  width: 512,
@@ -7138,29 +7220,35 @@ function SvgAngleSmallRight(props) {
7138
7220
  })));
7139
7221
  }
7140
7222
 
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 = () => {
7223
+ var ScrollHorizontal = function ScrollHorizontal(props) {
7224
+ var _props$datas = props.datas,
7225
+ datas = _props$datas === void 0 ? [] : _props$datas,
7226
+ _props$className = props.className,
7227
+ className = _props$className === void 0 ? "" : _props$className,
7228
+ _props$style = props.style,
7229
+ style = _props$style === void 0 ? {} : _props$style,
7230
+ _props$primaryColor = props.primaryColor,
7231
+ primaryColor = _props$primaryColor === void 0 ? "" : _props$primaryColor,
7232
+ _props$renderItem = props.renderItem,
7233
+ renderItem = _props$renderItem === void 0 ? function () {} : _props$renderItem;
7234
+ var scrollContainerRef = useRef(null);
7235
+ var _useState = useState(true),
7236
+ isScrolledToLeft = _useState[0],
7237
+ setIsScrolledToLeft = _useState[1];
7238
+ var _useState2 = useState(false),
7239
+ isScrolledToRight = _useState2[0],
7240
+ setIsScrolledToRight = _useState2[1];
7241
+ var checkScrollPosition = function checkScrollPosition() {
7153
7242
  if (scrollContainerRef.current) {
7154
- const {
7155
- scrollLeft,
7156
- scrollWidth,
7157
- clientWidth
7158
- } = scrollContainerRef.current;
7159
- setIsScrolledToLeft(scrollLeft === 0);
7160
- setIsScrolledToRight(scrollLeft + clientWidth >= scrollWidth);
7243
+ var _scrollContainerRef$c = scrollContainerRef.current,
7244
+ _scrollLeft = _scrollContainerRef$c.scrollLeft,
7245
+ scrollWidth = _scrollContainerRef$c.scrollWidth,
7246
+ clientWidth = _scrollContainerRef$c.clientWidth;
7247
+ setIsScrolledToLeft(_scrollLeft === 0);
7248
+ setIsScrolledToRight(_scrollLeft + clientWidth >= scrollWidth);
7161
7249
  }
7162
7250
  };
7163
- const scrollLeft = () => {
7251
+ var scrollLeft = function scrollLeft() {
7164
7252
  if (scrollContainerRef.current) {
7165
7253
  scrollContainerRef.current.scrollBy({
7166
7254
  left: -200,
@@ -7169,7 +7257,7 @@ const ScrollHorizontal = props => {
7169
7257
  setTimeout(checkScrollPosition, 300);
7170
7258
  }
7171
7259
  };
7172
- const scrollRight = () => {
7260
+ var scrollRight = function scrollRight() {
7173
7261
  if (scrollContainerRef.current) {
7174
7262
  scrollContainerRef.current.scrollBy({
7175
7263
  left: 200,
@@ -7178,17 +7266,19 @@ const ScrollHorizontal = props => {
7178
7266
  setTimeout(checkScrollPosition, 300);
7179
7267
  }
7180
7268
  };
7181
- useEffect(() => {
7269
+ useEffect(function () {
7182
7270
  checkScrollPosition();
7183
7271
  }, [datas]);
7184
7272
  return /*#__PURE__*/React__default.createElement("div", {
7185
- className: `flex ${className}`,
7273
+ className: "flex " + className,
7186
7274
  style: style
7187
7275
  }, /*#__PURE__*/React__default.createElement("div", {
7188
- className: `flex w-full overflow-x-hidden`,
7276
+ className: "flex w-full overflow-x-hidden",
7189
7277
  ref: scrollContainerRef,
7190
7278
  onScroll: checkScrollPosition
7191
- }, datas === null || datas === void 0 ? void 0 : datas.map((item, index) => renderItem(item, index))), /*#__PURE__*/React__default.createElement("div", {
7279
+ }, datas === null || datas === void 0 ? void 0 : datas.map(function (item, index) {
7280
+ return renderItem(item, index);
7281
+ })), /*#__PURE__*/React__default.createElement("div", {
7192
7282
  className: "flex gap-2 items-center px-4"
7193
7283
  }, /*#__PURE__*/React__default.createElement("div", {
7194
7284
  onClick: scrollLeft,
@@ -7213,27 +7303,29 @@ const ScrollHorizontal = props => {
7213
7303
  }))));
7214
7304
  };
7215
7305
 
7216
- const getDurationValue = attributes => {
7306
+ var getDurationValue = function getDurationValue(attributes) {
7217
7307
  var _parsedAttributes$fin;
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";
7308
+ var parsedAttributes = JSON.parse(attributes || "[]");
7309
+ return ((_parsedAttributes$fin = parsedAttributes.find(function (attr) {
7310
+ return attr.name === "Thời lượng (phút) / buổi";
7311
+ })) === null || _parsedAttributes$fin === void 0 ? void 0 : _parsedAttributes$fin.value[0]) || "0";
7220
7312
  };
7221
7313
 
7222
- const formatCurrency = amount => {
7314
+ var formatCurrency = function formatCurrency(amount) {
7223
7315
  if (isNaN(amount)) {
7224
7316
  return '0 ₫';
7225
7317
  }
7226
- const roundedAmount = Math.round(amount);
7227
- const formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
7228
- return `${formattedAmount} ₫`;
7318
+ var roundedAmount = Math.round(amount);
7319
+ var formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
7320
+ return formattedAmount + " \u20AB";
7229
7321
  };
7230
7322
 
7231
- const ProductPrice = props => {
7232
- const {
7233
- product,
7234
- className = "",
7235
- style = {}
7236
- } = props;
7323
+ var ProductPrice = function ProductPrice(props) {
7324
+ var product = props.product,
7325
+ _props$className = props.className,
7326
+ className = _props$className === void 0 ? "" : _props$className,
7327
+ _props$style = props.style,
7328
+ style = _props$style === void 0 ? {} : _props$style;
7237
7329
  return /*#__PURE__*/React__default.createElement("div", {
7238
7330
  className: className
7239
7331
  }, product !== null && product !== void 0 && product.priceBeforeDiscount ? /*#__PURE__*/React__default.createElement("span", {
@@ -7244,10 +7336,8 @@ const ProductPrice = props => {
7244
7336
  }, formatCurrency(product === null || product === void 0 ? void 0 : product.price)));
7245
7337
  };
7246
7338
 
7247
- const ProductItem1 = props => {
7248
- const {
7249
- product
7250
- } = props;
7339
+ var ProductItem1 = function ProductItem1(props) {
7340
+ var product = props.product;
7251
7341
  return /*#__PURE__*/React__default.createElement("div", {
7252
7342
  className: "flex"
7253
7343
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
@@ -7266,33 +7356,36 @@ const ProductItem1 = props => {
7266
7356
  }))));
7267
7357
  };
7268
7358
 
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);
7359
+ var Treatments1$1 = function Treatments1(props) {
7360
+ var _props$shopConfigStyl = props.shopConfigStyle,
7361
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
7362
+ _props$data = props.data,
7363
+ data = _props$data === void 0 ? {} : _props$data,
7364
+ _props$SectionTitle = props.SectionTitle,
7365
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
7366
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
7367
+ _shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
7368
+ primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
7369
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
7370
+ secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
7371
+ _shopConfigStyle$colo4 = _shopConfigStyle$colo.textBody,
7372
+ textBody = _shopConfigStyle$colo4 === void 0 ? "#000" : _shopConfigStyle$colo4,
7373
+ _shopConfigStyle$colo5 = _shopConfigStyle$colo.textButton,
7374
+ textButton = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5,
7375
+ _shopConfigStyle$colo6 = _shopConfigStyle$colo.background,
7376
+ background = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
7377
+ var _useState = useState({}),
7378
+ params = _useState[0];
7379
+ var _CategoryController = CategoryController(_extends({}, props)),
7380
+ categories = _CategoryController.categories;
7381
+ var _ProductController = ProductController(_extends({}, props, {
7382
+ params: params
7383
+ })),
7384
+ _ProductController$pr = _ProductController.products,
7385
+ products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
7386
+ var _useState2 = useState(0),
7387
+ selectedCategory = _useState2[0],
7388
+ setSelectedCategory = _useState2[1];
7296
7389
  console.log("Treatments2 products");
7297
7390
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
7298
7391
  className: "relative w-full py-12 px-4 xl:px-20",
@@ -7306,35 +7399,39 @@ const Treatments1$1 = props => {
7306
7399
  datas: [{
7307
7400
  categoryId: 0,
7308
7401
  cateName: "Tất cả"
7309
- }, ...categories],
7402
+ }].concat(categories),
7310
7403
  style: {
7311
7404
  backgroundColor: secondary
7312
7405
  },
7313
7406
  className: "mt-6 rounded-lg overflow-hidden",
7314
7407
  primaryColor: primary,
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)
7408
+ renderItem: function renderItem(item, index) {
7409
+ return /*#__PURE__*/React__default.createElement("div", {
7410
+ key: index,
7411
+ className: "p-3 flex gap-3 shrink-0 cursor-pointer text-base",
7412
+ onClick: function onClick() {
7413
+ return setSelectedCategory(item.categoryId);
7414
+ },
7415
+ style: {
7416
+ backgroundColor: selectedCategory === item.categoryId ? primary : "inherit",
7417
+ color: selectedCategory === item.categoryId ? textButton : textBody
7418
+ }
7419
+ }, item === null || item === void 0 ? void 0 : item.cateName);
7420
+ }
7324
7421
  }), /*#__PURE__*/React__default.createElement("div", {
7325
7422
  className: "grid grid-cols-1 md:grid-cols-2 gap-10 mt-6"
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, {
7423
+ }, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
7424
+ return /*#__PURE__*/React__default.createElement(ProductItem1, {
7425
+ key: index,
7426
+ product: product === null || product === void 0 ? void 0 : product.productInfo
7427
+ });
7428
+ }))), /*#__PURE__*/React__default.createElement(Dash, {
7330
7429
  color: secondary
7331
7430
  }));
7332
7431
  };
7333
7432
 
7334
- const ProductItem2 = props => {
7335
- const {
7336
- product
7337
- } = props;
7433
+ var ProductItem2 = function ProductItem2(props) {
7434
+ var product = props.product;
7338
7435
  return /*#__PURE__*/React__default.createElement("div", {
7339
7436
  className: "text-center"
7340
7437
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
@@ -7348,29 +7445,27 @@ const ProductItem2 = props => {
7348
7445
  }, product === null || product === void 0 ? void 0 : product.productName));
7349
7446
  };
7350
7447
 
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
- });
7448
+ var Products1 = function Products1(props) {
7449
+ var _props$shopConfigStyl = props.shopConfigStyle,
7450
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
7451
+ _props$data = props.data,
7452
+ data = _props$data === void 0 ? {} : _props$data,
7453
+ _props$SectionTitle = props.SectionTitle,
7454
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
7455
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
7456
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
7457
+ secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
7458
+ _shopConfigStyle$colo6 = _shopConfigStyle$colo.background,
7459
+ background = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
7460
+ var _useState = useState({
7461
+ size: 4
7462
+ }),
7463
+ params = _useState[0];
7464
+ var _ProductController = ProductController(_extends({}, props, {
7465
+ params: params
7466
+ })),
7467
+ _ProductController$pr = _ProductController.products,
7468
+ products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
7374
7469
  console.log("Products1 products");
7375
7470
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
7376
7471
  className: "w-full py-12 px-4 xl:px-20 text-center",
@@ -7382,10 +7477,12 @@ const Products1 = props => {
7382
7477
  shopConfigStyle: shopConfigStyle
7383
7478
  }), /*#__PURE__*/React__default.createElement("div", {
7384
7479
  className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-10 mt-12"
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, {
7480
+ }, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
7481
+ return /*#__PURE__*/React__default.createElement(ProductItem2, {
7482
+ key: index,
7483
+ product: product === null || product === void 0 ? void 0 : product.productInfo
7484
+ });
7485
+ })), /*#__PURE__*/React__default.createElement(Button, {
7389
7486
  label: "Xem tất cả",
7390
7487
  shopConfigStyle: shopConfigStyle,
7391
7488
  className: "mt-12"
@@ -7394,12 +7491,10 @@ const Products1 = props => {
7394
7491
  }));
7395
7492
  };
7396
7493
 
7397
- const ItemProduct = props => {
7494
+ var ItemProduct = function ItemProduct(props) {
7398
7495
  var _shopConfigStyle$colo, _shopConfigStyle$colo2, _shopConfigStyle$colo3;
7399
- const {
7400
- product,
7401
- shopConfigStyle
7402
- } = props;
7496
+ var product = props.product,
7497
+ shopConfigStyle = props.shopConfigStyle;
7403
7498
  return /*#__PURE__*/React__default.createElement("div", {
7404
7499
  className: "pb-4 rounded-2xl w-full",
7405
7500
  style: {
@@ -7408,7 +7503,7 @@ const ItemProduct = props => {
7408
7503
  }, /*#__PURE__*/React__default.createElement("div", {
7409
7504
  className: "relative pt-2 flex justify-center h-32 sm:h-40 lg:h-52"
7410
7505
  }, /*#__PURE__*/React__default.createElement("a", {
7411
- href: `#`
7506
+ href: "#"
7412
7507
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
7413
7508
  product: product,
7414
7509
  className: "aspect-w-1 aspect-h-1 max-h-32 sm:max-h-40 lg:max-h-52 object-cover"
@@ -7432,18 +7527,25 @@ const ItemProduct = props => {
7432
7527
  }))));
7433
7528
  };
7434
7529
 
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 = () => {
7530
+ var Carousel = function Carousel(props) {
7531
+ var carouselRef = useRef(null);
7532
+ var _useState = useState(false),
7533
+ isScrolledToLeft = _useState[0],
7534
+ setIsScrolledToLeft = _useState[1];
7535
+ var _useState2 = useState(true),
7536
+ isScrolledToRight = _useState2[0],
7537
+ setIsScrolledToRight = _useState2[1];
7538
+ var _props$datas = props.datas,
7539
+ datas = _props$datas === void 0 ? [] : _props$datas,
7540
+ _props$className = props.className,
7541
+ className = _props$className === void 0 ? "" : _props$className,
7542
+ _props$style = props.style,
7543
+ style = _props$style === void 0 ? {} : _props$style,
7544
+ _props$primaryColor = props.primaryColor,
7545
+ primaryColor = _props$primaryColor === void 0 ? "" : _props$primaryColor,
7546
+ _props$renderItem = props.renderItem,
7547
+ renderItem = _props$renderItem === void 0 ? function () {} : _props$renderItem;
7548
+ var handleClickPrevImg = function handleClickPrevImg() {
7447
7549
  if (carouselRef.current) {
7448
7550
  setIsScrolledToLeft(true);
7449
7551
  setIsScrolledToRight(false);
@@ -7453,7 +7555,7 @@ const Carousel = props => {
7453
7555
  });
7454
7556
  }
7455
7557
  };
7456
- const handleClickNextImg = () => {
7558
+ var handleClickNextImg = function handleClickNextImg() {
7457
7559
  setIsScrolledToRight(true);
7458
7560
  setIsScrolledToLeft(false);
7459
7561
  if (carouselRef.current) {
@@ -7464,12 +7566,14 @@ const Carousel = props => {
7464
7566
  }
7465
7567
  };
7466
7568
  return /*#__PURE__*/React__default.createElement("div", {
7467
- className: `relative ${className} `,
7569
+ className: "relative " + className + " ",
7468
7570
  style: style
7469
7571
  }, /*#__PURE__*/React__default.createElement("div", {
7470
7572
  className: " w-full pe-2 h-full flex overflow-x-auto hide-scrollbar",
7471
7573
  ref: carouselRef
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", {
7574
+ }, datas && datas.length > 0 && datas.map(function (item, index) {
7575
+ return renderItem(item, index);
7576
+ })), datas && datas.length > 0 && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("button", {
7473
7577
  className: " hidden md:block bg-gray3 p-3 rounded-full absolute top-[45%] left-[-8px] lg:left-[-1%]",
7474
7578
  style: {
7475
7579
  backgroundColor: isScrolledToLeft ? primaryColor : "#BDBDBD"
@@ -7488,21 +7592,23 @@ const Carousel = props => {
7488
7592
  }))));
7489
7593
  };
7490
7594
 
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);
7595
+ var Products2 = function Products2(props) {
7596
+ var shopConfigStyle = props.shopConfigStyle,
7597
+ data = props.data;
7598
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
7599
+ _shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
7600
+ primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
7601
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
7602
+ secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
7603
+ _shopConfigStyle$colo4 = _shopConfigStyle$colo.textBody,
7604
+ textBody = _shopConfigStyle$colo4 === void 0 ? "#000" : _shopConfigStyle$colo4,
7605
+ _shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
7606
+ background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5,
7607
+ _shopConfigStyle$colo6 = _shopConfigStyle$colo.textButton,
7608
+ textButton = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
7609
+ var _ProductController = ProductController(props),
7610
+ _ProductController$pr = _ProductController.products,
7611
+ products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
7506
7612
  console.log("Products2 products");
7507
7613
  return /*#__PURE__*/React__default.createElement("div", {
7508
7614
  className: "pt-10 px-4 xl:px-20",
@@ -7523,29 +7629,39 @@ const Products2 = props => {
7523
7629
  }, data === null || data === void 0 ? void 0 : data.sectionTitle), /*#__PURE__*/React__default.createElement(Carousel, {
7524
7630
  datas: products,
7525
7631
  primaryColor: primary,
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
- }))
7632
+ renderItem: function renderItem(item, index) {
7633
+ return /*#__PURE__*/React__default.createElement("div", {
7634
+ key: "carousel-" + index,
7635
+ className: " min-w-[40vw] object-cover sm:min-w-[25vw] lg:min-w-[22vw] xl:min-w-[20vw] pe-4 xl:pe-6"
7636
+ }, /*#__PURE__*/React__default.createElement(ItemProduct, {
7637
+ product: item.productInfo,
7638
+ shopConfigStyle: shopConfigStyle
7639
+ }));
7640
+ }
7533
7641
  })));
7534
7642
  };
7535
7643
 
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 = () => {
7644
+ var CarouselItem = function CarouselItem(props) {
7645
+ var listRef = useRef(null);
7646
+ var _useState = useState(false),
7647
+ isScrolledToLeft = _useState[0],
7648
+ setIsScrolledToLeft = _useState[1];
7649
+ var _useState2 = useState(true),
7650
+ isScrolledToRight = _useState2[0],
7651
+ setIsScrolledToRight = _useState2[1];
7652
+ var _props$datas = props.datas,
7653
+ datas = _props$datas === void 0 ? [] : _props$datas,
7654
+ _props$className = props.className,
7655
+ className = _props$className === void 0 ? "" : _props$className,
7656
+ _props$style = props.style,
7657
+ style = _props$style === void 0 ? {} : _props$style,
7658
+ _props$primaryColor = props.primaryColor,
7659
+ primaryColor = _props$primaryColor === void 0 ? "" : _props$primaryColor,
7660
+ _props$textButtonColo = props.textButtonColor,
7661
+ textButtonColor = _props$textButtonColo === void 0 ? "" : _props$textButtonColo,
7662
+ _props$renderItem = props.renderItem,
7663
+ renderItem = _props$renderItem === void 0 ? function () {} : _props$renderItem;
7664
+ var handleClickPrevImg = function handleClickPrevImg() {
7549
7665
  if (listRef.current) {
7550
7666
  setIsScrolledToLeft(true);
7551
7667
  setIsScrolledToRight(false);
@@ -7555,7 +7671,7 @@ const CarouselItem = props => {
7555
7671
  });
7556
7672
  }
7557
7673
  };
7558
- const handleClickNextImg = () => {
7674
+ var handleClickNextImg = function handleClickNextImg() {
7559
7675
  setIsScrolledToRight(true);
7560
7676
  setIsScrolledToLeft(false);
7561
7677
  if (listRef.current) {
@@ -7567,14 +7683,16 @@ const CarouselItem = props => {
7567
7683
  };
7568
7684
  console.log("check propsss::::::::", datas);
7569
7685
  return /*#__PURE__*/React__default.createElement("div", {
7570
- className: `grid grid-cols-12 h-12 ${className}`,
7686
+ className: "grid grid-cols-12 h-12 " + className,
7571
7687
  style: style
7572
7688
  }, /*#__PURE__*/React__default.createElement("div", {
7573
7689
  className: "col-span-12 lg:col-span-10 md:col-span-9 overflow-hidden "
7574
7690
  }, /*#__PURE__*/React__default.createElement("div", {
7575
7691
  className: "flex overflow-x-auto gap-2 hide-scrollbar items-center",
7576
7692
  ref: listRef
7577
- }, datas && datas.length > 0 && datas.map((item, index) => renderItem(item, index)))), datas && datas.length > 0 && /*#__PURE__*/React__default.createElement("div", {
7693
+ }, datas && datas.length > 0 && datas.map(function (item, index) {
7694
+ return renderItem(item, index);
7695
+ }))), datas && datas.length > 0 && /*#__PURE__*/React__default.createElement("div", {
7578
7696
  className: "hidden my-auto col-span-5 md:col-span-3 lg:col-span-2 gap-4 md:flex justify-end "
7579
7697
  }, /*#__PURE__*/React__default.createElement("button", {
7580
7698
  className: " px-4 py-3 rounded-full",
@@ -7601,38 +7719,46 @@ const CarouselItem = props => {
7601
7719
  }))));
7602
7720
  };
7603
7721
 
7604
- const ListProduct = props => {
7605
- const {
7606
- datas = [],
7607
- style = {},
7608
- className = {},
7609
- renderItem = () => {}
7610
- } = props;
7722
+ var ListProduct = function ListProduct(props) {
7723
+ var _props$datas = props.datas,
7724
+ datas = _props$datas === void 0 ? [] : _props$datas,
7725
+ _props$style = props.style,
7726
+ style = _props$style === void 0 ? {} : _props$style,
7727
+ _props$className = props.className,
7728
+ className = _props$className === void 0 ? {} : _props$className,
7729
+ _props$renderItem = props.renderItem,
7730
+ renderItem = _props$renderItem === void 0 ? function () {} : _props$renderItem;
7611
7731
  return /*#__PURE__*/React__default.createElement("div", {
7612
- className: `grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-4 2xl:grid-cols-5 mt-6 ${className}`,
7732
+ className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-4 2xl:grid-cols-5 mt-6 " + className,
7613
7733
  style: style
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);
7734
+ }, datas && datas.length > 0 && datas.map(function (item, index) {
7735
+ return renderItem(item, index);
7736
+ }));
7737
+ };
7738
+
7739
+ var Products10 = function Products10(props) {
7740
+ var _useState = useState(""),
7741
+ selectCategory = _useState[0],
7742
+ setSelectCategory = _useState[1];
7743
+ var shopConfigStyle = props.shopConfigStyle,
7744
+ data = props.data;
7745
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
7746
+ _shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
7747
+ primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
7748
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
7749
+ textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
7750
+ _shopConfigStyle$colo4 = _shopConfigStyle$colo.textButton,
7751
+ textButton = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
7752
+ _shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
7753
+ background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5,
7754
+ _shopConfigStyle$colo6 = _shopConfigStyle$colo.bgSecondary,
7755
+ bgSecondary = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
7756
+ var _CategoryController = CategoryController(props),
7757
+ _CategoryController$c = _CategoryController.categories,
7758
+ categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
7759
+ var _ProductController = ProductController(props),
7760
+ _ProductController$pr = _ProductController.products,
7761
+ products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
7636
7762
  console.log("Products10 products");
7637
7763
  return /*#__PURE__*/React__default.createElement("div", {
7638
7764
  className: "w-full pt-10 px-4 xl:px-20",
@@ -7646,40 +7772,42 @@ const Products10 = props => {
7646
7772
  datas: categories,
7647
7773
  primaryColor: primary,
7648
7774
  textButtonColor: textButton,
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)
7775
+ renderItem: function renderItem(item, index) {
7776
+ return /*#__PURE__*/React__default.createElement("div", {
7777
+ key: item.categoryId + "-" + index,
7778
+ className: "border-2 items whitespace-nowrap p-2 rounded-lg cursor-pointer ",
7779
+ style: {
7780
+ borderColor: primary,
7781
+ color: selectCategory === item.categoryId ? textButton : primary,
7782
+ background: selectCategory === item.categoryId ? primary : bgSecondary
7783
+ },
7784
+ onClick: function onClick() {
7785
+ setSelectCategory(item.categoryId);
7786
+ }
7787
+ }, item.cateName);
7788
+ }
7661
7789
  }), /*#__PURE__*/React__default.createElement(ListProduct, {
7662
7790
  datas: products,
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
- }))
7791
+ renderItem: function renderItem(item, index) {
7792
+ return /*#__PURE__*/React__default.createElement("div", {
7793
+ key: "productfsd-" + index
7794
+ }, /*#__PURE__*/React__default.createElement(ItemProduct, {
7795
+ product: item.productInfo,
7796
+ shopConfigStyle: shopConfigStyle
7797
+ }));
7798
+ }
7669
7799
  }));
7670
7800
  };
7671
7801
 
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);
7802
+ var ProductsTop1 = function ProductsTop1(props) {
7803
+ var data = props.data,
7804
+ shopConfigStyle = props.shopConfigStyle;
7805
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
7806
+ _shopConfigStyle$colo2 = _shopConfigStyle$colo.background,
7807
+ background = _shopConfigStyle$colo2 === void 0 ? "#fff" : _shopConfigStyle$colo2;
7808
+ var _ProductController = ProductController(props),
7809
+ _ProductController$pr = _ProductController.products,
7810
+ products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
7683
7811
  console.log("ProductsTop1 products");
7684
7812
  return /*#__PURE__*/React__default.createElement("div", {
7685
7813
  className: "w-full pt-10 px-4 xl:px-20",
@@ -7690,93 +7818,155 @@ const ProductsTop1 = props => {
7690
7818
  className: "text-2xl md:text-3xl lg:text-4xl font-semibold mb-6"
7691
7819
  }, data === null || data === void 0 ? void 0 : data.sectionTitle), /*#__PURE__*/React__default.createElement(ListProduct, {
7692
7820
  datas: products,
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
- }))
7821
+ renderItem: function renderItem(item, index) {
7822
+ return /*#__PURE__*/React__default.createElement("div", {
7823
+ key: "productfsd-" + index
7824
+ }, /*#__PURE__*/React__default.createElement(ItemProduct, {
7825
+ product: item.productInfo,
7826
+ shopConfigStyle: shopConfigStyle
7827
+ }));
7828
+ }
7699
7829
  }));
7700
7830
  };
7701
7831
 
7702
- const getEmployeeListApi = shopId => {
7832
+ var getEmployeeListApi = function getEmployeeListApi(shopId) {
7703
7833
  return api({
7704
7834
  method: "post",
7705
- url: `/chain-employment-profile/filter-employ-by-customer`,
7835
+ url: "/chain-employment-profile/filter-employ-by-customer",
7706
7836
  headers: {
7707
- shopId
7837
+ shopId: shopId
7708
7838
  }
7709
7839
  });
7710
7840
  };
7711
7841
 
7712
- const EmployeeController = props => {
7713
- const {
7714
- isAutoGetList = true,
7715
- shopConfig
7716
- } = props;
7717
- const [listEmployment, setListEmployment] = useState([]);
7718
- useEffect(() => {
7842
+ var EmployeeController = function EmployeeController(props) {
7843
+ var _props$isAutoGetList = props.isAutoGetList,
7844
+ isAutoGetList = _props$isAutoGetList === void 0 ? true : _props$isAutoGetList,
7845
+ shopConfig = props.shopConfig;
7846
+ var _useState = useState([]),
7847
+ listEmployment = _useState[0],
7848
+ setListEmployment = _useState[1];
7849
+ useEffect(function () {
7719
7850
  if (isAutoGetList) {
7720
7851
  getListEmployee();
7721
7852
  }
7722
7853
  }, [isAutoGetList]);
7723
- const getListEmployee = async () => {
7854
+ var getListEmployee = function getListEmployee() {
7724
7855
  try {
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;
7856
+ return Promise.resolve(_catch(function () {
7857
+ return Promise.resolve(getEmployeeListApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId)).then(function (res) {
7858
+ var _res$data, _res$data$status;
7859
+ 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) {
7860
+ var _res$data2;
7861
+ setListEmployment((res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data) || []);
7862
+ }
7863
+ return res;
7864
+ });
7865
+ }, function (e) {
7866
+ console.log(e);
7867
+ }));
7732
7868
  } catch (e) {
7733
- console.log(e);
7869
+ return Promise.reject(e);
7734
7870
  }
7735
7871
  };
7736
7872
  return {
7737
- listEmployment,
7738
- getListEmployee
7873
+ listEmployment: listEmployment,
7874
+ getListEmployee: getListEmployee
7739
7875
  };
7740
7876
  };
7741
7877
 
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);
7878
+ var createSpaScheduleApi = function createSpaScheduleApi(shopId, data) {
7879
+ return api({
7880
+ method: "post",
7881
+ url: "/spa-schedule/customer/create",
7882
+ data: data,
7883
+ headers: {
7884
+ shopId: shopId
7768
7885
  }
7769
- }));
7770
- const validateData = () => {
7771
- let count = 0;
7772
- rules.forEach(e => {
7886
+ });
7887
+ };
7888
+
7889
+ var _excluded = ["productName"];
7890
+ var BookingController = function BookingController(props) {
7891
+ _objectDestructuringEmpty(props);
7892
+ var createSchedule = function createSchedule(customerName, customerPhone, scheduleDate, services, shopId) {
7893
+ try {
7894
+ return Promise.resolve(_catch(function () {
7895
+ var data = {
7896
+ appId: "SSPA",
7897
+ customerName: customerName,
7898
+ customerPhone: customerPhone.replace("+", ""),
7899
+ isSellService: true,
7900
+ scheduleDate: new Date(scheduleDate).getTime(),
7901
+ services: services === null || services === void 0 ? void 0 : services.map(function (_ref) {
7902
+ var productName = _ref.productName,
7903
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
7904
+ return rest;
7905
+ }),
7906
+ shopId: shopId
7907
+ };
7908
+ return Promise.resolve(createSpaScheduleApi(shopId, data));
7909
+ }, function (e) {
7910
+ console.log(e);
7911
+ }));
7912
+ } catch (e) {
7913
+ return Promise.reject(e);
7914
+ }
7915
+ };
7916
+ return {
7917
+ createSchedule: createSchedule
7918
+ };
7919
+ };
7920
+
7921
+ var Input = forwardRef(function (props, ref) {
7922
+ var _props$label = props.label,
7923
+ label = _props$label === void 0 ? "" : _props$label,
7924
+ _props$placeholder = props.placeholder,
7925
+ placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
7926
+ _props$className = props.className,
7927
+ className = _props$className === void 0 ? "" : _props$className,
7928
+ _props$name = props.name,
7929
+ name = _props$name === void 0 ? "" : _props$name,
7930
+ _props$onChange = props.onChange,
7931
+ onChange = _props$onChange === void 0 ? function () {} : _props$onChange,
7932
+ _props$defaultValue = props.defaultValue,
7933
+ defaultValue = _props$defaultValue === void 0 ? "" : _props$defaultValue,
7934
+ _props$type = props.type,
7935
+ type = _props$type === void 0 ? "text" : _props$type,
7936
+ _props$rules = props.rules,
7937
+ rules = _props$rules === void 0 ? [] : _props$rules;
7938
+ var _useState = useState(defaultValue),
7939
+ value = _useState[0],
7940
+ _setValue = _useState[1];
7941
+ var _useState2 = useState(""),
7942
+ error = _useState2[0],
7943
+ _setError = _useState2[1];
7944
+ useImperativeHandle(ref, function () {
7945
+ return {
7946
+ validateData: function validateData() {
7947
+ return _validateData();
7948
+ },
7949
+ setValue: function setValue(text) {
7950
+ return _setValue(text);
7951
+ },
7952
+ getValue: function getValue() {
7953
+ return value();
7954
+ },
7955
+ setError: function setError(err) {
7956
+ return _setError(err);
7957
+ }
7958
+ };
7959
+ });
7960
+ var _validateData = function _validateData() {
7961
+ var count = 0;
7962
+ rules.forEach(function (e) {
7773
7963
  var _e$pattern;
7774
7964
  if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
7775
- setError(e === null || e === void 0 ? void 0 : e.message);
7965
+ _setError(e === null || e === void 0 ? void 0 : e.message);
7776
7966
  count++;
7777
7967
  return false;
7778
7968
  } 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))) {
7779
- setError(e === null || e === void 0 ? void 0 : e.message);
7969
+ _setError(e === null || e === void 0 ? void 0 : e.message);
7780
7970
  count++;
7781
7971
  return false;
7782
7972
  }
@@ -7784,20 +7974,20 @@ const Input = forwardRef((props, ref) => {
7784
7974
  if (count) {
7785
7975
  return false;
7786
7976
  } else {
7787
- setError('');
7977
+ _setError('');
7788
7978
  return true;
7789
7979
  }
7790
7980
  };
7791
- const handleOnChange = event => {
7792
- const {
7793
- value
7794
- } = event.target;
7795
- setValue(value);
7981
+ var handleOnChange = function handleOnChange(event) {
7982
+ var value = event.target.value;
7983
+ _setValue(value);
7796
7984
  onChange === null || onChange === void 0 ? void 0 : onChange(value);
7797
7985
  };
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", {
7986
+ var _className = "h-10 py-1 px-2 border border-stroke rounded " + className;
7987
+ var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
7988
+ return (e === null || e === void 0 ? void 0 : e.type) === "required";
7989
+ }));
7990
+ var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
7801
7991
  className: "text-danger"
7802
7992
  }, " *") : null;
7803
7993
  return /*#__PURE__*/React__default.createElement("div", null, label ? /*#__PURE__*/React__default.createElement("div", {
@@ -7813,46 +8003,57 @@ const Input = forwardRef((props, ref) => {
7813
8003
  }), error ? /*#__PURE__*/React__default.createElement("div", null, error) : null);
7814
8004
  });
7815
8005
 
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 => {
8006
+ var Select = forwardRef(function (props, ref) {
8007
+ var _props$label = props.label,
8008
+ label = _props$label === void 0 ? "" : _props$label,
8009
+ _props$placeholder = props.placeholder,
8010
+ placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
8011
+ _props$className = props.className,
8012
+ className = _props$className === void 0 ? "" : _props$className,
8013
+ _props$name = props.name,
8014
+ name = _props$name === void 0 ? "" : _props$name,
8015
+ _props$onChange = props.onChange,
8016
+ onChange = _props$onChange === void 0 ? function () {} : _props$onChange,
8017
+ _props$defaultValue = props.defaultValue,
8018
+ defaultValue = _props$defaultValue === void 0 ? null : _props$defaultValue,
8019
+ _props$rules = props.rules,
8020
+ rules = _props$rules === void 0 ? [] : _props$rules,
8021
+ _props$options = props.options,
8022
+ options = _props$options === void 0 ? [] : _props$options,
8023
+ _props$required = props.required,
8024
+ required = _props$required === void 0 ? false : _props$required;
8025
+ var _useState = useState(defaultValue),
8026
+ value = _useState[0],
8027
+ _setValue = _useState[1];
8028
+ var _useState2 = useState(""),
8029
+ error = _useState2[0],
8030
+ _setError = _useState2[1];
8031
+ useImperativeHandle(ref, function () {
8032
+ return {
8033
+ validateData: function validateData() {
8034
+ return _validateData();
8035
+ },
8036
+ setValue: function setValue(text) {
8037
+ return _setValue(text);
8038
+ },
8039
+ getValue: function getValue() {
8040
+ return value();
8041
+ },
8042
+ setError: function setError(err) {
8043
+ return _setError(err);
8044
+ }
8045
+ };
8046
+ });
8047
+ var _validateData = function _validateData() {
8048
+ var count = 0;
8049
+ rules.forEach(function (e) {
7849
8050
  var _e$pattern;
7850
8051
  if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
7851
- setError(e === null || e === void 0 ? void 0 : e.message);
8052
+ _setError(e === null || e === void 0 ? void 0 : e.message);
7852
8053
  count++;
7853
8054
  return false;
7854
8055
  } 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))) {
7855
- setError(e === null || e === void 0 ? void 0 : e.message);
8056
+ _setError(e === null || e === void 0 ? void 0 : e.message);
7856
8057
  count++;
7857
8058
  return false;
7858
8059
  }
@@ -7860,19 +8061,17 @@ const Select = forwardRef((props, ref) => {
7860
8061
  if (count) {
7861
8062
  return false;
7862
8063
  } else {
7863
- setError('');
8064
+ _setError('');
7864
8065
  return true;
7865
8066
  }
7866
8067
  };
7867
- const handleOnChange = event => {
7868
- const {
7869
- value
7870
- } = event.target;
7871
- setValue(value);
8068
+ var handleOnChange = function handleOnChange(event) {
8069
+ var value = event.target.value;
8070
+ _setValue(value);
7872
8071
  onChange === null || onChange === void 0 ? void 0 : onChange(value);
7873
8072
  };
7874
- const _className = `h-10 py-1 px-2 border border-stroke rounded ${className}`;
7875
- const labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
8073
+ var _className = "h-10 py-1 px-2 border border-stroke rounded " + className;
8074
+ var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
7876
8075
  className: "text-danger"
7877
8076
  }, " *") : null;
7878
8077
  return /*#__PURE__*/React__default.createElement("div", null, label ? /*#__PURE__*/React__default.createElement("div", {
@@ -7888,45 +8087,51 @@ const Select = forwardRef((props, ref) => {
7888
8087
  disabled: true,
7889
8088
  selected: true,
7890
8089
  hidden: true
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);
8090
+ }, placeholder), options === null || options === void 0 ? void 0 : options.map(function (option, index) {
8091
+ return /*#__PURE__*/React__default.createElement("option", {
8092
+ value: option.value,
8093
+ key: index
8094
+ }, option === null || option === void 0 ? void 0 : option.label);
8095
+ })), error ? /*#__PURE__*/React__default.createElement("div", null, error) : null);
7895
8096
  });
7896
8097
 
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", {
8098
+ var DateTimePicker = function DateTimePicker(props) {
8099
+ var _props$label = props.label,
8100
+ label = _props$label === void 0 ? "" : _props$label,
8101
+ _props$className = props.className,
8102
+ className = _props$className === void 0 ? "" : _props$className,
8103
+ _props$defaultValue = props.defaultValue,
8104
+ defaultValue = _props$defaultValue === void 0 ? new Date() : _props$defaultValue,
8105
+ _props$required = props.required,
8106
+ required = _props$required === void 0 ? false : _props$required;
8107
+ var _useState = useState(defaultValue),
8108
+ value = _useState[0],
8109
+ setValue = _useState[1];
8110
+ var _useState2 = useState(""),
8111
+ error = _useState2[0];
8112
+ var _className = "h-10 flex items-center py-1 px-2 border border-stroke rounded bg-white cursor-pointer " + className;
8113
+ var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
7912
8114
  className: "text-danger"
7913
8115
  }, " *") : null;
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));
8116
+ var CustomInput = forwardRef(function (_ref, ref) {
8117
+ var value = _ref.value,
8118
+ onClick = _ref.onClick,
8119
+ className = _ref.className;
8120
+ return /*#__PURE__*/React__default.createElement("div", {
8121
+ className: className,
8122
+ onClick: onClick,
8123
+ ref: ref
8124
+ }, value);
8125
+ });
7923
8126
  return /*#__PURE__*/React__default.createElement("div", {
7924
8127
  className: "w-full"
7925
8128
  }, label ? /*#__PURE__*/React__default.createElement("div", {
7926
8129
  className: "mb-1"
7927
8130
  }, label, labelRequired) : null, /*#__PURE__*/React__default.createElement(DatePicker, {
7928
8131
  selected: value,
7929
- onChange: date => setValue(date),
8132
+ onChange: function onChange(date) {
8133
+ return setValue(date);
8134
+ },
7930
8135
  customInput: /*#__PURE__*/React__default.createElement(CustomInput, {
7931
8136
  className: _className
7932
8137
  }),
@@ -7934,37 +8139,30 @@ const DateTimePicker = props => {
7934
8139
  }), error ? /*#__PURE__*/React__default.createElement("div", null, error) : null);
7935
8140
  };
7936
8141
 
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
- });
8142
+ var BookingForm = function BookingForm(props) {
8143
+ var _props$shopConfigStyl = props.shopConfigStyle,
8144
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
8145
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
8146
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
8147
+ secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
8148
+ var _useState = useState(false),
8149
+ isAutoGetListProduct = _useState[0];
8150
+ var _useState2 = useState({
8151
+ types: "1,10"
8152
+ }),
8153
+ productsParams = _useState2[0];
8154
+ var _useState3 = useState(false),
8155
+ isAutoGetListEmployee = _useState3[0];
8156
+ var _useState4 = useState(new Date());
8157
+ var _EmployeeController = EmployeeController(_extends({}, props, {
8158
+ isAutoGetList: isAutoGetListEmployee
8159
+ }));
8160
+ var _ProductController = ProductController(_extends({}, props, {
8161
+ isAutoGetList: isAutoGetListProduct,
8162
+ params: productsParams
8163
+ }));
7967
8164
  console.log("BookingForm products");
8165
+ var _BookingController = BookingController(props);
7968
8166
  return /*#__PURE__*/React__default.createElement("div", {
7969
8167
  className: "grid gap-4 rounded-lg p-6",
7970
8168
  style: {
@@ -8013,20 +8211,19 @@ const BookingForm = props => {
8013
8211
  })));
8014
8212
  };
8015
8213
 
8016
- const Booking1 = props => {
8214
+ var Booking1 = function Booking1(props) {
8017
8215
  var _data$data, _data$data$, _data$data2, _data$data2$;
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;
8216
+ var _props$shopConfigStyl = props.shopConfigStyle,
8217
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
8218
+ _props$shopConfig = props.shopConfig,
8219
+ shopConfig = _props$shopConfig === void 0 ? {} : _props$shopConfig,
8220
+ _props$data = props.data,
8221
+ data = _props$data === void 0 ? {} : _props$data,
8222
+ _props$SectionTitle = props.SectionTitle,
8223
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
8224
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
8225
+ _shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
8226
+ background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
8030
8227
  console.log("booking data", data);
8031
8228
  return /*#__PURE__*/React__default.createElement("div", {
8032
8229
  className: "relative w-full px-4 xl:px-20 py-12",
@@ -8048,40 +8245,34 @@ const Booking1 = props => {
8048
8245
  }, 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))));
8049
8246
  };
8050
8247
 
8051
- const Banner1 = props => {
8052
- const {
8053
- data
8054
- } = props;
8055
- const sectionData = data === null || data === void 0 ? void 0 : data.data;
8248
+ var Banner1 = function Banner1(props) {
8249
+ var data = props.data;
8250
+ var sectionData = data === null || data === void 0 ? void 0 : data.data;
8056
8251
  return /*#__PURE__*/React__default.createElement("div", {
8057
8252
  className: "w-full pt-10 px-4 xl:px-20 bg-background"
8058
8253
  }, /*#__PURE__*/React__default.createElement("h3", {
8059
8254
  className: "text-2xl lg:text-3xl xl:text-4xl font-semibold"
8060
8255
  }, data === null || data === void 0 ? void 0 : data.sectionTitle), /*#__PURE__*/React__default.createElement("div", {
8061
8256
  className: "grid grid-cols-1 sm:grid-cols-3 gap-6 mt-6"
8062
- }, sectionData && sectionData.length > 0 && sectionData.map((item, index) => {
8257
+ }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
8063
8258
  return /*#__PURE__*/React__default.createElement("img", {
8064
8259
  src: item === null || item === void 0 ? void 0 : item.srcImage,
8065
8260
  alt: "",
8066
8261
  className: "rounded-2xl",
8067
- key: `hnfhn-${index}`
8262
+ key: "hnfhn-" + index
8068
8263
  });
8069
8264
  })));
8070
8265
  };
8071
8266
 
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;
8267
+ var Partner1 = function Partner1(props) {
8268
+ var shopConfigStyle = props.shopConfigStyle,
8269
+ data = props.data;
8270
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
8271
+ _shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
8272
+ background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5,
8273
+ _shopConfigStyle$colo6 = _shopConfigStyle$colo.bgSecondary,
8274
+ bgSecondary = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
8275
+ var sectionData = data === null || data === void 0 ? void 0 : data.data;
8085
8276
  return /*#__PURE__*/React__default.createElement("div", {
8086
8277
  className: "w-full pt-10 px-4 xl:px-20",
8087
8278
  style: {
@@ -8094,9 +8285,9 @@ const Partner1 = props => {
8094
8285
  style: {
8095
8286
  background: bgSecondary
8096
8287
  }
8097
- }, sectionData && sectionData.length > 0 && sectionData.map((item, index) => {
8288
+ }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
8098
8289
  return /*#__PURE__*/React__default.createElement("div", {
8099
- key: `xfriidj-${index}`
8290
+ key: "xfriidj-" + index
8100
8291
  }, /*#__PURE__*/React__default.createElement("img", {
8101
8292
  src: item.srcImage,
8102
8293
  alt: ""
@@ -8104,19 +8295,17 @@ const Partner1 = props => {
8104
8295
  })));
8105
8296
  };
8106
8297
 
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;
8298
+ var Address1 = function Address1(props) {
8299
+ var shopConfigStyle = props.shopConfigStyle,
8300
+ data = props.data;
8301
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
8302
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
8303
+ textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
8304
+ _shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
8305
+ background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5,
8306
+ _shopConfigStyle$colo6 = _shopConfigStyle$colo.bgSecondary,
8307
+ bgSecondary = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
8308
+ var sectionData = data === null || data === void 0 ? void 0 : data.data;
8120
8309
  return /*#__PURE__*/React__default.createElement("div", {
8121
8310
  className: "w-full pt-10 px-4 xl:px-20 ",
8122
8311
  style: {
@@ -8127,10 +8316,10 @@ const Address1 = props => {
8127
8316
  className: "text-2xl lg:text-3xl xl:text-4xl font-semibold"
8128
8317
  }, data === null || data === void 0 ? void 0 : data.sectionTitle), /*#__PURE__*/React__default.createElement("div", {
8129
8318
  className: "grid grid-cols-2 sm:grid-cols-3 gap-4 mt-6 "
8130
- }, sectionData && sectionData.length > 0 && sectionData.map((item, index) => {
8319
+ }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
8131
8320
  return /*#__PURE__*/React__default.createElement("div", {
8132
8321
  className: "lg:leading-6 p-4 rounded-xl",
8133
- key: `fyfoy-${index}`,
8322
+ key: "fyfoy-" + index,
8134
8323
  style: {
8135
8324
  background: bgSecondary
8136
8325
  }
@@ -8148,16 +8337,14 @@ const Address1 = props => {
8148
8337
  })));
8149
8338
  };
8150
8339
 
8151
- const Links1 = props => {
8152
- const {
8153
- data
8154
- } = props;
8155
- const sectionData = data === null || data === void 0 ? void 0 : data.data;
8340
+ var Links1 = function Links1(props) {
8341
+ var data = props.data;
8342
+ var sectionData = data === null || data === void 0 ? void 0 : data.data;
8156
8343
  return /*#__PURE__*/React__default.createElement("div", {
8157
8344
  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"
8158
- }, sectionData && sectionData.length > 0 && sectionData.map((item, index) => {
8345
+ }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
8159
8346
  return /*#__PURE__*/React__default.createElement("div", {
8160
- key: `qwikf-${index}`
8347
+ key: "qwikf-" + index
8161
8348
  }, /*#__PURE__*/React__default.createElement("h4", {
8162
8349
  className: "text-lg md:text-xl lg:text-2xl font-semibold mb-4"
8163
8350
  }, "\u0110a d\u1EA1ng thanh to\xE1n"), /*#__PURE__*/React__default.createElement("div", {
@@ -8174,17 +8361,17 @@ const Links1 = props => {
8174
8361
  }));
8175
8362
  };
8176
8363
 
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;
8364
+ var Footer1 = function Footer1(props) {
8365
+ var shopConfigStyle = props.shopConfigStyle;
8366
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
8367
+ _shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
8368
+ primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
8369
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
8370
+ textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
8371
+ _shopConfigStyle$colo4 = _shopConfigStyle$colo.textButton,
8372
+ textButton = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
8373
+ _shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
8374
+ bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
8188
8375
  return /*#__PURE__*/React__default.createElement("div", {
8189
8376
  className: "footer px-4 py-10 xl:px-20 ",
8190
8377
  style: {
@@ -8271,49 +8458,49 @@ const Footer1 = props => {
8271
8458
  }, "Xem \u0111i\u1EC1u kho\u1EA3n v\xE0 ch\xEDnh s\xE1ch"))));
8272
8459
  };
8273
8460
 
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++) {
8461
+ var RatingStar = function RatingStar(props) {
8462
+ var _props$star = props.star,
8463
+ star = _props$star === void 0 ? 5 : _props$star,
8464
+ _props$style = props.style,
8465
+ style = _props$style === void 0 ? {} : _props$style,
8466
+ _props$className = props.className,
8467
+ className = _props$className === void 0 ? "" : _props$className;
8468
+ var res = [];
8469
+ for (var i = 1; i < star; i++) {
8282
8470
  res.push(/*#__PURE__*/React__default.createElement(FaStar, {
8283
8471
  color: "#E2B93B"
8284
8472
  }));
8285
8473
  }
8286
- const decimalPart = star % 1;
8474
+ var decimalPart = star % 1;
8287
8475
  if (decimalPart && decimalPart >= 0.5) {
8288
8476
  res.push(/*#__PURE__*/React__default.createElement(FaRegStarHalfStroke, {
8289
8477
  color: "#E2B93B"
8290
8478
  }));
8291
8479
  }
8292
- for (let i = res === null || res === void 0 ? void 0 : res.length; i < 5; i++) {
8480
+ for (var _i = res === null || res === void 0 ? void 0 : res.length; _i < 5; _i++) {
8293
8481
  res.push(/*#__PURE__*/React__default.createElement(FaRegStar, {
8294
8482
  color: "#E2B93B"
8295
8483
  }));
8296
8484
  }
8297
8485
  return /*#__PURE__*/React__default.createElement("div", {
8298
- className: `flex gap-1 ${className}`,
8486
+ className: "flex gap-1 " + className,
8299
8487
  style: style
8300
8488
  }, res);
8301
8489
  };
8302
8490
 
8303
- const CustomerRating10 = props => {
8491
+ var CustomerRating10 = function CustomerRating10(props) {
8304
8492
  var _data$data;
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;
8493
+ var _props$shopConfigStyl = props.shopConfigStyle,
8494
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
8495
+ _props$data = props.data,
8496
+ data = _props$data === void 0 ? {} : _props$data,
8497
+ _props$SectionTitle = props.SectionTitle,
8498
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
8499
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
8500
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
8501
+ secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
8502
+ _shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
8503
+ background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
8317
8504
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
8318
8505
  className: "relative w-full py-12 px-4 xl:px-20",
8319
8506
  style: {
@@ -8324,39 +8511,40 @@ const CustomerRating10 = props => {
8324
8511
  shopConfigStyle: shopConfigStyle
8325
8512
  }), /*#__PURE__*/React__default.createElement("div", {
8326
8513
  className: "mt-12 grid grid-cols-1 md:grid-cols-2 gap-12"
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, {
8514
+ }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, index) {
8515
+ return /*#__PURE__*/React__default.createElement("div", {
8516
+ key: index,
8517
+ className: "flex"
8518
+ }, /*#__PURE__*/React__default.createElement("img", {
8519
+ src: item === null || item === void 0 ? void 0 : item.avatar,
8520
+ className: "w-[136px] h-[136px] rounded-2xl"
8521
+ }), /*#__PURE__*/React__default.createElement("div", {
8522
+ className: "ml-4"
8523
+ }, /*#__PURE__*/React__default.createElement(RatingStar, {
8524
+ star: (item === null || item === void 0 ? void 0 : item.rate) || 5
8525
+ }), /*#__PURE__*/React__default.createElement("div", {
8526
+ className: "text-xl md:text-2xl mt-2"
8527
+ }, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
8528
+ className: "mt-2"
8529
+ }, item === null || item === void 0 ? void 0 : item.content)));
8530
+ }))), /*#__PURE__*/React__default.createElement(Dash, {
8342
8531
  color: secondary
8343
8532
  }));
8344
8533
  };
8345
8534
 
8346
- const Employees1 = props => {
8535
+ var Employees1 = function Employees1(props) {
8347
8536
  var _data$data;
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;
8537
+ var _props$shopConfigStyl = props.shopConfigStyle,
8538
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
8539
+ _props$data = props.data,
8540
+ data = _props$data === void 0 ? {} : _props$data,
8541
+ _props$SectionTitle = props.SectionTitle,
8542
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
8543
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
8544
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
8545
+ secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
8546
+ _shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
8547
+ background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
8360
8548
  console.log("Employee data", data);
8361
8549
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
8362
8550
  className: "relative w-full py-12 px-4 xl:px-20",
@@ -8368,37 +8556,38 @@ const Employees1 = props => {
8368
8556
  shopConfigStyle: shopConfigStyle
8369
8557
  }), /*#__PURE__*/React__default.createElement("div", {
8370
8558
  className: "mt-12 grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 lg:gap-12"
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, {
8559
+ }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, index) {
8560
+ return /*#__PURE__*/React__default.createElement("div", {
8561
+ key: index,
8562
+ className: "w-full aspect-[3/4] relative overflow-hidden rounded-2xl"
8563
+ }, /*#__PURE__*/React__default.createElement("div", {
8564
+ 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"
8565
+ }, /*#__PURE__*/React__default.createElement("div", {
8566
+ className: "text-2xl text-white"
8567
+ }, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
8568
+ className: "text-white mt-1"
8569
+ }, item === null || item === void 0 ? void 0 : item.role)), /*#__PURE__*/React__default.createElement("img", {
8570
+ src: item === null || item === void 0 ? void 0 : item.avatar,
8571
+ className: "w-full h-full"
8572
+ }));
8573
+ }))), /*#__PURE__*/React__default.createElement(Dash, {
8384
8574
  color: secondary
8385
8575
  }));
8386
8576
  };
8387
8577
 
8388
- const Gallery1 = props => {
8578
+ var Gallery1 = function Gallery1(props) {
8389
8579
  var _data$data;
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;
8580
+ var _props$shopConfigStyl = props.shopConfigStyle,
8581
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
8582
+ _props$data = props.data,
8583
+ data = _props$data === void 0 ? {} : _props$data,
8584
+ _props$SectionTitle = props.SectionTitle,
8585
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
8586
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
8587
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
8588
+ secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
8589
+ _shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
8590
+ background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
8402
8591
  console.log("Gallery1 data", data);
8403
8592
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
8404
8593
  className: "relative w-full py-12 px-4 xl:px-20",
@@ -8410,11 +8599,13 @@ const Gallery1 = props => {
8410
8599
  shopConfigStyle: shopConfigStyle
8411
8600
  }), /*#__PURE__*/React__default.createElement("div", {
8412
8601
  className: "mt-6 grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-1 md:gap-2"
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, {
8602
+ }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
8603
+ return /*#__PURE__*/React__default.createElement("div", {
8604
+ key: index
8605
+ }, /*#__PURE__*/React__default.createElement("img", {
8606
+ src: it === null || it === void 0 ? void 0 : it.srcImage
8607
+ }));
8608
+ }))), /*#__PURE__*/React__default.createElement(Dash, {
8418
8609
  color: secondary
8419
8610
  }));
8420
8611
  };