s-platform-landing-section 0.1.30 → 0.1.32

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.
@@ -18,7 +18,7 @@ import 'slick-carousel/slick/slick.css';
18
18
  import 'slick-carousel/slick/slick-theme.css';
19
19
  import { AiOutlineShoppingCart, AiOutlinePhone } from 'react-icons/ai';
20
20
  import { GoCreditCard, GoClock } from 'react-icons/go';
21
- import { HiOutlineLocationMarker } from 'react-icons/hi';
21
+ import { HiOutlineLocationMarker, HiOutlineArrowNarrowLeft, HiOutlineArrowNarrowRight } from 'react-icons/hi';
22
22
  import { RiDeleteBin7Line } from 'react-icons/ri';
23
23
  import { GiNewspaper } from 'react-icons/gi';
24
24
 
@@ -163,6 +163,103 @@ var urlMappings = {
163
163
  function convertURL(path) {
164
164
  return urlMappings[path] || path;
165
165
  }
166
+ var ROUTE = {
167
+ HOME: {
168
+ name: "home",
169
+ label: "Trang chủ",
170
+ route: "/",
171
+ isShow: true
172
+ },
173
+ PRODUCTS: {
174
+ name: "products",
175
+ label: "Sản phẩm",
176
+ route: "/products",
177
+ isShow: true
178
+ },
179
+ PRODUCTS_BY_CATEGORY: {
180
+ name: "products_by_category",
181
+ label: "Sản phẩm theo danh mục",
182
+ route: "/products/:slug"
183
+ },
184
+ PRODUCT: {
185
+ name: "product",
186
+ label: "Chi tiết sản phẩm",
187
+ route: "/product/:slug"
188
+ },
189
+ SERVICES: {
190
+ name: "services",
191
+ label: "Dịch vụ",
192
+ route: "/services",
193
+ isShow: true
194
+ },
195
+ SERVICE: {
196
+ name: "service",
197
+ label: "Chi tiết dịch vụ",
198
+ route: "/service/:slug"
199
+ },
200
+ BOOKING: {
201
+ name: "booking",
202
+ label: "Đặt lịch",
203
+ route: "/dat-lich",
204
+ isShow: true
205
+ },
206
+ ABOUT: {
207
+ name: "about",
208
+ label: "Giới thiệu",
209
+ route: "/about",
210
+ isShow: true
211
+ },
212
+ SALES: {
213
+ name: "sales",
214
+ label: "Sản phẩm",
215
+ route: "/sales"
216
+ },
217
+ NEWS: {
218
+ name: "news",
219
+ label: "Tin tức",
220
+ route: "/news"
221
+ },
222
+ NEWS_BY_CATEGORY: {
223
+ name: "news_by_category",
224
+ label: "Tin tức theo danh mục",
225
+ route: "/news/:slug"
226
+ },
227
+ NEWS_DETAIL: {
228
+ name: "news_detail",
229
+ label: "Tin tức",
230
+ route: "/news/:slug/:languageCode"
231
+ },
232
+ CARTS: {
233
+ name: "carts",
234
+ label: "Giỏ hàng",
235
+ route: "/carts"
236
+ },
237
+ ORDERS: {
238
+ name: "orders",
239
+ label: "Đơn hàng",
240
+ route: "/orders"
241
+ },
242
+ ORDER: {
243
+ name: "order",
244
+ label: "Chi tiết đơn hàng",
245
+ route: "/order"
246
+ },
247
+ ACCOUNT: {
248
+ name: "account",
249
+ label: "Tài khoản",
250
+ route: "/account"
251
+ },
252
+ PROFILE: {
253
+ name: "profile",
254
+ label: "Tài khoản",
255
+ route: "/profile"
256
+ },
257
+ SEARCH: {
258
+ name: "search",
259
+ label: "Tìm kiếm",
260
+ route: "/search"
261
+ }
262
+ };
166
263
 
167
264
  var Options = function Options(props) {
168
265
  var _props$className = props.className,
@@ -329,7 +426,7 @@ var NavBar7 = function NavBar7(props) {
329
426
  top: "-100px"
330
427
  }
331
428
  }, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.defaultDomain, " | ", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName), /*#__PURE__*/React__default.createElement("div", {
332
- className: "hidden lg:flex gap-6 justify-between items-center py-1.5 px-4 xl:px-20"
429
+ className: "hidden lg:flex gap-6 justify-between items-center py-2 px-4 xl:px-20"
333
430
  }, /*#__PURE__*/React__default.createElement(LinkToPage, {
334
431
  Link: Link,
335
432
  href: "/",
@@ -369,7 +466,7 @@ var NavBar7 = function NavBar7(props) {
369
466
  dropdownClassName: "right-0 top-8",
370
467
  className: "flex gap-4 items-center"
371
468
  }, /*#__PURE__*/React__default.createElement("div", {
372
- className: "font-semibold"
469
+ className: "font-semibold whitespace-nowrap"
373
470
  }, userInfo === null || userInfo === void 0 ? void 0 : userInfo.name), /*#__PURE__*/React__default.createElement(IoChevronDownOutline, {
374
471
  className: "text-gray3",
375
472
  size: 24
@@ -382,16 +479,18 @@ var NavBar7 = function NavBar7(props) {
382
479
  href: "/dang-nhap"
383
480
  }, /*#__PURE__*/React__default.createElement(Button, {
384
481
  label: "Đăng nhập",
385
- shopConfigStyle: shopConfigStyle
482
+ shopConfigStyle: shopConfigStyle,
483
+ className: "whitespace-nowrap"
386
484
  })), /*#__PURE__*/React__default.createElement("a", {
387
485
  href: "https://sodofin.vn/account",
388
486
  target: "_blank"
389
487
  }, /*#__PURE__*/React__default.createElement(Button, {
390
488
  label: "Đăng ký",
391
489
  shopConfigStyle: shopConfigStyle,
392
- type: 'outline'
490
+ type: 'outline',
491
+ className: "whitespace-nowrap"
393
492
  })))), /*#__PURE__*/React__default.createElement("div", {
394
- className: "relative lg:hidden flex gap-4 items-center px-4 py-1.5"
493
+ className: "relative lg:hidden flex gap-4 items-center px-4 py-2"
395
494
  }, /*#__PURE__*/React__default.createElement(LinkToPage, {
396
495
  Link: Link,
397
496
  href: "/",
@@ -660,7 +759,7 @@ var NavBar1 = function NavBar1(props) {
660
759
  dropdownClassName: "right-0 top-8",
661
760
  className: "flex gap-4 items-center"
662
761
  }, /*#__PURE__*/React__default.createElement("div", {
663
- className: "font-semibold"
762
+ className: "font-semibold whitespace-nowrap"
664
763
  }, userInfo === null || userInfo === void 0 ? void 0 : userInfo.name), /*#__PURE__*/React__default.createElement(IoChevronDownOutline, {
665
764
  className: "text-gray3",
666
765
  size: 24
@@ -673,14 +772,16 @@ var NavBar1 = function NavBar1(props) {
673
772
  href: "/dang-nhap"
674
773
  }, /*#__PURE__*/React__default.createElement(Button, {
675
774
  label: "Đăng nhập",
676
- shopConfigStyle: shopConfigStyle
775
+ shopConfigStyle: shopConfigStyle,
776
+ className: "whitespace-nowrap"
677
777
  })), /*#__PURE__*/React__default.createElement("a", {
678
778
  href: "https://sodofin.vn/account",
679
779
  target: "_blank"
680
780
  }, /*#__PURE__*/React__default.createElement(Button, {
681
781
  label: "Đăng ký",
682
782
  shopConfigStyle: shopConfigStyle,
683
- type: 'outline'
783
+ type: 'outline',
784
+ className: "whitespace-nowrap"
684
785
  })))), /*#__PURE__*/React__default.createElement("div", {
685
786
  className: "relative lg:hidden flex gap-4 items-center px-4 py-2"
686
787
  }, /*#__PURE__*/React__default.createElement(LinkToPage, {
@@ -1103,7 +1204,8 @@ var Hero2 = function Hero2(props) {
1103
1204
  }), /*#__PURE__*/React__default.createElement("div", {
1104
1205
  className: "font-medium line-clamp-1 ",
1105
1206
  style: {
1106
- fontSize: "clamp(1.25rem, 3vw, 2.5rem)"
1207
+ fontSize: "clamp(1.25rem, 4vw, 3.5rem)",
1208
+ lineHeight: "1.5"
1107
1209
  }
1108
1210
  }, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.title), /*#__PURE__*/React__default.createElement("div", {
1109
1211
  className: "text-xs line-clamp-2 md:line-clamp-3 text-ellipsis sm:text-base md:text-xl lg:text-2xl"
@@ -1152,7 +1254,7 @@ var Hero6 = function Hero6(props) {
1152
1254
  }, data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : _data$data4$.title) : null, /*#__PURE__*/React__default.createElement("div", {
1153
1255
  className: "flex flex-col gap-1 md:gap-4 lg:gap-6 "
1154
1256
  }, data !== null && data !== void 0 && (_data$data5 = data.data) !== null && _data$data5 !== void 0 && (_data$data5$ = _data$data5[0]) !== null && _data$data5$ !== void 0 && _data$data5$.description ? /*#__PURE__*/React__default.createElement("div", {
1155
- className: "line-clamp-1 md:line-clamp-2",
1257
+ className: "line-clamp-1 md:line-clamp-2 pb-1",
1156
1258
  style: {
1157
1259
  fontSize: "clamp(0.75rem, 3vw, 1.5rem)"
1158
1260
  }
@@ -8048,6 +8150,16 @@ var Loading = function Loading(props) {
8048
8150
  });
8049
8151
  };
8050
8152
 
8153
+ var NotFoundProduct = function NotFoundProduct(props) {
8154
+ var _props$text = props.text,
8155
+ text = _props$text === void 0 ? "sản phẩm" : _props$text;
8156
+ return /*#__PURE__*/React__default.createElement("div", {
8157
+ className: "h-60 flex flex-col justify-center items-center text-xl text-gray4"
8158
+ }, /*#__PURE__*/React__default.createElement(FaBoxOpen, {
8159
+ size: 80
8160
+ }), /*#__PURE__*/React__default.createElement("div", null, "Kh\xF4ng c\xF3 ", text));
8161
+ };
8162
+
8051
8163
  var TreatmentsCategory7 = function TreatmentsCategory7(props) {
8052
8164
  var _props$shopConfigStyl = props.shopConfigStyle,
8053
8165
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
@@ -8119,23 +8231,13 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
8119
8231
  }, /*#__PURE__*/React__default.createElement(ProductItem1, {
8120
8232
  product: product === null || product === void 0 ? void 0 : product.productInfo
8121
8233
  }));
8122
- })) : /*#__PURE__*/React__default.createElement("div", {
8123
- className: "text-gray3 text-center p-12"
8124
- }, "Kh\xF4ng c\xF3 d\u1ECBch v\u1EE5")), /*#__PURE__*/React__default.createElement(Dash, {
8234
+ })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, {
8235
+ text: "d\u1ECBch v\u1EE5"
8236
+ })), /*#__PURE__*/React__default.createElement(Dash, {
8125
8237
  color: secondary
8126
8238
  }));
