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

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