8127
8239
  };
8128
8240
 
8129
- var NotFoundProduct = function NotFoundProduct(props) {
8130
- var _props$text = props.text,
8131
- text = _props$text === void 0 ? "sản phẩm" : _props$text;
8132
- return /*#__PURE__*/React__default.createElement("div", {
8133
- className: "h-60 flex flex-col justify-center items-center text-xl text-gray4"
8134
- }, /*#__PURE__*/React__default.createElement(FaBoxOpen, {
8135
- size: 80
8136
- }), /*#__PURE__*/React__default.createElement("div", null, "Kh\xF4ng c\xF3 ", text));
8137
- };
8138
-
8139
8241
  var TreatmentsList6 = function TreatmentsList6(props) {
8140
8242
  var _products$slice;
8141
8243
  var data = props.data,
@@ -9400,7 +9502,7 @@ var TreatmentsList7 = function TreatmentsList7(props) {
9400
9502
  key: index
9401
9503
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
9402
9504
  product: product === null || product === void 0 ? void 0 : product.productInfo,
9403
- className: "aspect-video rounded-2xl"
9505
+ className: "!aspect-[16/11] rounded-2xl"
9404
9506
  }), /*#__PURE__*/React__default.createElement("div", {
9405
9507
  className: ''
9406
9508
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -9427,7 +9529,7 @@ var TreatmentsList7 = function TreatmentsList7(props) {
9427
9529
  }), /*#__PURE__*/React__default.createElement("div", {
9428
9530
  className: "mt-12 w-full"
9429
9531
  }, (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement(Slider, {
9430
- infinite: true,
9532
+ infinite: (products === null || products === void 0 ? void 0 : products.length) > 1 ? true : false,
9431
9533
  slidesToShow: 1,
9432
9534
  slidesToScroll: 1,
9433
9535
  speed: 500,
@@ -9855,7 +9957,7 @@ var ProductItem3 = function ProductItem3(props) {
9855
9957
  className: "w-full border border-stroke rounded-2xl " + className
9856
9958
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
9857
9959
  product: product,
9858
- className: "w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-t-2xl"
9960
+ className: "w-full h-48 md:h-60 xl:h-[304px] rounded-t-2xl"
9859
9961
  }), /*#__PURE__*/React__default.createElement("div", {
9860
9962
  className: "p-4 flex flex-col gap-2 md:gap-4 items-start"
9861
9963
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -9947,7 +10049,7 @@ var ProductItem6 = function ProductItem6(props) {
9947
10049
  className: "w-full border border-stroke flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
9948
10050
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
9949
10051
  product: product,
9950
- className: "w-full h-40 sm:h-56 lg:h-60 xl:h-64 bg-cover bg-no-repeat rounded-2xl"
10052
+ className: "w-full h-48 md:h-60 xl:h-72 rounded-2xl"
9951
10053
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
9952
10054
  className: "text start line-clamp-1 w-full overflow-hidden text-ellipsis"
9953
10055
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10003,7 +10105,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
10003
10105
  className: "w-full flex flex-col gap-4 rounded-2xl p-1"
10004
10106
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10005
10107
  product: product,
10006
- className: "w-full w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
10108
+ className: "w-full w-full h-[189px] md:h-[238px] xl:h-[304px] rounded-2xl"
10007
10109
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10008
10110
  className: "line-clamp-1 mb-2 font-medium text-lg"
10009
10111
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10021,6 +10123,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
10021
10123
  };
10022
10124
 
10023
10125
  var ProductList7 = function ProductList7(props) {
10126
+ var _products$slice;
10024
10127
  var _props$shopConfigStyl = props.shopConfigStyle,
10025
10128
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
10026
10129
  _props$data = props.data,
@@ -10034,7 +10137,7 @@ var ProductList7 = function ProductList7(props) {
10034
10137
  _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
10035
10138
  secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
10036
10139
  var _useState = useState({
10037
- size: 4
10140
+ size: 8
10038
10141
  }),
10039
10142
  params = _useState[0];
10040
10143
  var _ProductController = ProductController(_extends({}, props, {
@@ -10050,21 +10153,21 @@ var ProductList7 = function ProductList7(props) {
10050
10153
  shopConfigStyle: shopConfigStyle
10051
10154
  }), /*#__PURE__*/React__default.createElement("div", {
10052
10155
  className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-10 mt-12"
10053
- }, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
10156
+ }, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, index) {
10054
10157
  return /*#__PURE__*/React__default.createElement(ProductItem, {
10055
10158
  Link: Link,
10056
10159
  shopConfigStyle: shopConfigStyle,
10057
10160
  key: index,
10058
10161
  product: product === null || product === void 0 ? void 0 : product.productInfo
10059
10162
  });
10060
- })), (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
10163
+ })), (products === null || products === void 0 ? void 0 : products.length) > 4 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
10061
10164
  href: "/san-pham",
10062
10165
  Link: Link
10063
10166
  }, /*#__PURE__*/React__default.createElement(Button, {
10064
10167
  label: "Xem tất cả",
10065
10168
  shopConfigStyle: shopConfigStyle,
10066
10169
  className: "mt-12"
10067
- })) : null), /*#__PURE__*/React__default.createElement(Dash, {
10170
+ })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null)), /*#__PURE__*/React__default.createElement(Dash, {
10068
10171
  color: secondary
10069
10172
  }));
10070
10173
  };
@@ -10201,47 +10304,65 @@ var Products2 = function Products2(props) {
10201
10304
  }), " "))));
10202
10305
  };
10203
10306
 
10204
- var Pagination = function Pagination(props) {
10205
- var _props$size = props.size,
10206
- size = _props$size === void 0 ? 24 : _props$size,
10207
- _props$className = props.className,
10208
- className = _props$className === void 0 ? "" : _props$className,
10209
- _props$total_pages = props.total_pages,
10210
- total_pages = _props$total_pages === void 0 ? 0 : _props$total_pages,
10211
- _props$has_next = props.has_next,
10212
- has_next = _props$has_next === void 0 ? true : _props$has_next,
10213
- _props$has_previous = props.has_previous,
10214
- has_previous = _props$has_previous === void 0 ? false : _props$has_previous,
10215
- _props$current_page = props.current_page,
10216
- current_page = _props$current_page === void 0 ? 0 : _props$current_page,
10217
- _props$onPageChange = props.onPageChange,
10218
- onPageChange = _props$onPageChange === void 0 ? function () {} : _props$onPageChange;
10307
+ var Pagination = function Pagination(_ref) {
10308
+ var _ref$size = _ref.size,
10309
+ size = _ref$size === void 0 ? 24 : _ref$size,
10310
+ _ref$className = _ref.className,
10311
+ className = _ref$className === void 0 ? "" : _ref$className,
10312
+ _ref$total_pages = _ref.total_pages,
10313
+ total_pages = _ref$total_pages === void 0 ? 1 : _ref$total_pages,
10314
+ _ref$current_page = _ref.current_page,
10315
+ current_page = _ref$current_page === void 0 ? 1 : _ref$current_page,
10316
+ _ref$onPageChange = _ref.onPageChange,
10317
+ onPageChange = _ref$onPageChange === void 0 ? function () {} : _ref$onPageChange;
10219
10318
  var handlePageChange = function handlePageChange(page) {
10220
- onPageChange(page);
10319
+ if (page >= 0 && page <= total_pages - 1) {
10320
+ onPageChange(page);
10321
+ }
10322
+ };
10323
+ var generatePageNumbers = function generatePageNumbers() {
10324
+ if (total_pages <= 5) {
10325
+ return Array.from({
10326
+ length: total_pages
10327
+ }, function (_, i) {
10328
+ return i + 1;
10329
+ });
10330
+ }
10331
+ var pages = [1];
10332
+ if (current_page > 3) pages.push("...");
10333
+ var start = Math.max(2, current_page - 1);
10334
+ var end = Math.min(total_pages - 1, current_page + 2);
10335
+ for (var i = start; i <= end; i++) {
10336
+ pages.push(i);
10337
+ }
10338
+ if (current_page < total_pages - 2) pages.push("...");
10339
+ pages.push(total_pages);
10340
+ return pages;
10221
10341
  };
10222
10342
  return /*#__PURE__*/React__default.createElement("div", {
10223
- className: "flex gap-4 items-center justify-self-center " + className
10343
+ className: "flex gap-4 justify-center items-center " + className
10224
10344
  }, /*#__PURE__*/React__default.createElement(IoChevronBackOutline, {
10225
- className: has_previous ? "text-primary cursor-pointer" : "text-gray3",
10345
+ className: current_page > 0 ? "text-primary cursor-pointer" : "text-gray3 cursor-not-allowed",
10226
10346
  size: size,
10227
10347
  onClick: function onClick() {
10228
- if (has_previous) handlePageChange(current_page - 1);
10348
+ return handlePageChange(current_page - 1);
10229
10349
  }
10230
10350
  }), /*#__PURE__*/React__default.createElement("div", {
10231
10351
  className: "flex items-center space-x-1"
10232
- }, Array(total_pages).fill().map(function (_, index) {
10352
+ }, generatePageNumbers().map(function (page, index) {
10233
10353
  return /*#__PURE__*/React__default.createElement("button", {
10234
10354
  key: index,
10235
10355
  onClick: function onClick() {
10236
- return handlePageChange(index);
10356
+ return typeof page === "number" && handlePageChange(page - 1);
10237
10357
  },
10238
- className: "px-4 py-1 rounded-md " + (index === current_page ? 'bg-primary text-textButton' : 'bg-transparent text-primary') + " hover:opacity-80"
10239
- }, index + 1);
10358
+ className: "px-4 py-1 rounded-md " + (page === current_page + 1 ? "bg-primary text-white" : "bg-transparent text-primary") + " hover:opacity-80 " + (page === "..." ? "cursor-default text-gray-500" : ""),
10359
+ disabled: page === "..."
10360
+ }, page);
10240
10361
  })), /*#__PURE__*/React__default.createElement(IoChevronForwardOutline, {
10241
- className: has_next ? "text-primary cursor-pointer" : "text-gray3",
10362
+ className: current_page < total_pages - 1 ? "text-primary cursor-pointer" : "text-gray3 cursor-not-allowed",
10242
10363
  size: size,
10243
10364
  onClick: function onClick() {
10244
- if (has_next) handlePageChange(current_page + 1);
10365
+ return handlePageChange(current_page + 1);
10245
10366
  }
10246
10367
  }));
10247
10368
  };
@@ -10265,11 +10386,9 @@ var Products3 = function Products3(props) {
10265
10386
  }),
10266
10387
  productParams = _useState[0],
10267
10388
  setProductParams = _useState[1];
10268
- var _useState2 = useState(false),
10269
- setIsAutoGetList = _useState2[1];
10270
- var _useState3 = useState(),
10271
- categorySelected = _useState3[0],
10272
- setCategorySelected = _useState3[1];
10389
+ var _useState2 = useState(),
10390
+ categorySelected = _useState2[0],
10391
+ setCategorySelected = _useState2[1];
10273
10392
  var _ProductController = ProductController(_extends({}, props, {
10274
10393
  params: productParams
10275
10394
  })),
@@ -10283,16 +10402,12 @@ var Products3 = function Products3(props) {
10283
10402
  }
10284
10403
  })),
10285
10404
  categories = _CategoryController.categories;
10286
- useEffect(function () {
10287
- setCategorySelected(categories === null || categories === void 0 ? void 0 : categories[0]);
10288
- }, [categories]);
10289
10405
  useEffect(function () {
10290
10406
  if (categorySelected) {
10291
10407
  setProductParams(_extends({}, productParams, {
10292
10408
  page: 0,
10293
10409
  categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId
10294
10410
  }));
10295
- setIsAutoGetList(true);
10296
10411
  }
10297
10412
  }, [categorySelected]);
10298
10413
  var onSelectCategory = function onSelectCategory(category) {
@@ -10316,7 +10431,16 @@ var Products3 = function Products3(props) {
10316
10431
  className: "text-xl"
10317
10432
  }, "Danh m\u1EE5c s\u1EA3n ph\u1EA9m"), /*#__PURE__*/React__default.createElement("div", {
10318
10433
  className: "overflow-y-auto max-h-96"
10319
- }, categories === null || categories === void 0 ? void 0 : categories.map(function (category, index) {
10434
+ }, /*#__PURE__*/React__default.createElement("div", {
10435
+ className: "flex gap-2 py-4 border-b border-stroke cursor-pointer hover:text-primary " + (!(categorySelected !== null && categorySelected !== void 0 && categorySelected.categoryId) ? "text-primary" : "text-textSecondary"),
10436
+ onClick: function onClick() {
10437
+ return onSelectCategory({
10438
+ categoryId: undefined
10439
+ });
10440
+ }
10441
+ }, /*#__PURE__*/React__default.createElement(IoIosHeartEmpty, {
10442
+ size: 24
10443
+ }), /*#__PURE__*/React__default.createElement("div", null, "T\u1EA5t c\u1EA3")), categories === null || categories === void 0 ? void 0 : categories.map(function (category, index) {
10320
10444
  return /*#__PURE__*/React__default.createElement("div", {
10321
10445
  className: "flex gap-2 py-4 border-b border-stroke cursor-pointer hover:text-primary " + ((categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId) === (category === null || category === void 0 ? void 0 : category.categoryId) ? "text-primary" : "text-textSecondary"),
10322
10446
  key: index,
@@ -10331,7 +10455,7 @@ var Products3 = function Products3(props) {
10331
10455
  }), /*#__PURE__*/React__default.createElement("div", {
10332
10456
  className: "col-span-3 text-center"
10333
10457
  }, loading ? /*#__PURE__*/React__default.createElement("div", {
10334
- className: "flex w-full justify-center p-12"
10458
+ className: "flex w-full justify-center items-center p-12 h-[700px]"
10335
10459
  }, /*#__PURE__*/React__default.createElement(Loading, {
10336
10460
  size: 32
10337
10461
  })) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
@@ -10557,10 +10681,8 @@ var Products11 = function Products11(props) {
10557
10681
  }
10558
10682
  }, [categories]);
10559
10683
  useEffect(function () {
10560
- if ((products === null || products === void 0 ? void 0 : products.length) > 0) {
10561
- setProductsFilter(products);
10562
- }
10563
- }, [products]);
10684
+ setProductsFilter(products);
10685
+ }, [products, categorySelected]);
10564
10686
  var handleFilter = function handleFilter(item) {
10565
10687
  setFilterItem(item);
10566
10688
  if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC") {
@@ -10577,14 +10699,18 @@ var Products11 = function Products11(props) {
10577
10699
  });
10578
10700
  setProductsFilter(_productsCopy);
10579
10701
  } else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
10580
- var _productsCopy3;
10581
- var _productsCopy2 = [].concat(products);
10582
- _productsCopy2 = (_productsCopy3 = _productsCopy2) === null || _productsCopy3 === void 0 ? void 0 : _productsCopy3.filter(function (product) {
10583
- return (product === null || product === void 0 ? void 0 : product[item === null || item === void 0 ? void 0 : item.value]) === true;
10702
+ setParams(function (prev) {
10703
+ return _extends({}, prev, {
10704
+ isHighlight: true
10705
+ });
10584
10706
  });
10585
- setProductsFilter(_productsCopy2);
10586
10707
  } else {
10587
- setProductsFilter(products);
10708
+ setParams(function (prev) {
10709
+ return _extends({}, prev, {
10710
+ categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
10711
+ size: 12
10712
+ });
10713
+ });
10588
10714
  }
10589
10715
  };
10590
10716
  return /*#__PURE__*/React__default.createElement("div", {
@@ -10592,7 +10718,7 @@ var Products11 = function Products11(props) {
10592
10718
  }, /*#__PURE__*/React__default.createElement("div", {
10593
10719
  className: "md:sticky top-0 self-start"
10594
10720
  }, /*#__PURE__*/React__default.createElement("div", {
10595
- className: " flex flex-col gap-2 rounded-3xl bg-bgSecondary p-4"
10721
+ className: " flex flex-col gap-2 rounded-3xl bg-bgSecondary p-4 max-h-96 overflow-y-auto"
10596
10722
  }, categories === null || categories === void 0 ? void 0 : categories.map(function (item, index) {
10597
10723
  return /*#__PURE__*/React__default.createElement("div", {
10598
10724
  className: "px-6 py-2 hover:bg-gray-100 hover:text-primary cursor-pointer rounded-lg " + ((categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId) === (item === null || item === void 0 ? void 0 : item.categoryId) ? " bg-primary text-textButton" : ""),
@@ -10775,19 +10901,24 @@ var ProductSearch1 = function ProductSearch1(props) {
10775
10901
  setProductsFilter = _useState[1];
10776
10902
  var _useState2 = useState({
10777
10903
  productName: keywordValue,
10778
- size: 20
10904
+ size: 12
10779
10905
  }),
10780
10906
  params = _useState2[0],
10781
10907
  setParams = _useState2[1];
10782
10908
  var _useState3 = useState(true),
10783
10909
  isGetMore = _useState3[0],
10784
10910
  setIsGetMore = _useState3[1];
10911
+ var _useState4 = useState(false),
10912
+ isAutoGetList = _useState4[0],
10913
+ setIsAutoGetList = _useState4[1];
10785
10914
  var _ProductController = ProductController(_extends({}, props, {
10786
- params: params
10915
+ params: params,
10916
+ isAutoGetList: isAutoGetList
10787
10917
  })),
10788
10918
  products = _ProductController.products,
10789
10919
  loading = _ProductController.loading;
10790
10920
  useEffect(function () {
10921
+ setIsAutoGetList(true);
10791
10922
  setParams(function (prev) {
10792
10923
  return _extends({}, prev, {
10793
10924
  productName: keywordValue
@@ -10813,14 +10944,16 @@ var ProductSearch1 = function ProductSearch1(props) {
10813
10944
  });
10814
10945
  setProductsFilter(productsCopy);
10815
10946
  } else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
10816
- var _productsCopy2;
10817
- var _productsCopy = [].concat(products);
10818
- _productsCopy = (_productsCopy2 = _productsCopy) === null || _productsCopy2 === void 0 ? void 0 : _productsCopy2.filter(function (product) {
10819
- return (product === null || product === void 0 ? void 0 : product[item === null || item === void 0 ? void 0 : item.value]) === true;
10947
+ setParams(function (prev) {
10948
+ return _extends({}, prev, {
10949
+ isHighlight: true
10950
+ });
10820
10951
  });
10821
- setProductsFilter(_productsCopy);
10822
10952
  } else {
10823
- setProductsFilter(products);
10953
+ setParams({
10954
+ size: 12,
10955
+ productName: keywordValue
10956
+ });
10824
10957
  }
10825
10958
  };
10826
10959
  return /*#__PURE__*/React__default.createElement("div", {
@@ -12582,31 +12715,99 @@ var Employees1 = function Employees1(props) {
12582
12715
  };
12583
12716
 
12584
12717
  var Gallery1 = function Gallery1(props) {
12585
- var _data$data;
12718
+ var _data$data, _data$data2, _ROUTE$BOOKING;
12586
12719
  var _props$shopConfigStyl = props.shopConfigStyle,
12587
12720
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
12588
12721
  _props$data = props.data,
12589
12722
  data = _props$data === void 0 ? {} : _props$data,
12590
12723
  _props$SectionTitle = props.SectionTitle,
12591
- SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
12724
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
12725
+ _props$Link = props.Link,
12726
+ Link = _props$Link === void 0 ? null : _props$Link;
12592
12727
  var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
12593
12728
  _shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
12594
12729
  secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
12595
- console.log("Gallery1 data", data);
12730
+ var sliderRef = useRef(null);
12731
+ var settings = {
12732
+ infinite: true,
12733
+ slidesToShow: 3,
12734
+ slidesToScroll: 1,
12735
+ speed: 500,
12736
+ autoplay: false,
12737
+ autoplaySpeed: 4000,
12738
+ pauseOnHover: true,
12739
+ dots: false,
12740
+ swipe: true,
12741
+ touchMove: true,
12742
+ arrows: false,
12743
+ responsive: [{
12744
+ breakpoint: 1024,
12745
+ settings: {
12746
+ slidesToShow: 3,
12747
+ slidesToScroll: 1
12748
+ }
12749
+ }, {
12750
+ breakpoint: 1023,
12751
+ settings: {
12752
+ slidesToShow: 2,
12753
+ slidesToScroll: 1
12754
+ }
12755
+ }, {
12756
+ breakpoint: 635,
12757
+ settings: {
12758
+ slidesToShow: 1,
12759
+ slidesToScroll: 1
12760
+ }
12761
+ }]
12762
+ };
12763
+ var goToNext = function goToNext() {
12764
+ if (sliderRef.current) {
12765
+ sliderRef.current.slickNext();
12766
+ }
12767
+ };
12768
+ var goToPrev = function goToPrev() {
12769
+ if (sliderRef.current) {
12770
+ sliderRef.current.slickPrev();
12771
+ }
12772
+ };
12596
12773
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
12597
12774
  className: "" + SECTION_DEFAULT_CLASS
12598
12775
  }, /*#__PURE__*/React__default.createElement(SectionTitle, {
12599
12776
  data: data,
12600
12777
  shopConfigStyle: shopConfigStyle
12601
- }), /*#__PURE__*/React__default.createElement("div", {
12602
- className: "mt-6 grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-1 md:gap-2"
12603
- }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
12778
+ }), (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
12779
+ className: "mt-10"
12780
+ }, /*#__PURE__*/React__default.createElement(Slider, _extends({}, settings, {
12781
+ ref: sliderRef
12782
+ }), data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : _data$data2.map(function (it, index) {
12604
12783
  return /*#__PURE__*/React__default.createElement("div", {
12605
- key: index
12784
+ key: index,
12785
+ className: "px-0 sm:px-4 md:px-4 pointer-events-none lg:px-6"
12606
12786
  }, /*#__PURE__*/React__default.createElement("img", {
12607
- src: it === null || it === void 0 ? void 0 : it.srcImage
12787
+ src: it === null || it === void 0 ? void 0 : it.srcImage,
12788
+ className: "rounded-2xl object-cover"
12608
12789
  }));
12609
- }))), /*#__PURE__*/React__default.createElement(Dash, {
12790
+ })), /*#__PURE__*/React__default.createElement("div", {
12791
+ className: "flex flex-col gap-6 items-center"
12792
+ }, /*#__PURE__*/React__default.createElement("div", {
12793
+ className: "flex gap-6 mt-2 items-center"
12794
+ }, /*#__PURE__*/React__default.createElement("div", {
12795
+ className: "text-primary cursor-pointer hover:scale-110 duration-200 hover:opacity-80",
12796
+ onClick: goToPrev
12797
+ }, /*#__PURE__*/React__default.createElement(HiOutlineArrowNarrowLeft, {
12798
+ size: 34
12799
+ })), /*#__PURE__*/React__default.createElement("div", {
12800
+ className: "text-primary cursor-pointer hover:scale-110 duration-200 hover:opacity-80",
12801
+ onClick: goToNext
12802
+ }, /*#__PURE__*/React__default.createElement(HiOutlineArrowNarrowRight, {
12803
+ size: 34
12804
+ }))), /*#__PURE__*/React__default.createElement(LinkToPage, {
12805
+ href: ROUTE === null || ROUTE === void 0 ? void 0 : (_ROUTE$BOOKING = ROUTE.BOOKING) === null || _ROUTE$BOOKING === void 0 ? void 0 : _ROUTE$BOOKING.route,
12806
+ Link: Link
12807
+ }, /*#__PURE__*/React__default.createElement(Button, {
12808
+ label: "\u0110\u1EB6T L\u1ECACH NGAY",
12809
+ shopConfigStyle: shopConfigStyle
12810
+ })))) : null), /*#__PURE__*/React__default.createElement(Dash, {
12610
12811
  color: secondary
12611
12812
  }));
12612
12813
  };
@@ -13743,7 +13944,11 @@ var SearchBar2 = function SearchBar2(props) {
13743
13944
  var _useState2 = useState(""),
13744
13945
  valueSearch = _useState2[0],
13745
13946
  setSearchValue = _useState2[1];
13746
- var _ProductController = ProductController(_extends({}, props)),
13947
+ var _useState3 = useState(false),
13948
+ isAutoGetList = _useState3[0];
13949
+ var _ProductController = ProductController(_extends({}, props, {
13950
+ isAutoGetList: isAutoGetList
13951
+ })),
13747
13952
  getProductListSearch = _ProductController.getProductListSearch;
13748
13953
  useEffect(function () {
13749
13954
  if (valueSearch === "") {
@@ -13788,7 +13993,7 @@ var SearchBar2 = function SearchBar2(props) {
13788
13993
  backgroundSize: "cover"
13789
13994
  }
13790
13995
  }, /*#__PURE__*/React__default.createElement("div", {
13791
- className: "w-full md:w-1/2 py-6 mx-auto px-6 flex flex-col h-full gap-4"
13996
+ className: "w-full md:w-2/3 lg:w-1/2 py-6 mx-auto md:px-6 flex flex-col h-full gap-4"
13792
13997
  }, /*#__PURE__*/React__default.createElement(Input, {
13793
13998
  icons: /*#__PURE__*/React__default.createElement(IoSearchOutline, {
13794
13999
  className: "text-gray3"
@@ -13816,9 +14021,7 @@ var SearchBar2 = function SearchBar2(props) {
13816
14021
  }, item === null || item === void 0 ? void 0 : (_item$productInfo = item.productInfo) === null || _item$productInfo === void 0 ? void 0 : _item$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
13817
14022
  product: item === null || item === void 0 ? void 0 : item.productInfo
13818
14023
  })));
13819
- })) : /*#__PURE__*/React__default.createElement("div", {
13820
- className: "mx-auto"
13821
- }, data === null || data === void 0 ? void 0 : data.sectionDescription))));
14024
+ })) : null)));
13822
14025
  };
13823
14026
 
13824
14027
  var SearchBar5 = function SearchBar5(props) {
@@ -13897,7 +14100,7 @@ var SearchBar6 = function SearchBar6(props) {
13897
14100
  }
13898
14101
  };
13899
14102
  return /*#__PURE__*/React__default.createElement("div", {
13900
- className: "w-full flex flex-col justify-center px-3 md:px-6 gap-2 lg:gap-3 items-center h-32 lg:h-44 ",
14103
+ className: "w-full flex flex-col justify-center px-3 md:px-6 gap-2 md:gap-4 lg:gap-6 items-center h-40 lg:h-52 ",
13901
14104
  style: {
13902
14105
  background: "url(" + (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.srcImage) + ")",
13903
14106
  backgroundPosition: "center",
@@ -13908,7 +14111,7 @@ var SearchBar6 = function SearchBar6(props) {
13908
14111
  }, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : _data$data3.title) : null, data !== null && data !== void 0 && (_data$data4 = data.data) !== null && _data$data4 !== void 0 && _data$data4.description ? /*#__PURE__*/React__default.createElement("div", {
13909
14112
  className: "text-center text-textBody"
13910
14113
  }, data === null || data === void 0 ? void 0 : (_data$data5 = data.data) === null || _data$data5 === void 0 ? void 0 : _data$data5.description) : null, /*#__PURE__*/React__default.createElement("div", {
13911
- className: "flex gap-2 md:gap-4 lg:gap-6 mb-2 md:mb-0 w-full md:w-[70%] h-10 lg:h-12 lg:w-1/2"
14114
+ className: "flex gap-2 md:gap-4 lg:gap-6 mb-2 md:mb-0 w-[90%] sm:w-[70%] h-10 lg:h-12 lg:w-1/2"
13912
14115
  }, /*#__PURE__*/React__default.createElement(Input, {
13913
14116
  icons: /*#__PURE__*/React__default.createElement(IoSearchOutline, {
13914
14117
  className: "text-gray3"
@@ -13939,8 +14142,9 @@ var ShopHighlights2 = function ShopHighlights2(props) {
13939
14142
  Link = _props$Link === void 0 ? null : _props$Link;
13940
14143
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
13941
14144
  return /*#__PURE__*/React__default.createElement("div", {
13942
- className: SECTION_CLASS + " my-0 md:my-0 !bg-bgSecondary py-6 grid grid-cols-2 md:grid-cols-4 gap-4 lg:gap-6"
14145
+ className: SECTION_CLASS + " !mt-0 !md:mt-0 !bg-bgSecondary py-6 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 md:gap-6"
13943
14146
  }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
14147
+ var _item$title;
13944
14148
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
13945
14149
  Link: Link,
13946
14150
  href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
@@ -13958,7 +14162,7 @@ var ShopHighlights2 = function ShopHighlights2(props) {
13958
14162
  className: "w-16 h-16 p-3 rounded-full bg-primary"
13959
14163
  }), /*#__PURE__*/React__default.createElement("div", {
13960
14164
  className: "font-medium text-lg"
13961
- }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
14165
+ }, item === null || item === void 0 ? void 0 : (_item$title = item.title) === null || _item$title === void 0 ? void 0 : _item$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
13962
14166
  className: "flex-grow text-gray3 leading-relaxed"
13963
14167
  }, item === null || item === void 0 ? void 0 : item.description)));
13964
14168
  }));
@@ -13972,6 +14176,7 @@ var ShopHighlights5 = function ShopHighlights5(props) {
13972
14176
  return /*#__PURE__*/React__default.createElement("div", {
13973
14177
  className: SECTION_CLASS + " grid md:grid-cols-3 py-6 gap-4 lg:gap-6 bg-bgSecondary"
13974
14178
  }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
14179
+ var _item$title;
13975
14180
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
13976
14181
  href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
13977
14182
  Link: Link
@@ -13988,8 +14193,8 @@ var ShopHighlights5 = function ShopHighlights5(props) {
13988
14193
  alt: "logo",
13989
14194
  className: "w-16 h-16 rounded-full bg-primary"
13990
14195
  }), /*#__PURE__*/React__default.createElement("div", {
13991
- className: "font-medium text-xl text-textHeading pt-2 border-t border-textHeading"
13992
- }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
14196
+ className: "font-semibold text-xl text-textHeading pt-2 border-t border-textHeading"
14197
+ }, item === null || item === void 0 ? void 0 : (_item$title = item.title) === null || _item$title === void 0 ? void 0 : _item$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
13993
14198
  className: "flex-grow leading-relaxed"
13994
14199
  }, item === null || item === void 0 ? void 0 : item.description)));
13995
14200
  }));
@@ -14101,7 +14306,7 @@ var VideoFull1 = function VideoFull1(props) {
14101
14306
  data: data,
14102
14307
  shopConfigStyle: shopConfigStyle
14103
14308
  }), youtubeVideoId ? /*#__PURE__*/React__default.createElement("div", {
14104
- className: "w-full aspect-video"
14309
+ className: "w-full aspect-video mt-6"
14105
14310
  }, /*#__PURE__*/React__default.createElement("iframe", {
14106
14311
  className: "w-full h-full",
14107
14312
  src: "https://www.youtube.com/embed/" + youtubeVideoId,