s-platform-landing-section 0.1.35 → 0.1.36-beta.10

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.
@@ -6,20 +6,20 @@ import { RxCross2 } from 'react-icons/rx';
6
6
  import { PiHandHeartBold } from 'react-icons/pi';
7
7
  import { TbCategory } from 'react-icons/tb';
8
8
  import { SiZalo } from 'react-icons/si';
9
- import { IoIosStar, IoIosArrowBack, IoIosArrowForward, IoMdCheckmark, IoIosHeartEmpty, IoMdCheckmarkCircleOutline } from 'react-icons/io';
9
+ import { IoIosStar, IoMdCheckmark, IoIosHeartEmpty, IoIosArrowBack, IoIosArrowForward, IoMdCheckmarkCircleOutline } from 'react-icons/io';
10
+ import { MdKeyboardDoubleArrowRight } from 'react-icons/md';
10
11
  import { FaMinus, FaRegEyeSlash, FaPlus, FaStar, FaRegStarHalfStroke, FaRegStar } from 'react-icons/fa6';
11
- import 'react-icons/ci';
12
- import { BsCurrencyDollar } from 'react-icons/bs';
12
+ import { AiOutlinePhone, AiOutlineShoppingCart, AiOutlineInfoCircle } from 'react-icons/ai';
13
13
  import { LuSearch, LuShoppingCart, LuShoppingBag } from 'react-icons/lu';
14
14
  import DatePicker from 'react-datepicker';
15
15
  import 'react-datepicker/dist/react-datepicker.css';
16
16
  import Slider from 'react-slick';
17
17
  import 'slick-carousel/slick/slick.css';
18
18
  import 'slick-carousel/slick/slick-theme.css';
19
- import { AiOutlineShoppingCart, AiOutlineInfoCircle, AiOutlinePhone } from 'react-icons/ai';
19
+ import { BsCurrencyDollar } from 'react-icons/bs';
20
20
  import { GoCreditCard, GoClock } from 'react-icons/go';
21
21
  import { GrPowerCycle } from 'react-icons/gr';
22
- import { RiMessengerFill, RiDoubleQuotesL, RiDeleteBin7Line } from 'react-icons/ri';
22
+ import { RiMessengerFill, RiDoubleQuotesL, RiDoubleQuotesR, RiDeleteBin7Line } from 'react-icons/ri';
23
23
  import { HiOutlineLocationMarker, HiOutlineArrowNarrowLeft, HiOutlineArrowNarrowRight } from 'react-icons/hi';
24
24
  import { GiNewspaper } from 'react-icons/gi';
25
25
 
@@ -112,33 +112,34 @@ var getDurationValue = function getDurationValue(attributes) {
112
112
  return durationAtt ? ((durationAtt === null || durationAtt === void 0 ? void 0 : (_durationAtt$value = durationAtt.value) === null || _durationAtt$value === void 0 ? void 0 : _durationAtt$value[0]) || "0") + " p" : "";
113
113
  };
114
114
  var genProductSlugVi = function genProductSlugVi(productName, id) {
115
- var _productName$replace;
116
- return (productName === null || productName === void 0 ? void 0 : (_productName$replace = productName.replace(/\s+/g, "-")) === null || _productName$replace === void 0 ? void 0 : _productName$replace.replace(/\//g, "~")) + "-" + id;
115
+ var _productName$replace, _productName$replace$, _productName$replace$2, _productName$replace$3, _productName$replace$4;
116
+ var slug = productName === null || productName === void 0 ? void 0 : (_productName$replace = productName.replace(/%/g, 'pct')) === null || _productName$replace === void 0 ? void 0 : (_productName$replace$ = _productName$replace.replace(/\//g, 'fs')) === null || _productName$replace$ === void 0 ? void 0 : (_productName$replace$2 = _productName$replace$.replace(/&/g, 'amp')) === null || _productName$replace$2 === void 0 ? void 0 : (_productName$replace$3 = _productName$replace$2.replace(/-/g, 'hyp')) === null || _productName$replace$3 === void 0 ? void 0 : (_productName$replace$4 = _productName$replace$3.replace(/\s+/g, '-')) === null || _productName$replace$4 === void 0 ? void 0 : _productName$replace$4.replace(/(?:[\0-!#%-'\*\+\/<-\?\\\^`\{\}\x7F-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C8B-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CE\uA7CF\uA7D2\uA7D4\uA7DD-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDBF\uDDF4-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDD49\uDD66-\uDD6E\uDD86-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEC1\uDEC5-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDF7F\uDF8A\uDF8C\uDF8D\uDF8F\uDFB6\uDFB8-\uDFD0\uDFD2\uDFD4-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFBF\uDFE1-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD812-\uD817\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDC5F]|\uD810[\uDFFB-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD818[\uDC00-\uDCFF\uDD1E-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDD3F\uDD6D-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFE\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDDCF\uDDEE\uDDEF\uDDF1-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g, '');
117
+ return slug + "-" + id;
117
118
  };
118
119
  var getLinkProductDetail = function getLinkProductDetail(product) {
119
120
  var slug = genProductSlugVi(product === null || product === void 0 ? void 0 : product.productName, product === null || product === void 0 ? void 0 : product.productId);
120
- return "/san-pham/" + slug;
121
+ return "/san-pham/" + encodeURIComponent(slug);
121
122
  };
122
123
  var getLinkServiceDetail = function getLinkServiceDetail(product) {
123
124
  var slug = genProductSlugVi(product === null || product === void 0 ? void 0 : product.productName, product === null || product === void 0 ? void 0 : product.productId);
124
- return "/dich-vu/" + slug;
125
+ return "/dich-vu/" + encodeURIComponent(slug);
125
126
  };
126
127
  var getLinkNewsDetail = function getLinkNewsDetail(news) {
127
128
  var slug = genProductSlugVi(news === null || news === void 0 ? void 0 : news.title, news === null || news === void 0 ? void 0 : news.articleId);
128
129
  var category = genProductSlugVi(news === null || news === void 0 ? void 0 : news.catName, news === null || news === void 0 ? void 0 : news.catId);
129
- return "/tin-tuc/" + category + "/" + slug;
130
+ return "/tin-tuc/" + encodeURIComponent(category) + "/" + encodeURIComponent(slug);
130
131
  };
131
132
  var getLinkNewsByCategory = function getLinkNewsByCategory(news) {
132
133
  var slug = genProductSlugVi(news === null || news === void 0 ? void 0 : news.catName, news === null || news === void 0 ? void 0 : news.catId);
133
- return "/tin-tuc-theo-danh-muc/" + slug;
134
+ return "/tin-tuc-theo-danh-muc/" + encodeURIComponent(slug);
134
135
  };
135
136
  var getLinkProductsByCategory = function getLinkProductsByCategory(product) {
136
137
  if (product !== null && product !== void 0 && product.categoryName) {
137
138
  var slug = genProductSlugVi(product === null || product === void 0 ? void 0 : product.categoryName, product === null || product === void 0 ? void 0 : product.categoryId);
138
- return "/danh-muc/" + slug;
139
+ return "/danh-muc/" + encodeURIComponent(slug);
139
140
  } else {
140
141
  var _slug12 = genProductSlugVi(product === null || product === void 0 ? void 0 : product.cateName, product === null || product === void 0 ? void 0 : product.categoryId);
141
- return "/danh-muc/" + _slug12;
142
+ return "/danh-muc/" + encodeURIComponent(_slug12);
142
143
  }
143
144
  };
144
145
  var LinkToPage = function LinkToPage(props) {
@@ -152,7 +153,7 @@ var genLinkSearch = function genLinkSearch(keyword) {
152
153
  };
153
154
  var configSvg = function configSvg(data) {
154
155
  var _data$replace, _data$replace$replace;
155
- return data === null || data === void 0 ? void 0 : (_data$replace = data.replace(/<path(?![^>]*fill=")[^>]*>/g, "<path fill=\"currentColor\" $&")) === null || _data$replace === void 0 ? void 0 : (_data$replace$replace = _data$replace.replace(/width="[^"]*"/, '')) === null || _data$replace$replace === void 0 ? void 0 : _data$replace$replace.replace(/height="[^"]*"/, '');
156
+ return data === null || data === void 0 ? void 0 : (_data$replace = data.replace(/<path(?![^>]*fill=")[^>]*>/g, "<path fill=\"currentColor\" $&")) === null || _data$replace === void 0 ? void 0 : (_data$replace$replace = _data$replace.replace(/width=['"][^'"]*['"]/g, '')) === null || _data$replace$replace === void 0 ? void 0 : _data$replace$replace.replace(/height=['"][^'"]*['"]/g, '');
156
157
  };
157
158
  var urlMappings = {
158
159
  "/products": "/san-pham",
@@ -433,7 +434,7 @@ var NavBar7 = function NavBar7(props) {
433
434
  href: "/",
434
435
  className: "flex items-center gap-2"
435
436
  }, /*#__PURE__*/React__default.createElement("img", {
436
- className: "object-cover w-12 max-h-12",
437
+ className: "object-contain w-12 h-12",
437
438
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
438
439
  }), /*#__PURE__*/React__default.createElement("h3", {
439
440
  className: "text-xl md:text-2xl text-primary font-headingFont text-wrap line-clamp-2 leading-tight"
@@ -496,7 +497,7 @@ var NavBar7 = function NavBar7(props) {
496
497
  href: "/",
497
498
  className: "flex flex-1 gap-2 items-center"
498
499
  }, /*#__PURE__*/React__default.createElement("img", {
499
- className: "object-cover w-12 max-h-12",
500
+ className: "object-contain w-12 h-12",
500
501
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
501
502
  }), /*#__PURE__*/React__default.createElement("h3", {
502
503
  className: "text-xl md:text-2xl font-headingFont text-wrap text-primary line-clamp-2"
@@ -530,7 +531,7 @@ var NavBar7 = function NavBar7(props) {
530
531
  className: "flex gap-2 items-center mb-2"
531
532
  }, /*#__PURE__*/React__default.createElement("img", {
532
533
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
533
- className: "max-h-14 w-14 object-cover"
534
+ className: "h-14 w-14 object-contain"
534
535
  }), /*#__PURE__*/React__default.createElement("h3", {
535
536
  className: "text-xl font-headingFont text-primary line-clamp-1"
536
537
  }, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName))), /*#__PURE__*/React__default.createElement("button", {
@@ -726,7 +727,7 @@ var NavBar1 = function NavBar1(props) {
726
727
  href: "/",
727
728
  className: "flex items-center gap-2"
728
729
  }, /*#__PURE__*/React__default.createElement("img", {
729
- className: "object-cover w-12 max-h-12",
730
+ className: "object-contain w-12 h-12",
730
731
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
731
732
  alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName
732
733
  }), /*#__PURE__*/React__default.createElement("h3", {
@@ -788,7 +789,7 @@ var NavBar1 = function NavBar1(props) {
788
789
  href: "/",
789
790
  className: "flex flex-1 gap-2 items-center"
790
791
  }, /*#__PURE__*/React__default.createElement("img", {
791
- className: "object-cover w-12 max-h-12",
792
+ className: "object-contain w-12 h-12",
792
793
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
793
794
  alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName
794
795
  }), /*#__PURE__*/React__default.createElement("h3", {
@@ -823,7 +824,7 @@ var NavBar1 = function NavBar1(props) {
823
824
  className: "flex gap-2 items-center mb-2"
824
825
  }, /*#__PURE__*/React__default.createElement("img", {
825
826
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
826
- className: "max-h-14 w-14 bg-cover bg-no-repeat"
827
+ className: "h-14 w-14 object-contain"
827
828
  }), /*#__PURE__*/React__default.createElement("div", {
828
829
  className: "text-xl font-headingFont text-primary line-clamp-1"
829
830
  }, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName))), /*#__PURE__*/React__default.createElement("button", {
@@ -948,7 +949,7 @@ var SectionTitle2 = function SectionTitle2(props) {
948
949
  }), /*#__PURE__*/React__default.createElement(IoIosStar, {
949
950
  className: "w-4 h-4 text-warning"
950
951
  })) : null, data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("div", {
951
- className: "text-xl text-center leading-relaxed text-textSecondary"
952
+ className: "text-xl text-center leading-relaxed text-textSecondary pb-4"
952
953
  }, data === null || data === void 0 ? void 0 : data.sectionDescription) : null);
953
954
  };
954
955
 
@@ -975,10 +976,27 @@ var SectionTitle4 = function SectionTitle4(props) {
975
976
  }, data === null || data === void 0 ? void 0 : (_data$sectionTitle = data.sectionTitle) === null || _data$sectionTitle === void 0 ? void 0 : _data$sectionTitle.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
976
977
  className: "border w-32 border-primary"
977
978
  })) : null, data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("p", {
978
- className: "text-xl text-center font-medium leading-relaxed text-secondary mt-2"
979
+ className: "text-xl text-center leading-relaxed text-secondary mt-2"
979
980
  }, data === null || data === void 0 ? void 0 : data.sectionDescription) : null);
980
981
  };
981
982
 
983
+ var SectionTitle5 = function SectionTitle5(props) {
984
+ var data = props.data;
985
+ return /*#__PURE__*/React__default.createElement("div", {
986
+ className: true
987
+ }, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement("div", {
988
+ className: "flex items-start gap-2"
989
+ }, /*#__PURE__*/React__default.createElement("div", {
990
+ className: "text-secondary text-4xl md:text-5xl"
991
+ }, /*#__PURE__*/React__default.createElement(MdKeyboardDoubleArrowRight, null)), /*#__PURE__*/React__default.createElement("div", {
992
+ className: "flex flex-col gap-2"
993
+ }, /*#__PURE__*/React__default.createElement("div", {
994
+ className: "text-2xl md:text-4xl text-textHeading font-medium font-fontHeading"
995
+ }, data === null || data === void 0 ? void 0 : data.sectionTitle), data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("p", {
996
+ className: "text-lg md:text-2xl leading-relaxed text-textSecondary"
997
+ }, data === null || data === void 0 ? void 0 : data.sectionDescription) : null)) : null);
998
+ };
999
+
982
1000
  var Input = forwardRef(function (props, ref) {
983
1001
  var _props$label = props.label,
984
1002
  label = _props$label === void 0 ? "" : _props$label,
@@ -1211,20 +1229,22 @@ var Hero2 = function Hero2(props) {
1211
1229
  }, /*#__PURE__*/React__default.createElement("img", {
1212
1230
  src: 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],
1213
1231
  alt: 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$.title,
1214
- className: "w-full h-auto object-cover min-h-[22vh] max-h-[100vh]"
1232
+ className: "w-full h-auto object-cover min-h-[35vh] max-h-[100vh]"
1215
1233
  }), /*#__PURE__*/React__default.createElement("div", {
1216
- className: "absolute inset-y-0 right-[1%] md:right-[8%] w-[58%] md:w-1/2 flex flex-col gap-2 md:gap-4 xl:gap-6 justify-center items-start px-4 pt-4 pb-2 md:px-8 md:pt-8 md:pb-6 xl:p-8"
1234
+ className: "absolute inset-y-0 right-[2%] md:right-[4%] w-[58%] md:w-[54%] flex flex-col gap-2 md:gap-4 xl:gap-6 justify-center items-start px-4 pt-4 pb-2 md:px-8 md:pt-8 md:pb-6 xl:p-8"
1217
1235
  }, shopConfig !== null && shopConfig !== void 0 && shopConfig.logoUrl ? /*#__PURE__*/React__default.createElement("img", {
1218
1236
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
1219
- className: "h-6 w-6 sm:h-10 sm:w-10 md:h-12 md:w-12 lg:w-14 lg:h-14 xl:h-20 xl:w-20"
1237
+ className: "h-6 w-6 object-contain sm:h-10 sm:w-10 md:h-12 md:w-12 lg:w-14 lg:h-14 xl:h-20 xl:w-20"
1220
1238
  }) : null, /*#__PURE__*/React__default.createElement("div", {
1221
- className: "font-medium line-clamp-1 ",
1239
+ className: "font-medium line-clamp-2 lg:line-clamp-1 text-2xl md:text-3xl lg:text-4xl xl:text-6xl",
1222
1240
  style: {
1223
- fontSize: "clamp(1.25rem, 4vw, 3.5rem)",
1224
1241
  lineHeight: "1.5"
1225
1242
  }
1226
1243
  }, 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", {
1227
- className: "text-xs line-clamp-2 md:line-clamp-3 text-ellipsis sm:text-base md:text-xl lg:text-2xl"
1244
+ className: "line-clamp-3 text-ellipsis text-base md:text-lg lg:text-xl xl:text-2xl",
1245
+ style: {
1246
+ lineHeight: 1.625
1247
+ }
1228
1248
  }, 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$.description)));
1229
1249
  };
1230
1250
 
@@ -1236,13 +1256,16 @@ var Hero5 = function Hero5(props) {
1236
1256
  }, /*#__PURE__*/React__default.createElement("img", {
1237
1257
  src: 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],
1238
1258
  alt: 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$.title,
1239
- className: "w-full min-h-[22vh] max-h-[100vh] object-cover"
1259
+ className: "w-full min-h-[35vh] max-h-[100vh] object-cover"
1240
1260
  }), /*#__PURE__*/React__default.createElement("div", {
1241
- className: "absolute inset-0 flex flex-col top-[5%] md:top-[10%] gap-1 md:gap-4 p-4 lg:p-10 w-3/5 md:w-1/2 lg:w-[45%] max-w-[90%] left-1 lg:left-10 xl:left-20"
1261
+ className: "absolute inset-0 flex flex-col top-[8%] md:top-[10%] gap-1 md:gap-4 p-4 lg:p-10 w-3/5 md:w-1/2 max-w-[90%] left-1 lg:left-10 xl:left-20"
1242
1262
  }, /*#__PURE__*/React__default.createElement("div", {
1243
- className: "text-xl sm:text-2xl md:text-3xl lg:text-4xl text-textHeading pt-2 pb-1 overflow-hidden text-ellipsis font-medium line-clamp-1"
1263
+ className: "text-xl sm:text-2xl md:text-3xl lg:text-4xl text-textHeading overflow-hidden text-ellipsis font-medium line-clamp-2",
1264
+ style: {
1265
+ lineHeight: 1.5
1266
+ }
1244
1267
  }, 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", {
1245
- className: "text-sm md:text-xl lg:text-2xl text-primary line-clamp-3 md:line-clamp-4 overflow-hidden text-ellipsis "
1268
+ className: "text-sm md:text-xl lg:text-2xl text-primary line-clamp-3 overflow-hidden text-ellipsis"
1246
1269
  }, 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$.description)));
1247
1270
  };
1248
1271
 
@@ -1258,21 +1281,20 @@ var Hero6 = function Hero6(props) {
1258
1281
  }, /*#__PURE__*/React__default.createElement("img", {
1259
1282
  src: 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],
1260
1283
  alt: 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$.title,
1261
- className: "object-cover w-full h-auto"
1284
+ className: "object-cover w-full min-h-[30vh] max-h-[100vh]"
1262
1285
  }), /*#__PURE__*/React__default.createElement("div", {
1263
- className: "absolute inset-0 flex flex-col items-center justify-center md:gap-1 lg:gap-2 text-center py-1 md:py-4 px-16 md:px-20 "
1286
+ className: "absolute w-full md:w-2/3 mx-auto inset-0 flex flex-col items-center justify-center md:gap-1 lg:gap-2 text-center py-1 md:py-4 px-10"
1264
1287
  }, data !== null && data !== void 0 && (_data$data3 = data.data) !== null && _data$data3 !== void 0 && (_data$data3$ = _data$data3[0]) !== null && _data$data3$ !== void 0 && _data$data3$.title ? /*#__PURE__*/React__default.createElement("div", {
1265
- className: "text-primary font-headingFont text-center line-clamp-1 text-ellipsis pt-2 md:pt-3",
1288
+ className: "text-primary font-headingFont text-center line-clamp-1 text-2xl md:text-4xl xl:text-6xl text-ellipsis",
1266
1289
  style: {
1267
- fontSize: "clamp(1rem, 4vw, 3rem)",
1268
1290
  lineHeight: "2"
1269
1291
  }
1270
1292
  }, 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", {
1271
- className: "flex flex-col gap-1 md:gap-4 lg:gap-6 "
1293
+ className: "flex flex-col gap-4 lg:gap-6 "
1272
1294
  }, 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", {
1273
- className: "line-clamp-1 md:line-clamp-2 pb-1",
1295
+ className: "line-clamp-2 lg:line-clamp-3 md:text-xl xl:text-2xl",
1274
1296
  style: {
1275
- fontSize: "clamp(0.75rem, 3vw, 1.5rem)"
1297
+ lineHeight: 1.5
1276
1298
  }
1277
1299
  }, data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : _data$data6$.description) : null, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : (_sectionData$$buttons = _sectionData$.buttons) === null || _sectionData$$buttons === void 0 ? void 0 : _sectionData$$buttons.map(function (button) {
1278
1300
  return button !== null && button !== void 0 && button.label && (button !== null && button !== void 0 && button.route || button !== null && button !== void 0 && button.link) ? /*#__PURE__*/React__default.createElement(LinkToPage, {
@@ -1319,13 +1341,16 @@ var Hero10 = function Hero10(props) {
1319
1341
 
1320
1342
  var SECTION_DEFAULT_CLASS = "my-12 mx-4 xl:mx-20 bg-background";
1321
1343
  var SECTION_CLASS = "my-6 md:my-12 px-4 xl:px-20 bg-background";
1344
+ var SECTION_CLASS_PADDING = "py-6 md:py-12 px-4 xl:px-20 bg-background";
1322
1345
 
1323
1346
  var Hero11 = function Hero11(props) {
1324
- var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$title, _data$data3, _data$data3$;
1347
+ var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$title, _data$data3, _data$data3$, _data$data4, _data$data4$, _data$data4$$buttons;
1325
1348
  var _props$data = props.data,
1326
1349
  data = _props$data === void 0 ? {} : _props$data,
1327
1350
  _props$shopConfigStyl = props.shopConfigStyle,
1328
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
1351
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
1352
+ _props$Link = props.Link,
1353
+ Link = _props$Link === void 0 ? null : _props$Link;
1329
1354
  return /*#__PURE__*/React__default.createElement("div", {
1330
1355
  className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-2 py-12 !bg-bgSecondary gap-6 md:gap-12"
1331
1356
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -1353,11 +1378,16 @@ var Hero11 = function Hero11(props) {
1353
1378
  className: "text-2xl md:text-4xl !leading-[1.6] font-headingFont w-max text-center text-primary"
1354
1379
  }, 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$$title = _data$data2$.title) === null || _data$data2$$title === void 0 ? void 0 : _data$data2$$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
1355
1380
  className: "text-lg md:text-xl lg:text-2xl"
1356
- }, 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), /*#__PURE__*/React__default.createElement(Button, {
1357
- label: "\u0110\u1EB7t b\xE0n ngay",
1358
- shopConfigStyle: shopConfigStyle,
1359
- className: "!font-normal w-max",
1360
- sho: true
1381
+ }, 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), 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$$buttons = _data$data4$.buttons) === null || _data$data4$$buttons === void 0 ? void 0 : _data$data4$$buttons.map(function (button, index) {
1382
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
1383
+ Link: Link,
1384
+ key: "gdf-" + index,
1385
+ href: convertURL(button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
1386
+ }, /*#__PURE__*/React__default.createElement(Button, {
1387
+ label: button === null || button === void 0 ? void 0 : button.label,
1388
+ shopConfigStyle: shopConfigStyle,
1389
+ className: "!font-normal w-max"
1390
+ }));
1361
1391
  })));
1362
1392
  };
1363
1393
 
@@ -1383,113 +1413,6 @@ var Hero12 = function Hero12(props) {
1383
1413
  }, 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)));
1384
1414
  };
1385
1415
 
1386
- var CarouselItem = function CarouselItem(props) {
1387
- var _Object$keys;
1388
- var _props$data = props.data,
1389
- data = _props$data === void 0 ? [] : _props$data,
1390
- _props$className = props.className,
1391
- className = _props$className === void 0 ? "" : _props$className,
1392
- _props$style = props.style,
1393
- style = _props$style === void 0 ? {} : _props$style,
1394
- _props$onClick = props.onClick,
1395
- onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
1396
- _props$isAll = props.isAll,
1397
- isAll = _props$isAll === void 0 ? true : _props$isAll,
1398
- _props$isNavigateButt = props.isNavigateButton,
1399
- isNavigateButton = _props$isNavigateButt === void 0 ? true : _props$isNavigateButt,
1400
- _props$itemClassName = props.itemClassName,
1401
- itemClassName = _props$itemClassName === void 0 ? "" : _props$itemClassName;
1402
- var listRef = useRef(null);
1403
- var _useState = useState(false),
1404
- canScrollLeft = _useState[0],
1405
- setCanScrollLeft = _useState[1];
1406
- var _useState2 = useState(false),
1407
- canScrollRight = _useState2[0],
1408
- setCanScrollRight = _useState2[1];
1409
- var _useState3 = useState({}),
1410
- value = _useState3[0],
1411
- setValue = _useState3[1];
1412
- useEffect(function () {
1413
- var _listRef$current;
1414
- checkScroll();
1415
- (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.addEventListener("scroll", checkScroll);
1416
- return function () {
1417
- var _listRef$current2;
1418
- return (_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.removeEventListener("scroll", checkScroll);
1419
- };
1420
- }, [data]);
1421
- var checkScroll = function checkScroll() {
1422
- if (listRef.current) {
1423
- var _listRef$current3 = listRef.current,
1424
- scrollLeft = _listRef$current3.scrollLeft,
1425
- scrollWidth = _listRef$current3.scrollWidth,
1426
- clientWidth = _listRef$current3.clientWidth;
1427
- setCanScrollLeft(scrollLeft > 0);
1428
- setCanScrollRight(scrollLeft + clientWidth < scrollWidth - 1);
1429
- }
1430
- };
1431
- var handleClickPrevImg = function handleClickPrevImg() {
1432
- if (listRef.current) {
1433
- checkScroll();
1434
- listRef.current.scrollBy({
1435
- left: -300,
1436
- behavior: "smooth"
1437
- });
1438
- }
1439
- };
1440
- var handleClickNextImg = function handleClickNextImg() {
1441
- if (listRef.current) {
1442
- checkScroll();
1443
- listRef.current.scrollBy({
1444
- left: 300,
1445
- behavior: "smooth"
1446
- });
1447
- }
1448
- };
1449
- var handleOnClick = function handleOnClick(item) {
1450
- setValue(item);
1451
- onClick === null || onClick === void 0 ? void 0 : onClick(item);
1452
- };
1453
- return /*#__PURE__*/React__default.createElement("div", {
1454
- className: "h-10 md:h-12 flex justify-between items-center " + className,
1455
- style: style
1456
- }, /*#__PURE__*/React__default.createElement("div", {
1457
- className: "w-full overflow-hidden "
1458
- }, /*#__PURE__*/React__default.createElement("div", {
1459
- className: "flex overflow-x-auto gap-2 " + (isNavigateButton ? "no-scrollbar" : "scroll-custom pb-2") + " items-center",
1460
- ref: listRef
1461
- }, isAll ? /*#__PURE__*/React__default.createElement("div", {
1462
- className: " " + ((Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(value)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0 ? "bg-primary text-textButton" : "bg-background") + " w-max border border-primary p-1 md:p-2 rounded-lg cursor-pointer whitespace-nowrap",
1463
- onClick: function onClick() {
1464
- handleOnClick({});
1465
- }
1466
- }, "T\u1EA5t c\u1EA3") : null, data && (data === null || data === void 0 ? void 0 : data.length) > 0 && (data === null || data === void 0 ? void 0 : data.map(function (item, index) {
1467
- return /*#__PURE__*/React__default.createElement("div", {
1468
- className: ((value === null || value === void 0 ? void 0 : value.value) === (item === null || item === void 0 ? void 0 : item.value) ? "bg-primary text-textButton" : "bg-background") + " w-max border border-primary py-1 px-2 md:py-2 md:px-3 rounded-lg cursor-pointer whitespace-nowrap " + itemClassName,
1469
- key: "carousel-" + index,
1470
- onClick: function onClick() {
1471
- handleOnClick(item);
1472
- }
1473
- }, item === null || item === void 0 ? void 0 : item.label);
1474
- })))), isNavigateButton ? /*#__PURE__*/React__default.createElement("div", {
1475
- className: "hidden my-auto gap-4 md:flex justify-end ps-10"
1476
- }, /*#__PURE__*/React__default.createElement("button", {
1477
- className: "h-full w-9 h-9 md:h-11 md:w-11 items-center justify-center rounded-full " + (canScrollLeft ? "bg-primary cursor-pointer text-textButton" : "bg-gray5 text-gray3 cursor-not-allowed"),
1478
- onClick: handleClickPrevImg,
1479
- disabled: !canScrollLeft
1480
- }, /*#__PURE__*/React__default.createElement(IoIosArrowBack, {
1481
- size: 24,
1482
- className: "inline-block text-lg"
1483
- })), /*#__PURE__*/React__default.createElement("button", {
1484
- className: "h-full w-9 h-9 md:h-11 md:w-11 flex items-center justify-center rounded-full " + (canScrollRight ? "bg-primary cursor-pointer text-textButton" : "bg-gray5 text-gray3 cursor-not-allowed"),
1485
- onClick: handleClickNextImg,
1486
- disabled: !canScrollRight
1487
- }, /*#__PURE__*/React__default.createElement(IoIosArrowForward, {
1488
- size: 24,
1489
- className: "inline-block text-lg "
1490
- }))) : null);
1491
- };
1492
-
1493
1416
  // A type of promise-like that resolves synchronously and supports only one observer
1494
1417
 
1495
1418
  const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
@@ -1509,6 +1432,19 @@ function _catch(body, recover) {
1509
1432
  return result;
1510
1433
  }
1511
1434
 
1435
+ // Asynchronously await a promise and pass the result to a finally continuation
1436
+ function _finallyRethrows(body, finalizer) {
1437
+ try {
1438
+ var result = body();
1439
+ } catch (e) {
1440
+ return finalizer(true, e);
1441
+ }
1442
+ if (result && result.then) {
1443
+ return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
1444
+ }
1445
+ return finalizer(false, result);
1446
+ }
1447
+
1512
1448
  function bind(fn, thisArg) {
1513
1449
  return function wrap() {
1514
1450
  return fn.apply(thisArg, arguments);
@@ -7600,6 +7536,14 @@ var formatCurrency = function formatCurrency(amount) {
7600
7536
  var formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
7601
7537
  return formattedAmount + " \u20AB";
7602
7538
  };
7539
+ var formatCurrency2 = function formatCurrency2(amount) {
7540
+ if (isNaN(amount)) {
7541
+ return 'đ 0';
7542
+ }
7543
+ var roundedAmount = Math.round(amount);
7544
+ var formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
7545
+ return "\u0111 " + formattedAmount;
7546
+ };
7603
7547
  var pattern = {
7604
7548
  phoneNumberPattern: /^(?:\+84|0)\d{9}$/
7605
7549
  };
@@ -7695,108 +7639,284 @@ var CategoryController = function CategoryController(props) {
7695
7639
 
7696
7640
  var Hero13 = function Hero13(props) {
7697
7641
  var _sectionData$, _sectionData$$srcImag, _data$data, _data$data$;
7698
- var listRef = useRef(null);
7699
- var _useState = useState(false);
7700
- var data = props.data;
7642
+ var shopConfig = props.shopConfig,
7643
+ data = props.data;
7701
7644
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
7702
- var _CategoryController = CategoryController(props);
7703
7645
  return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("img", {
7704
7646
  src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : (_sectionData$$srcImag = _sectionData$.srcImages) === null || _sectionData$$srcImag === void 0 ? void 0 : _sectionData$$srcImag[0],
7705
7647
  alt: 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$.title,
7706
7648
  className: "w-full object-cover"
7707
- }));
7708
- };
7709
-
7710
- var Features2 = function Features2(props) {
7711
- var data = props.data;
7712
- var sectionData = data === null || data === void 0 ? void 0 : data.data;
7713
- return /*#__PURE__*/React__default.createElement("div", {
7714
- className: "" + SECTION_DEFAULT_CLASS
7649
+ }), /*#__PURE__*/React__default.createElement("div", {
7650
+ className: "fixed right-6 bottom-10 md:bottom-24 z-50 flex flex-col gap-4 w-max"
7651
+ }, (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone) && /*#__PURE__*/React__default.createElement("a", {
7652
+ href: "tel:" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone)
7715
7653
  }, /*#__PURE__*/React__default.createElement("div", {
7716
- className: "p-6 grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6 lg:gap-8 rounded-xl bg-bgSecondary"
7717
- }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
7718
- return /*#__PURE__*/React__default.createElement("div", {
7719
- className: "flex flex-col gap-2 items-center text-sm lg:text-lg font-semibold text-center",
7720
- key: "dfgg-" + index
7721
- }, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
7722
- className: "w-12 text-primary md:w-16 lg:w-20 xl:w-24 h-24",
7723
- dangerouslySetInnerHTML: {
7724
- __html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
7725
- }
7726
- }) : /*#__PURE__*/React__default.createElement("img", {
7727
- src: item === null || item === void 0 ? void 0 : item.srcImage,
7728
- className: "w-12 md:w-16 lg:w-20 xl:w-24 text-primary",
7729
- alt: "logo"
7730
- }), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title));
7731
- })));
7654
+ className: "relative w-max"
7655
+ }, /*#__PURE__*/React__default.createElement("span", {
7656
+ className: "absolute inset-0 rounded-full bg-primary opacity-30 animate-ping"
7657
+ }), /*#__PURE__*/React__default.createElement("div", {
7658
+ className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
7659
+ }, /*#__PURE__*/React__default.createElement(AiOutlinePhone, {
7660
+ size: 36
7661
+ })))), (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) && /*#__PURE__*/React__default.createElement("a", {
7662
+ href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#",
7663
+ target: "_blank"
7664
+ }, /*#__PURE__*/React__default.createElement("div", {
7665
+ className: "relative w-max"
7666
+ }, /*#__PURE__*/React__default.createElement("span", {
7667
+ className: "absolute inset-0 rounded-full bg-primary opacity-30 animate-ping"
7668
+ }), /*#__PURE__*/React__default.createElement("div", {
7669
+ className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
7670
+ }, /*#__PURE__*/React__default.createElement(FaFacebookMessenger, {
7671
+ size: 32
7672
+ })))), (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) && /*#__PURE__*/React__default.createElement("a", {
7673
+ href: "https://zalo.me/" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#",
7674
+ target: "_blank"
7675
+ }, /*#__PURE__*/React__default.createElement("div", {
7676
+ className: "relative w-max"
7677
+ }, /*#__PURE__*/React__default.createElement("span", {
7678
+ className: "absolute inset-0 rounded-full bg-primary opacity-30 animate-ping"
7679
+ }), /*#__PURE__*/React__default.createElement("div", {
7680
+ className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
7681
+ }, /*#__PURE__*/React__default.createElement(SiZalo, {
7682
+ size: 32
7683
+ }))))));
7732
7684
  };
7733
7685
 
7734
- var Features3 = function Features3(props) {
7735
- var _data$sectionTitle;
7686
+ var Hero14 = function Hero14(props) {
7687
+ var _data$data, _data$data$, _data$data$$srcImages, _sectionData$, _sectionData$2, _sectionData$3, _sectionData$4, _sectionData$4$button;
7736
7688
  var shopConfigStyle = props.shopConfigStyle,
7737
- shopConfig = props.shopConfig,
7738
7689
  data = props.data,
7739
- _props$SectionTitle = props.SectionTitle,
7740
- SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
7741
7690
  _props$Link = props.Link,
7742
7691
  Link = _props$Link === void 0 ? null : _props$Link;
7743
7692
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
7744
- data.sectionTitle = data === null || data === void 0 ? void 0 : (_data$sectionTitle = data.sectionTitle) === null || _data$sectionTitle === void 0 ? void 0 : _data$sectionTitle.replace("{shopName}", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName);
7745
- var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
7746
- _shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
7747
- textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
7748
- _shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
7749
- background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
7750
- _shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
7751
- bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
7752
7693
  return /*#__PURE__*/React__default.createElement("div", {
7753
- className: SECTION_DEFAULT_CLASS + " flex flex-col gap-4 lg:gap-6",
7694
+ className: "relative w-full bg-cover bg-center bg-no-repeat ",
7754
7695
  style: {
7755
- background: background,
7756
- color: textBody
7696
+ 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]) + ")"
7757
7697
  }
7758
- }, /*#__PURE__*/React__default.createElement(SectionTitle, {
7759
- data: data,
7760
- shopConfigStyle: shopConfigStyle
7698
+ }, /*#__PURE__*/React__default.createElement("div", {
7699
+ className: "absolute top-0 w-full h-full bg-black opacity-40 z-0"
7761
7700
  }), /*#__PURE__*/React__default.createElement("div", {
7762
- className: "grid grid-cols-2 sm:grid-cols-4 gap-6 text-sm md:text-base"
7763
- }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
7701
+ className: "relative w-full min-h-[540px] p-12 z-10 flex flex-col gap-6 items-center justify-end bg-gradient-to-t from-black/50 to-transparent"
7702
+ }, /*#__PURE__*/React__default.createElement("div", {
7703
+ className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
7704
+ }, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.title), sectionData !== null && sectionData !== void 0 && (_sectionData$2 = sectionData[0]) !== null && _sectionData$2 !== void 0 && _sectionData$2.description ? /*#__PURE__*/React__default.createElement("div", {
7705
+ className: "text-lg text-center text-white md:text-2xl"
7706
+ }, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$3 = sectionData[0]) === null || _sectionData$3 === void 0 ? void 0 : _sectionData$3.description) : null, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$4 = sectionData[0]) === null || _sectionData$4 === void 0 ? void 0 : (_sectionData$4$button = _sectionData$4.buttons) === null || _sectionData$4$button === void 0 ? void 0 : _sectionData$4$button.map(function (button, index) {
7764
7707
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
7765
7708
  Link: Link,
7766
- href: (item === null || item === void 0 ? void 0 : item.link) || convertURL(item === null || item === void 0 ? void 0 : item.route) || "#"
7767
- }, /*#__PURE__*/React__default.createElement("div", {
7768
- className: "grid grid-cols-2 p-3 rounded-lg font-semibold",
7769
- key: "dfsdfj-" + index,
7770
- style: {
7771
- background: bgSecondary
7772
- }
7773
- }, /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title), item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
7774
- className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 h-auto"
7775
- }, /*#__PURE__*/React__default.createElement("div", {
7776
- dangerouslySetInnerHTML: {
7777
- __html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
7778
- }
7779
- })) : /*#__PURE__*/React__default.createElement("img", {
7780
- src: item === null || item === void 0 ? void 0 : item.srcImage,
7781
- className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 object-cover",
7782
- alt: ""
7783
- })));
7709
+ key: "gdf-" + index,
7710
+ href: convertURL(button === null || button === void 0 ? void 0 : button.route) || (button === null || button === void 0 ? void 0 : button.link) || "#"
7711
+ }, /*#__PURE__*/React__default.createElement(Button, {
7712
+ label: button === null || button === void 0 ? void 0 : button.label,
7713
+ className: "!bg-secondary",
7714
+ shopConfigStyle: shopConfigStyle
7715
+ }));
7784
7716
  })));
7785
7717
  };
7786
7718
 
7787
- var ProductController = function ProductController(props) {
7788
- var shopConfig = props.shopConfig,
7789
- params = props.params,
7790
- _props$isAutoGetList = props.isAutoGetList,
7791
- isAutoGetList = _props$isAutoGetList === void 0 ? true : _props$isAutoGetList;
7792
- var _useState = useState([]),
7793
- products = _useState[0],
7794
- setProducts = _useState[1];
7795
- var _useState2 = useState(false),
7796
- loading = _useState2[0],
7797
- setLoading = _useState2[1];
7798
- var _useState3 = useState(),
7799
- page = _useState3[0],
7719
+ var Hero15 = function Hero15(props) {
7720
+ var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$title, _data$data3, _data$data3$, _data$data4, _data$data4$, _data$data4$$buttons, _data$data5, _data$data5$, _data$data5$$buttons, _data$data5$$buttons$, _data$data6, _data$data6$, _data$data6$$buttons, _data$data6$$buttons$, _data$data7, _data$data7$, _data$data7$$buttons, _data$data7$$buttons$, _data$data8, _data$data8$, _data$data8$$srcImage;
7721
+ var _props$data = props.data,
7722
+ data = _props$data === void 0 ? {} : _props$data,
7723
+ _props$shopConfigStyl = props.shopConfigStyle,
7724
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
7725
+ _props$Link = props.Link,
7726
+ Link = _props$Link === void 0 ? null : _props$Link;
7727
+ return /*#__PURE__*/React__default.createElement("div", {
7728
+ className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-2 py-12 !bg-primary gap-6 md:gap-10"
7729
+ }, /*#__PURE__*/React__default.createElement("img", {
7730
+ src: 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],
7731
+ className: "object-cover max-w-full h-auto border-4 border-secondary block md:hidden"
7732
+ }), /*#__PURE__*/React__default.createElement("div", {
7733
+ className: "relative flex flex-col justify-center gap-6 lg:gap-10"
7734
+ }, /*#__PURE__*/React__default.createElement("div", {
7735
+ className: "text-2xl md:text-4xl !leading-[1.6] font-headingFont text-textSecondary"
7736
+ }, 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$$title = _data$data2$.title) === null || _data$data2$$title === void 0 ? void 0 : _data$data2$$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
7737
+ className: "text-lg text-textButton"
7738
+ }, 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), /*#__PURE__*/React__default.createElement("hr", {
7739
+ className: "w-1/3"
7740
+ }), (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$$buttons = _data$data4$.buttons) === null || _data$data4$$buttons === void 0 ? void 0 : _data$data4$$buttons.length) > 0 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
7741
+ Link: Link,
7742
+ href: convertURL(data === null || data === void 0 ? void 0 : (_data$data5 = data.data) === null || _data$data5 === void 0 ? void 0 : (_data$data5$ = _data$data5[0]) === null || _data$data5$ === void 0 ? void 0 : (_data$data5$$buttons = _data$data5$.buttons) === null || _data$data5$$buttons === void 0 ? void 0 : (_data$data5$$buttons$ = _data$data5$$buttons[0]) === null || _data$data5$$buttons$ === void 0 ? void 0 : _data$data5$$buttons$.route) || (data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : (_data$data6$$buttons = _data$data6$.buttons) === null || _data$data6$$buttons === void 0 ? void 0 : (_data$data6$$buttons$ = _data$data6$$buttons[0]) === null || _data$data6$$buttons$ === void 0 ? void 0 : _data$data6$$buttons$.link) || "#"
7743
+ }, /*#__PURE__*/React__default.createElement(Button, {
7744
+ label: data === null || data === void 0 ? void 0 : (_data$data7 = data.data) === null || _data$data7 === void 0 ? void 0 : (_data$data7$ = _data$data7[0]) === null || _data$data7$ === void 0 ? void 0 : (_data$data7$$buttons = _data$data7$.buttons) === null || _data$data7$$buttons === void 0 ? void 0 : (_data$data7$$buttons$ = _data$data7$$buttons[0]) === null || _data$data7$$buttons$ === void 0 ? void 0 : _data$data7$$buttons$.label,
7745
+ shopConfigStyle: shopConfigStyle,
7746
+ className: "!font-normal w-max !bg-secondary"
7747
+ })) : null), /*#__PURE__*/React__default.createElement("img", {
7748
+ src: data === null || data === void 0 ? void 0 : (_data$data8 = data.data) === null || _data$data8 === void 0 ? void 0 : (_data$data8$ = _data$data8[0]) === null || _data$data8$ === void 0 ? void 0 : (_data$data8$$srcImage = _data$data8$.srcImages) === null || _data$data8$$srcImage === void 0 ? void 0 : _data$data8$$srcImage[0],
7749
+ className: "object-cover max-w-full h-auto border-4 border-secondary hidden md:block"
7750
+ }));
7751
+ };
7752
+
7753
+ var Hero16 = function Hero16(props) {
7754
+ var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$, _data$data4, _data$data4$, _data$data4$$srcImage;
7755
+ var _props$data = props.data,
7756
+ data = _props$data === void 0 ? {} : _props$data,
7757
+ _props$shopConfigStyl = props.shopConfigStyle,
7758
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
7759
+ _props$router = props.router,
7760
+ router = _props$router === void 0 ? function () {} : _props$router,
7761
+ _props$Link = props.Link,
7762
+ Link = _props$Link === void 0 ? null : _props$Link;
7763
+ var _useState = useState(""),
7764
+ value = _useState[0],
7765
+ setValue = _useState[1];
7766
+ var handleSearch = function handleSearch(e) {
7767
+ if ((e === null || e === void 0 ? void 0 : e.key) === "Enter" && value && value.length > 0) {
7768
+ router === null || router === void 0 ? void 0 : router.push(genLinkSearch(value));
7769
+ }
7770
+ };
7771
+ return /*#__PURE__*/React__default.createElement("div", {
7772
+ className: "min-h-[480px] w-full h-full relative"
7773
+ }, /*#__PURE__*/React__default.createElement("img", {
7774
+ src: 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],
7775
+ className: "object-cover w-full h-full min-h-[480px]"
7776
+ }), /*#__PURE__*/React__default.createElement("div", {
7777
+ className: "absolute top-0 left-0 z-0 bg-secondary opacity-80 w-full h-full"
7778
+ }), /*#__PURE__*/React__default.createElement("div", {
7779
+ className: "w-full sm:w-2/3 absolute z-20 top-[15%] md:top-1/3 left-0 z-10 px-4 xl:px-20 flex flex-col gap-6 text-textButton my-auto"
7780
+ }, /*#__PURE__*/React__default.createElement("h2", {
7781
+ className: "font-medium text-2xl lg:text-4xl"
7782
+ }, 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$.title), /*#__PURE__*/React__default.createElement("div", {
7783
+ className: " text-lg lg:text-2xl"
7784
+ }, 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), /*#__PURE__*/React__default.createElement("div", {
7785
+ className: "flex flex-col sm:flex-row gap-4 w-full"
7786
+ }, /*#__PURE__*/React__default.createElement(Input, {
7787
+ wrapClassName: "w-2/3 sm:w-[80%] xl:w-[85%]",
7788
+ icons: /*#__PURE__*/React__default.createElement(LuSearch, {
7789
+ className: "text-gray3",
7790
+ size: 18
7791
+ }),
7792
+ placeholder: "Nh\u1EADp t\xEAn s\u1EA3n ph\u1EA9m",
7793
+ inputClassName: "w-full text-textBody",
7794
+ className: "h-12",
7795
+ onKeyDown: function onKeyDown(e) {
7796
+ handleSearch(e);
7797
+ },
7798
+ onChange: setValue
7799
+ }), value && (value === null || value === void 0 ? void 0 : value.length) > 0 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
7800
+ Link: Link,
7801
+ href: genLinkSearch(value)
7802
+ }, /*#__PURE__*/React__default.createElement(Button, {
7803
+ label: "T\xECm ki\u1EBFm",
7804
+ className: "whitespace-nowrap h-12 w-max",
7805
+ shopConfigStyle: shopConfigStyle
7806
+ })) : /*#__PURE__*/React__default.createElement(Button, {
7807
+ label: "T\xECm ki\u1EBFm",
7808
+ className: "whitespace-nowrap w-max h-12",
7809
+ shopConfigStyle: shopConfigStyle
7810
+ }))), /*#__PURE__*/React__default.createElement("div", {
7811
+ className: "absolute bottom-0 right-0 text-primary w-[45%] z-10"
7812
+ }, /*#__PURE__*/React__default.createElement("svg", {
7813
+ viewBox: "0 0 480 212",
7814
+ fill: "none",
7815
+ xmlns: "http://www.w3.org/2000/svg"
7816
+ }, /*#__PURE__*/React__default.createElement("path", {
7817
+ d: "M75.1847 149.804C55 189.553 14.9932 204.532 0 212H480V0C424.514 20.7319 393 94.1529 216.361 62.1956C120.186 44.7957 96.1405 108.537 75.1847 149.804Z",
7818
+ fill: "currentColor"
7819
+ }))), /*#__PURE__*/React__default.createElement("img", {
7820
+ src: 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$$srcImage = _data$data4$.srcImages) === null || _data$data4$$srcImage === void 0 ? void 0 : _data$data4$$srcImage[1],
7821
+ className: "object-cover w-[25%] h-auto max-h-full absolute right-10 opacity-100 bottom-0 z-10"
7822
+ }));
7823
+ };
7824
+
7825
+ var Features2 = function Features2(props) {
7826
+ var data = props.data,
7827
+ _props$Link = props.Link,
7828
+ Link = _props$Link === void 0 ? null : _props$Link;
7829
+ var sectionData = data === null || data === void 0 ? void 0 : data.data;
7830
+ return /*#__PURE__*/React__default.createElement("div", {
7831
+ className: "" + SECTION_DEFAULT_CLASS
7832
+ }, /*#__PURE__*/React__default.createElement("div", {
7833
+ className: "p-6 grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6 lg:gap-8 rounded-xl bg-bgSecondary"
7834
+ }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
7835
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
7836
+ Link: Link,
7837
+ href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
7838
+ }, /*#__PURE__*/React__default.createElement("div", {
7839
+ className: "flex flex-col gap-2 items-center text-sm lg:text-lg font-semibold text-center",
7840
+ key: "dfgg-" + index
7841
+ }, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
7842
+ className: "w-12 text-primary md:w-16 lg:w-20 xl:w-24 aspect-square",
7843
+ dangerouslySetInnerHTML: {
7844
+ __html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
7845
+ }
7846
+ }) : /*#__PURE__*/React__default.createElement("img", {
7847
+ src: item === null || item === void 0 ? void 0 : item.srcImage,
7848
+ className: "w-12 md:w-16 lg:w-20 object-contain xl:w-24 aspect-square text-primary",
7849
+ alt: "logo"
7850
+ }), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title)));
7851
+ })));
7852
+ };
7853
+
7854
+ var Features3 = function Features3(props) {
7855
+ var _data$sectionTitle;
7856
+ var shopConfigStyle = props.shopConfigStyle,
7857
+ shopConfig = props.shopConfig,
7858
+ data = props.data,
7859
+ _props$SectionTitle = props.SectionTitle,
7860
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
7861
+ _props$Link = props.Link,
7862
+ Link = _props$Link === void 0 ? null : _props$Link;
7863
+ var sectionData = data === null || data === void 0 ? void 0 : data.data;
7864
+ data.sectionTitle = data === null || data === void 0 ? void 0 : (_data$sectionTitle = data.sectionTitle) === null || _data$sectionTitle === void 0 ? void 0 : _data$sectionTitle.replace("{shopName}", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName);
7865
+ var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
7866
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
7867
+ textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
7868
+ _shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
7869
+ background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
7870
+ _shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
7871
+ bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
7872
+ return /*#__PURE__*/React__default.createElement("div", {
7873
+ className: SECTION_DEFAULT_CLASS + " flex flex-col gap-4 lg:gap-6",
7874
+ style: {
7875
+ background: background,
7876
+ color: textBody
7877
+ }
7878
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
7879
+ data: data,
7880
+ shopConfigStyle: shopConfigStyle
7881
+ }), /*#__PURE__*/React__default.createElement("div", {
7882
+ className: "grid grid-cols-2 sm:grid-cols-4 gap-6 text-sm md:text-base"
7883
+ }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
7884
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
7885
+ Link: Link,
7886
+ href: (item === null || item === void 0 ? void 0 : item.link) || convertURL(item === null || item === void 0 ? void 0 : item.route) || "#"
7887
+ }, /*#__PURE__*/React__default.createElement("div", {
7888
+ className: "grid grid-cols-2 p-3 h-full w-full rounded-lg font-semibold",
7889
+ key: "dfsdfj-" + index,
7890
+ style: {
7891
+ background: bgSecondary
7892
+ }
7893
+ }, /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title), item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
7894
+ className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 h-auto"
7895
+ }, /*#__PURE__*/React__default.createElement("div", {
7896
+ dangerouslySetInnerHTML: {
7897
+ __html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
7898
+ }
7899
+ })) : /*#__PURE__*/React__default.createElement("img", {
7900
+ src: item === null || item === void 0 ? void 0 : item.srcImage,
7901
+ className: "w-12 text-primary md:w-20 lg:w-24 xl:w-32 object-cover",
7902
+ alt: ""
7903
+ })));
7904
+ })));
7905
+ };
7906
+
7907
+ var ProductController = function ProductController(props) {
7908
+ var shopConfig = props.shopConfig,
7909
+ params = props.params,
7910
+ _props$isAutoGetList = props.isAutoGetList,
7911
+ isAutoGetList = _props$isAutoGetList === void 0 ? true : _props$isAutoGetList;
7912
+ var _useState = useState([]),
7913
+ products = _useState[0],
7914
+ setProducts = _useState[1];
7915
+ var _useState2 = useState(false),
7916
+ loading = _useState2[0],
7917
+ setLoading = _useState2[1];
7918
+ var _useState3 = useState(),
7919
+ page = _useState3[0],
7800
7920
  setPage = _useState3[1];
7801
7921
  var defaultParams = {
7802
7922
  page: 0,
@@ -7819,11 +7939,6 @@ var ProductController = function ProductController(props) {
7819
7939
  var _res$data2, _res$data3;
7820
7940
  setProducts(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
7821
7941
  setPage(res === null || res === void 0 ? void 0 : (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.page);
7822
- var url = new URL(window.location.href);
7823
- if (/^(\/(danh-muc))\/[^/]+-\d+$/.test(url.pathname)) {
7824
- url.pathname = url.pathname.replace(/\/[^/]+-\d+$/, "");
7825
- window.history.replaceState({}, '', url.pathname + url.search);
7826
- }
7827
7942
  }
7828
7943
  setLoading(false);
7829
7944
  });
@@ -8223,6 +8338,7 @@ var NotFoundProduct = function NotFoundProduct(props) {
8223
8338
  };
8224
8339
 
8225
8340
  var TreatmentsCategory7 = function TreatmentsCategory7(props) {
8341
+ var _products$slice;
8226
8342
  var _props$shopConfigStyl = props.shopConfigStyle,
8227
8343
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
8228
8344
  _props$data = props.data,
@@ -8235,7 +8351,8 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
8235
8351
  _shopConfigStyle$colo2 = _shopConfigStyle$colo.secondary,
8236
8352
  secondary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2;
8237
8353
  var _useState = useState({
8238
- types: "1"
8354
+ types: "1,10",
8355
+ size: 12
8239
8356
  }),
8240
8357
  params = _useState[0],
8241
8358
  setParams = _useState[1];
@@ -8252,15 +8369,27 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
8252
8369
  var _useState2 = useState(0),
8253
8370
  selectedCategory = _useState2[0],
8254
8371
  setSelectedCategory = _useState2[1];
8372
+ var _useState3 = useState(true),
8373
+ isGetMore = _useState3[0],
8374
+ setIsGetMore = _useState3[1];
8255
8375
  useEffect(function () {
8256
8376
  var newParams = _extends({}, params, {
8257
- categoryId: selectedCategory
8377
+ categoryId: selectedCategory,
8378
+ size: 12
8258
8379
  });
8259
8380
  if (!selectedCategory) {
8260
8381
  delete newParams.categoryId;
8261
8382
  }
8262
8383
  setParams(newParams);
8263
8384
  }, [selectedCategory]);
8385
+ var handleGetMoreProducts = function handleGetMoreProducts() {
8386
+ setIsGetMore(false);
8387
+ setParams(function (prev) {
8388
+ return _extends({}, prev, {
8389
+ size: (prev === null || prev === void 0 ? void 0 : prev.size) + 4
8390
+ });
8391
+ });
8392
+ };
8264
8393
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
8265
8394
  className: SECTION_DEFAULT_CLASS + " relative"
8266
8395
  }, /*#__PURE__*/React__default.createElement(SectionTitle, {
@@ -8277,15 +8406,16 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
8277
8406
  key: index,
8278
8407
  className: "p-3 flex gap-3 shrink-0 cursor-pointer text-base " + (selectedCategory === item.categoryId ? "bg-primary text-textButton" : ""),
8279
8408
  onClick: function onClick() {
8280
- return setSelectedCategory(item.categoryId);
8409
+ setSelectedCategory(item.categoryId);
8410
+ setIsGetMore(true);
8281
8411
  }
8282
8412
  }, item === null || item === void 0 ? void 0 : item.cateName);
8283
8413
  }
8284
- }), loading ? /*#__PURE__*/React__default.createElement("div", {
8414
+ }), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
8285
8415
  className: "flex w-full justify-center p-12"
8286
- }, /*#__PURE__*/React__default.createElement(Loading, null)) : products !== null && products !== void 0 && products.length ? /*#__PURE__*/React__default.createElement("div", {
8416
+ }, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
8287
8417
  className: "grid grid-cols-1 md:grid-cols-2 gap-10 mt-6"
8288
- }, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
8418
+ }, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, index) {
8289
8419
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
8290
8420
  key: index,
8291
8421
  Link: Link,
@@ -8295,7 +8425,13 @@ var TreatmentsCategory7 = function TreatmentsCategory7(props) {
8295
8425
  }));
8296
8426
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, {
8297
8427
  text: "d\u1ECBch v\u1EE5"
8298
- })), /*#__PURE__*/React__default.createElement(Dash, {
8428
+ }), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement("div", {
8429
+ className: "w-full flex justify-center mt-6"
8430
+ }, /*#__PURE__*/React__default.createElement(Button, {
8431
+ label: "Xem thêm",
8432
+ onClick: handleGetMoreProducts,
8433
+ className: "" + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass)
8434
+ })) : null), /*#__PURE__*/React__default.createElement(Dash, {
8299
8435
  color: secondary
8300
8436
  }));
8301
8437
  };
@@ -8313,7 +8449,7 @@ var TreatmentsList6 = function TreatmentsList6(props) {
8313
8449
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
8314
8450
  var _useState = useState({
8315
8451
  size: 12,
8316
- types: "1"
8452
+ types: "1,10"
8317
8453
  }),
8318
8454
  params = _useState[0],
8319
8455
  setParams = _useState[1];
@@ -8512,73 +8648,169 @@ var BookingController = function BookingController(props) {
8512
8648
  };
8513
8649
  };
8514
8650
 
8515
- var Select = forwardRef(function (props, ref) {
8651
+ var DateTimePicker = forwardRef(function (props, ref) {
8516
8652
  var _props$label = props.label,
8517
8653
  label = _props$label === void 0 ? "" : _props$label,
8518
- _props$labelClassName = props.labelClassName,
8519
- labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
8520
- _props$placeholder = props.placeholder,
8521
- placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
8522
8654
  _props$className = props.className,
8523
8655
  className = _props$className === void 0 ? "" : _props$className,
8524
- _props$optionClassNam = props.optionClassName,
8525
- optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
8526
- _props$wrapClassName = props.wrapClassName,
8527
- wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
8528
- _props$selectClassNam = props.selectClassName,
8529
- selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
8530
- _props$disabled = props.disabled,
8531
- disabled = _props$disabled === void 0 ? false : _props$disabled,
8532
- _props$rules = props.rules,
8533
- rules = _props$rules === void 0 ? [] : _props$rules,
8534
- options = props.options,
8656
+ _props$labelClassName = props.labelClassName,
8657
+ labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
8535
8658
  _props$defaultValue = props.defaultValue,
8536
- defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
8537
- handleSearchOption = props.handleSearchOption,
8538
- _props$isMulti = props.isMulti,
8539
- isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
8540
- _props$onClick = props.onClick,
8541
- onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
8542
- _props$isButtonDelete = props.isButtonDelete,
8543
- isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
8544
- _props$funcDelete = props.funcDelete,
8545
- funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
8546
- _props$isSearch = props.isSearch,
8547
- isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
8548
- renderItem = props.renderItem;
8549
- var _useState = useState(false),
8550
- isOpen = _useState[0],
8551
- setIsOpen = _useState[1];
8552
- var selectRef = useRef(null);
8659
+ defaultValue = _props$defaultValue === void 0 ? new Date() : _props$defaultValue,
8660
+ _props$time = props.time,
8661
+ time = _props$time === void 0 ? false : _props$time,
8662
+ rules = props.rules;
8663
+ var _useState = useState(defaultValue),
8664
+ value = _useState[0],
8665
+ _setValue = _useState[1];
8553
8666
  var _useState2 = useState(""),
8554
8667
  error = _useState2[0],
8555
8668
  _setError = _useState2[1];
8556
- var _useState3 = useState(""),
8557
- inputSearch = _useState3[0],
8558
- setInputSearch = _useState3[1];
8559
- var _useState4 = useState(defaultValue),
8560
- value = _useState4[0],
8561
- setValue = _useState4[1];
8562
- var _useState5 = useState(options),
8563
- listOptions = _useState5[0],
8564
- setListOptions = _useState5[1];
8565
- var dropdownRef = useRef(null);
8566
- var _useState6 = useState('bottom'),
8567
- dropdownPosition = _useState6[0],
8568
- setDropdownPosition = _useState6[1];
8569
- var inputRef = useRef(null);
8570
- useEffect(function () {
8571
- if (isMulti) setValue(defaultValue);
8572
- }, [defaultValue]);
8573
- useEffect(function () {
8574
- setListOptions(options);
8575
- if (!isMulti) setValue(defaultValue);
8576
- }, [options]);
8577
- useEffect(function () {
8578
- var delayDebounceFn = setTimeout(function () {
8579
- handleSearch === null || handleSearch === void 0 ? void 0 : handleSearch(inputSearch);
8580
- }, 600);
8581
- return function () {
8669
+ var _className = "h-10 flex items-center py-1 px-2 border border-stroke rounded bg-white cursor-pointer " + className;
8670
+ var CustomInput = forwardRef(function (_ref, ref) {
8671
+ var value = _ref.value,
8672
+ onClick = _ref.onClick,
8673
+ className = _ref.className;
8674
+ return /*#__PURE__*/React__default.createElement("div", {
8675
+ className: className,
8676
+ onClick: onClick,
8677
+ ref: ref
8678
+ }, value);
8679
+ });
8680
+ useImperativeHandle(ref, function () {
8681
+ return {
8682
+ validateData: function validateData() {
8683
+ return _validateData();
8684
+ },
8685
+ setValue: function setValue(text) {
8686
+ return _setValue(text);
8687
+ },
8688
+ getValue: function getValue() {
8689
+ return value;
8690
+ },
8691
+ setError: function setError(err) {
8692
+ return _setError(err);
8693
+ }
8694
+ };
8695
+ });
8696
+ var _validateData = function _validateData() {
8697
+ var count = 0;
8698
+ rules === null || rules === void 0 ? void 0 : rules.forEach(function (e) {
8699
+ var _e$pattern, _e$validate;
8700
+ if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
8701
+ _setError(e === null || e === void 0 ? void 0 : e.message);
8702
+ count++;
8703
+ return false;
8704
+ } 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))) {
8705
+ _setError(e === null || e === void 0 ? void 0 : e.message);
8706
+ count++;
8707
+ return false;
8708
+ } else if (value !== "" && (e === null || e === void 0 ? void 0 : e.type) === "validate" && e !== null && e !== void 0 && e.validate && !(e !== null && e !== void 0 && (_e$validate = e.validate) !== null && _e$validate !== void 0 && _e$validate.call(e))) {
8709
+ _setError(e === null || e === void 0 ? void 0 : e.message);
8710
+ count++;
8711
+ return false;
8712
+ }
8713
+ });
8714
+ if (count) {
8715
+ return false;
8716
+ } else {
8717
+ _setError('');
8718
+ return true;
8719
+ }
8720
+ };
8721
+ var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
8722
+ return (e === null || e === void 0 ? void 0 : e.type) === "required";
8723
+ }));
8724
+ var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
8725
+ className: "text-danger"
8726
+ }, " *") : null;
8727
+ return /*#__PURE__*/React__default.createElement("div", {
8728
+ className: "w-full"
8729
+ }, label ? /*#__PURE__*/React__default.createElement("div", {
8730
+ className: "mb-1 " + labelClassName
8731
+ }, label, labelRequired) : null, /*#__PURE__*/React__default.createElement(DatePicker, {
8732
+ selected: value,
8733
+ onChange: function onChange(date) {
8734
+ _setValue(date);
8735
+ },
8736
+ customInput: /*#__PURE__*/React__default.createElement(CustomInput, {
8737
+ className: _className
8738
+ }),
8739
+ dateFormat: time ? "dd/MM/yyyy HH:mm" : "dd/MM/yyyy",
8740
+ showTimeSelect: time,
8741
+ timeIntervals: 15,
8742
+ wrapperClassName: "w-full"
8743
+ }), error ? /*#__PURE__*/React__default.createElement("div", {
8744
+ className: "text-danger"
8745
+ }, error) : null);
8746
+ });
8747
+
8748
+ var Select = forwardRef(function (props, ref) {
8749
+ var _props$label = props.label,
8750
+ label = _props$label === void 0 ? "" : _props$label,
8751
+ _props$labelClassName = props.labelClassName,
8752
+ labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
8753
+ _props$placeholder = props.placeholder,
8754
+ placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
8755
+ _props$className = props.className,
8756
+ className = _props$className === void 0 ? "" : _props$className,
8757
+ _props$optionClassNam = props.optionClassName,
8758
+ optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
8759
+ _props$wrapClassName = props.wrapClassName,
8760
+ wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
8761
+ _props$selectClassNam = props.selectClassName,
8762
+ selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
8763
+ _props$disabled = props.disabled,
8764
+ disabled = _props$disabled === void 0 ? false : _props$disabled,
8765
+ _props$rules = props.rules,
8766
+ rules = _props$rules === void 0 ? [] : _props$rules,
8767
+ options = props.options,
8768
+ _props$defaultValue = props.defaultValue,
8769
+ defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
8770
+ _props$isMulti = props.isMulti,
8771
+ isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
8772
+ _props$onClick = props.onClick,
8773
+ onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
8774
+ _props$isButtonDelete = props.isButtonDelete,
8775
+ isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
8776
+ _props$funcDelete = props.funcDelete,
8777
+ funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
8778
+ _props$isSearch = props.isSearch,
8779
+ isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
8780
+ renderItem = props.renderItem;
8781
+ var _useState = useState(false),
8782
+ isOpen = _useState[0],
8783
+ setIsOpen = _useState[1];
8784
+ var selectRef = useRef(null);
8785
+ var _useState2 = useState(""),
8786
+ error = _useState2[0],
8787
+ _setError = _useState2[1];
8788
+ var _useState3 = useState(""),
8789
+ inputSearch = _useState3[0],
8790
+ setInputSearch = _useState3[1];
8791
+ var _useState4 = useState(defaultValue),
8792
+ value = _useState4[0],
8793
+ setValue = _useState4[1];
8794
+ var _useState5 = useState(options),
8795
+ listOptions = _useState5[0],
8796
+ setListOptions = _useState5[1];
8797
+ var dropdownRef = useRef(null);
8798
+ var _useState6 = useState('bottom'),
8799
+ dropdownPosition = _useState6[0],
8800
+ setDropdownPosition = _useState6[1];
8801
+ var inputRef = useRef(null);
8802
+ useEffect(function () {
8803
+ if (isMulti) setValue(defaultValue);
8804
+ }, [defaultValue]);
8805
+ useEffect(function () {
8806
+ setListOptions(options);
8807
+ if (!isMulti) setValue(defaultValue);
8808
+ }, [options]);
8809
+ useEffect(function () {
8810
+ var delayDebounceFn = setTimeout(function () {
8811
+ handleSearch === null || handleSearch === void 0 ? void 0 : handleSearch(inputSearch);
8812
+ }, 600);
8813
+ return function () {
8582
8814
  return clearTimeout(delayDebounceFn);
8583
8815
  };
8584
8816
  }, [inputSearch]);
@@ -8659,20 +8891,13 @@ var Select = forwardRef(function (props, ref) {
8659
8891
  }
8660
8892
  };
8661
8893
  var handleSearch = function handleSearch(searchValue) {
8662
- if (handleSearchOption && typeof handleSearchOption === 'function') {
8663
- handleSearchOption === null || handleSearchOption === void 0 ? void 0 : handleSearchOption(searchValue);
8664
- } else {
8665
- var listFilterOptions = options.filter(function (item) {
8666
- var _item$label;
8667
- return item === null || item === void 0 ? void 0 : (_item$label = item.label) === null || _item$label === void 0 ? void 0 : _item$label.toLowerCase().includes(searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase());
8668
- });
8669
- setListOptions(listFilterOptions);
8670
- }
8894
+ var listFilterOptions = options.filter(function (item) {
8895
+ var _item$label;
8896
+ return item === null || item === void 0 ? void 0 : (_item$label = item.label) === null || _item$label === void 0 ? void 0 : _item$label.toLowerCase().includes(searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase());
8897
+ });
8898
+ setListOptions(listFilterOptions);
8671
8899
  };
8672
8900
  var handleToggleSelect = function handleToggleSelect() {
8673
- if (!isOpen && handleSearchOption && typeof handleSearchOption === 'function') {
8674
- handleSearchOption("");
8675
- }
8676
8901
  setIsOpen(!isOpen);
8677
8902
  setInputSearch("");
8678
8903
  setListOptions(options);
@@ -8771,103 +8996,6 @@ var Select = forwardRef(function (props, ref) {
8771
8996
  });
8772
8997
  var Select$1 = memo(Select);
8773
8998
 
8774
- var DateTimePicker = forwardRef(function (props, ref) {
8775
- var _props$label = props.label,
8776
- label = _props$label === void 0 ? "" : _props$label,
8777
- _props$className = props.className,
8778
- className = _props$className === void 0 ? "" : _props$className,
8779
- _props$labelClassName = props.labelClassName,
8780
- labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
8781
- _props$defaultValue = props.defaultValue,
8782
- defaultValue = _props$defaultValue === void 0 ? new Date() : _props$defaultValue,
8783
- _props$time = props.time,
8784
- time = _props$time === void 0 ? false : _props$time,
8785
- rules = props.rules;
8786
- var _useState = useState(defaultValue),
8787
- value = _useState[0],
8788
- _setValue = _useState[1];
8789
- var _useState2 = useState(""),
8790
- error = _useState2[0],
8791
- _setError = _useState2[1];
8792
- var _className = "h-10 flex items-center py-1 px-2 border border-stroke rounded bg-white cursor-pointer " + className;
8793
- var CustomInput = forwardRef(function (_ref, ref) {
8794
- var value = _ref.value,
8795
- onClick = _ref.onClick,
8796
- className = _ref.className;
8797
- return /*#__PURE__*/React__default.createElement("div", {
8798
- className: className,
8799
- onClick: onClick,
8800
- ref: ref
8801
- }, value);
8802
- });
8803
- useImperativeHandle(ref, function () {
8804
- return {
8805
- validateData: function validateData() {
8806
- return _validateData();
8807
- },
8808
- setValue: function setValue(text) {
8809
- return _setValue(text);
8810
- },
8811
- getValue: function getValue() {
8812
- return value;
8813
- },
8814
- setError: function setError(err) {
8815
- return _setError(err);
8816
- }
8817
- };
8818
- });
8819
- var _validateData = function _validateData() {
8820
- var count = 0;
8821
- rules === null || rules === void 0 ? void 0 : rules.forEach(function (e) {
8822
- var _e$pattern, _e$validate;
8823
- if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
8824
- _setError(e === null || e === void 0 ? void 0 : e.message);
8825
- count++;
8826
- return false;
8827
- } 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))) {
8828
- _setError(e === null || e === void 0 ? void 0 : e.message);
8829
- count++;
8830
- return false;
8831
- } else if (value !== "" && (e === null || e === void 0 ? void 0 : e.type) === "validate" && e !== null && e !== void 0 && e.validate && !(e !== null && e !== void 0 && (_e$validate = e.validate) !== null && _e$validate !== void 0 && _e$validate.call(e))) {
8832
- _setError(e === null || e === void 0 ? void 0 : e.message);
8833
- count++;
8834
- return false;
8835
- }
8836
- });
8837
- if (count) {
8838
- return false;
8839
- } else {
8840
- _setError('');
8841
- return true;
8842
- }
8843
- };
8844
- var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
8845
- return (e === null || e === void 0 ? void 0 : e.type) === "required";
8846
- }));
8847
- var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
8848
- className: "text-danger"
8849
- }, " *") : null;
8850
- return /*#__PURE__*/React__default.createElement("div", {
8851
- className: "w-full"
8852
- }, label ? /*#__PURE__*/React__default.createElement("div", {
8853
- className: "mb-1 " + labelClassName
8854
- }, label, labelRequired) : null, /*#__PURE__*/React__default.createElement(DatePicker, {
8855
- selected: value,
8856
- onChange: function onChange(date) {
8857
- _setValue(date);
8858
- },
8859
- customInput: /*#__PURE__*/React__default.createElement(CustomInput, {
8860
- className: _className
8861
- }),
8862
- dateFormat: time ? "dd/MM/yyyy HH:mm" : "dd/MM/yyyy",
8863
- showTimeSelect: time,
8864
- timeIntervals: 15,
8865
- wrapperClassName: "w-full"
8866
- }), error ? /*#__PURE__*/React__default.createElement("div", {
8867
- className: "text-danger"
8868
- }, error) : null);
8869
- });
8870
-
8871
8999
  var InputPhoneNumber = forwardRef(function (props, ref) {
8872
9000
  var _props$label = props.label,
8873
9001
  label = _props$label === void 0 ? "" : _props$label,
@@ -9016,150 +9144,316 @@ var InputPhoneNumber = forwardRef(function (props, ref) {
9016
9144
  }, error) : null);
9017
9145
  });
9018
9146
 
9019
- var dayjs_min = createCommonjsModule(function (module, exports) {
9020
- !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
9021
- });
9022
-
9023
- var js_cookie = createCommonjsModule(function (module, exports) {
9024
- (function (global, factory) {
9025
- module.exports = factory() ;
9026
- })(commonjsGlobal, (function () {
9027
- /* eslint-disable no-var */
9028
- function assign (target) {
9029
- for (var i = 1; i < arguments.length; i++) {
9030
- var source = arguments[i];
9031
- for (var key in source) {
9032
- target[key] = source[key];
9033
- }
9034
- }
9035
- return target
9036
- }
9037
- /* eslint-enable no-var */
9038
-
9039
- /* eslint-disable no-var */
9040
- var defaultConverter = {
9041
- read: function (value) {
9042
- if (value[0] === '"') {
9043
- value = value.slice(1, -1);
9044
- }
9045
- return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent)
9046
- },
9047
- write: function (value) {
9048
- return encodeURIComponent(value).replace(
9049
- /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
9050
- decodeURIComponent
9051
- )
9052
- }
9053
- };
9054
- /* eslint-enable no-var */
9055
-
9056
- /* eslint-disable no-var */
9057
-
9058
- function init (converter, defaultAttributes) {
9059
- function set (name, value, attributes) {
9060
- if (typeof document === 'undefined') {
9061
- return
9062
- }
9063
-
9064
- attributes = assign({}, defaultAttributes, attributes);
9065
-
9066
- if (typeof attributes.expires === 'number') {
9067
- attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
9147
+ var Select$2 = forwardRef(function (props, ref) {
9148
+ var _props$label = props.label,
9149
+ label = _props$label === void 0 ? "" : _props$label,
9150
+ _props$labelClassName = props.labelClassName,
9151
+ labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
9152
+ _props$placeholder = props.placeholder,
9153
+ placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
9154
+ _props$className = props.className,
9155
+ className = _props$className === void 0 ? "" : _props$className,
9156
+ _props$optionClassNam = props.optionClassName,
9157
+ optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
9158
+ _props$wrapClassName = props.wrapClassName,
9159
+ wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
9160
+ _props$selectClassNam = props.selectClassName,
9161
+ selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
9162
+ _props$disabled = props.disabled,
9163
+ disabled = _props$disabled === void 0 ? false : _props$disabled,
9164
+ _props$loading = props.loading,
9165
+ loading = _props$loading === void 0 ? false : _props$loading,
9166
+ _props$rules = props.rules,
9167
+ rules = _props$rules === void 0 ? [] : _props$rules,
9168
+ options = props.options,
9169
+ _props$defaultValue = props.defaultValue,
9170
+ defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
9171
+ handleSearchOption = props.handleSearchOption,
9172
+ _props$isMulti = props.isMulti,
9173
+ isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
9174
+ _props$onClick = props.onClick,
9175
+ onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
9176
+ _props$isButtonDelete = props.isButtonDelete,
9177
+ isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
9178
+ _props$funcDelete = props.funcDelete,
9179
+ funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
9180
+ setParams = props.setParams,
9181
+ _props$isSearch = props.isSearch,
9182
+ isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
9183
+ renderItem = props.renderItem;
9184
+ var _useState = useState(false),
9185
+ isOpen = _useState[0],
9186
+ setIsOpen = _useState[1];
9187
+ var selectRef = useRef(null);
9188
+ var _useState2 = useState(""),
9189
+ error = _useState2[0],
9190
+ _setError = _useState2[1];
9191
+ var _useState3 = useState(""),
9192
+ inputSearch = _useState3[0],
9193
+ setInputSearch = _useState3[1];
9194
+ var _useState4 = useState(defaultValue),
9195
+ value = _useState4[0],
9196
+ setValue = _useState4[1];
9197
+ var _useState5 = useState(options),
9198
+ listOptions = _useState5[0],
9199
+ setListOptions = _useState5[1];
9200
+ var dropdownRef = useRef(null);
9201
+ var _useState6 = useState('bottom'),
9202
+ dropdownPosition = _useState6[0],
9203
+ setDropdownPosition = _useState6[1];
9204
+ var inputRef = useRef(null);
9205
+ var _useState7 = useState(12),
9206
+ nextTrigger = _useState7[0],
9207
+ setNextTrigger = _useState7[1];
9208
+ var optionRef = useRef(null);
9209
+ var triggeredRef = useRef(false);
9210
+ useEffect(function () {
9211
+ if (isMulti) setValue(defaultValue);
9212
+ }, [defaultValue]);
9213
+ useEffect(function () {
9214
+ setListOptions(options);
9215
+ if (!isMulti) setValue(defaultValue);
9216
+ }, [options]);
9217
+ useEffect(function () {
9218
+ var _optionRef$current;
9219
+ if (typeof setParams !== 'function') return;
9220
+ triggeredRef.current = false;
9221
+ var options = (_optionRef$current = optionRef.current) === null || _optionRef$current === void 0 ? void 0 : _optionRef$current.querySelectorAll('div.option');
9222
+ if (!options || options.length === 0) return;
9223
+ var targetElement = options[nextTrigger];
9224
+ if (!targetElement) return;
9225
+ var observer = new IntersectionObserver(function (_ref) {
9226
+ var entry = _ref[0];
9227
+ if (entry.isIntersecting && !triggeredRef.current) {
9228
+ triggeredRef.current = true;
9229
+ setParams(function (prev) {
9230
+ return _extends({}, prev, {
9231
+ size: prev.size + 8
9232
+ });
9233
+ });
9234
+ setNextTrigger(function (prev) {
9235
+ return prev + 8;
9236
+ });
9068
9237
  }
9069
- if (attributes.expires) {
9070
- attributes.expires = attributes.expires.toUTCString();
9238
+ }, {
9239
+ root: optionRef.current,
9240
+ threshold: 1.0
9241
+ });
9242
+ observer.observe(targetElement);
9243
+ return function () {
9244
+ observer.disconnect();
9245
+ };
9246
+ }, [listOptions, nextTrigger]);
9247
+ useEffect(function () {
9248
+ var delayDebounceFn = setTimeout(function () {
9249
+ handleSearch === null || handleSearch === void 0 ? void 0 : handleSearch(inputSearch);
9250
+ if (optionRef.current) {
9251
+ optionRef.current.scrollTop = 0;
9071
9252
  }
9072
-
9073
- name = encodeURIComponent(name)
9074
- .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
9075
- .replace(/[()]/g, escape);
9076
-
9077
- var stringifiedAttributes = '';
9078
- for (var attributeName in attributes) {
9079
- if (!attributes[attributeName]) {
9080
- continue
9081
- }
9082
-
9083
- stringifiedAttributes += '; ' + attributeName;
9084
-
9085
- if (attributes[attributeName] === true) {
9086
- continue
9253
+ }, 600);
9254
+ return function () {
9255
+ return clearTimeout(delayDebounceFn);
9256
+ };
9257
+ }, [inputSearch]);
9258
+ useEffect(function () {
9259
+ var _inputRef$current;
9260
+ inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
9261
+ var updateDropdownPosition = function updateDropdownPosition() {
9262
+ if (selectRef.current && dropdownRef.current) {
9263
+ var _selectRef$current, _window;
9264
+ var selectRect = selectRef === null || selectRef === void 0 ? void 0 : (_selectRef$current = selectRef.current) === null || _selectRef$current === void 0 ? void 0 : _selectRef$current.getBoundingClientRect();
9265
+ var spaceBelow = ((_window = window) === null || _window === void 0 ? void 0 : _window.innerHeight) - (selectRect === null || selectRect === void 0 ? void 0 : selectRect.bottom);
9266
+ var spaceAbove = selectRect === null || selectRect === void 0 ? void 0 : selectRect.top;
9267
+ if (spaceBelow < spaceAbove) {
9268
+ setDropdownPosition('top');
9269
+ } else {
9270
+ setDropdownPosition('bottom');
9087
9271
  }
9088
-
9089
- // Considers RFC 6265 section 5.2:
9090
- // ...
9091
- // 3. If the remaining unparsed-attributes contains a %x3B (";")
9092
- // character:
9093
- // Consume the characters of the unparsed-attributes up to,
9094
- // not including, the first %x3B (";") character.
9095
- // ...
9096
- stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
9097
9272
  }
9098
-
9099
- return (document.cookie =
9100
- name + '=' + converter.write(value, name) + stringifiedAttributes)
9273
+ };
9274
+ if (isOpen) {
9275
+ updateDropdownPosition();
9276
+ window.addEventListener('resize', updateDropdownPosition);
9101
9277
  }
9102
-
9103
- function get (name) {
9104
- if (typeof document === 'undefined' || (arguments.length && !name)) {
9105
- return
9278
+ return function () {
9279
+ window.removeEventListener('resize', updateDropdownPosition);
9280
+ };
9281
+ }, [isOpen]);
9282
+ var handleClickOutside = function handleClickOutside(event) {
9283
+ var _selectRef$current2;
9284
+ if (selectRef !== null && selectRef !== void 0 && selectRef.current && !(selectRef !== null && selectRef !== void 0 && (_selectRef$current2 = selectRef.current) !== null && _selectRef$current2 !== void 0 && _selectRef$current2.contains(event.target))) {
9285
+ setIsOpen(false);
9286
+ setInputSearch("");
9287
+ setListOptions(options);
9288
+ }
9289
+ };
9290
+ useEffect(function () {
9291
+ document.addEventListener('click', handleClickOutside);
9292
+ return function () {
9293
+ document.removeEventListener('click', handleClickOutside);
9294
+ };
9295
+ }, []);
9296
+ useImperativeHandle(ref, function () {
9297
+ return {
9298
+ validateData: function validateData() {
9299
+ return _validateData();
9300
+ },
9301
+ setError: function setError(err) {
9302
+ return _setError(err);
9106
9303
  }
9107
-
9108
- // To prevent the for loop in the first place assign an empty array
9109
- // in case there are no cookies at all.
9110
- var cookies = document.cookie ? document.cookie.split('; ') : [];
9111
- var jar = {};
9112
- for (var i = 0; i < cookies.length; i++) {
9113
- var parts = cookies[i].split('=');
9114
- var value = parts.slice(1).join('=');
9115
-
9116
- try {
9117
- var found = decodeURIComponent(parts[0]);
9118
- jar[found] = converter.read(value, found);
9119
-
9120
- if (name === found) {
9121
- break
9122
- }
9123
- } catch (e) {}
9304
+ };
9305
+ });
9306
+ var isEmpty = function isEmpty(value) {
9307
+ var _Object$keys;
9308
+ if (Array !== null && Array !== void 0 && Array.isArray(value)) return (value === null || value === void 0 ? void 0 : value.length) <= 0;
9309
+ if (typeof value === 'object') return (Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(value)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0;
9310
+ return false;
9311
+ };
9312
+ var _validateData = function _validateData() {
9313
+ var count = 0;
9314
+ for (var _iterator = _createForOfIteratorHelperLoose(rules), _step; !(_step = _iterator()).done;) {
9315
+ var _e$pattern;
9316
+ var e = _step.value;
9317
+ if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && isEmpty(value)) {
9318
+ _setError(e === null || e === void 0 ? void 0 : e.message);
9319
+ count++;
9320
+ break;
9321
+ } 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))) {
9322
+ _setError(e === null || e === void 0 ? void 0 : e.message);
9323
+ count++;
9324
+ break;
9124
9325
  }
9125
-
9126
- return name ? jar[name] : jar
9127
9326
  }
9128
-
9129
- return Object.create(
9130
- {
9131
- set,
9132
- get,
9133
- remove: function (name, attributes) {
9134
- set(
9135
- name,
9136
- '',
9137
- assign({}, attributes, {
9138
- expires: -1
9139
- })
9140
- );
9141
- },
9142
- withAttributes: function (attributes) {
9143
- return init(this.converter, assign({}, this.attributes, attributes))
9144
- },
9145
- withConverter: function (converter) {
9146
- return init(assign({}, this.converter, converter), this.attributes)
9147
- }
9148
- },
9149
- {
9150
- attributes: { value: Object.freeze(defaultAttributes) },
9151
- converter: { value: Object.freeze(converter) }
9327
+ if (count) {
9328
+ return false;
9329
+ } else {
9330
+ _setError('');
9331
+ return true;
9332
+ }
9333
+ };
9334
+ var handleSearch = function handleSearch(searchValue) {
9335
+ if (handleSearchOption && typeof handleSearchOption === 'function') {
9336
+ handleSearchOption === null || handleSearchOption === void 0 ? void 0 : handleSearchOption(searchValue);
9337
+ setNextTrigger(12);
9338
+ } else {
9339
+ var listFilterOptions = options.filter(function (item) {
9340
+ var _item$label;
9341
+ return item === null || item === void 0 ? void 0 : (_item$label = item.label) === null || _item$label === void 0 ? void 0 : _item$label.toLowerCase().includes(searchValue === null || searchValue === void 0 ? void 0 : searchValue.toLowerCase());
9342
+ });
9343
+ setListOptions(listFilterOptions);
9344
+ }
9345
+ };
9346
+ var handleToggleSelect = function handleToggleSelect() {
9347
+ setIsOpen(!isOpen);
9348
+ setInputSearch("");
9349
+ setListOptions(options);
9350
+ if (typeof setParams === 'function') {
9351
+ setParams === null || setParams === void 0 ? void 0 : setParams(function (prev) {
9352
+ return _extends({}, prev, {
9353
+ size: 16
9354
+ });
9355
+ });
9356
+ setNextTrigger(12);
9357
+ }
9358
+ };
9359
+ var checkSelection = function checkSelection(valueId) {
9360
+ if (isMulti) return value === null || value === void 0 ? void 0 : value.some(function (item) {
9361
+ return (item === null || item === void 0 ? void 0 : item.value) === valueId;
9362
+ });
9363
+ return (value === null || value === void 0 ? void 0 : value.value) == valueId;
9364
+ };
9365
+ var handleSelection = function handleSelection(item, e) {
9366
+ e.stopPropagation();
9367
+ if (!isMulti) {
9368
+ setValue(item);
9369
+ setIsOpen(false);
9370
+ }
9371
+ onClick === null || onClick === void 0 ? void 0 : onClick(item);
9372
+ };
9373
+ var handleDeleteSelection = function handleDeleteSelection(e, item) {
9374
+ e.stopPropagation();
9375
+ if (isMulti === false) setValue({});
9376
+ funcDelete === null || funcDelete === void 0 ? void 0 : funcDelete(item);
9377
+ };
9378
+ var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
9379
+ return (e === null || e === void 0 ? void 0 : e.type) === "required";
9380
+ }));
9381
+ var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
9382
+ className: "text-danger"
9383
+ }, " *") : null;
9384
+ return /*#__PURE__*/React__default.createElement("div", {
9385
+ ref: selectRef,
9386
+ className: "relative " + wrapClassName
9387
+ }, label ? /*#__PURE__*/React__default.createElement("div", {
9388
+ className: "mb-1 " + labelClassName
9389
+ }, label, " ", labelRequired) : null, /*#__PURE__*/React__default.createElement("div", {
9390
+ className: "flex flex-col gap-2 rounded-lg w-full bg-white " + (disabled ? "!bg-gray6" : "") + " border border-stroke " + className
9391
+ }, /*#__PURE__*/React__default.createElement("button", {
9392
+ className: " w-full h-10 bg-transparent flex justify-between items-center px-3 py-2 " + selectClassName,
9393
+ onClick: handleToggleSelect,
9394
+ disabled: disabled
9395
+ }, /*#__PURE__*/React__default.createElement("div", {
9396
+ className: "flex justify-between items-center w-full"
9397
+ }, isEmpty(value) || isMulti ? /*#__PURE__*/React__default.createElement("div", {
9398
+ className: "text-gray3 line-clamp-1"
9399
+ }, placeholder) : /*#__PURE__*/React__default.createElement("div", {
9400
+ className: "w-full text-start pointer-events-none line-clamp-1",
9401
+ dangerouslySetInnerHTML: {
9402
+ __html: value === null || value === void 0 ? void 0 : value.label
9403
+ }
9404
+ }), isButtonDelete && !isEmpty(value) ? /*#__PURE__*/React__default.createElement("div", {
9405
+ onClick: function onClick(e) {
9406
+ handleDeleteSelection(e, value);
9407
+ }
9408
+ }, /*#__PURE__*/React__default.createElement(RxCross2, null)) : /*#__PURE__*/React__default.createElement("div", {
9409
+ className: "ms-1"
9410
+ }, /*#__PURE__*/React__default.createElement(FaAngleUp, {
9411
+ className: "text-xs"
9412
+ }), /*#__PURE__*/React__default.createElement(FaAngleDown, {
9413
+ className: "text-xs"
9414
+ })))), isOpen ? /*#__PURE__*/React__default.createElement("div", {
9415
+ ref: dropdownRef,
9416
+ style: {
9417
+ background: "#FFFFFF"
9418
+ },
9419
+ className: "absolute p-1 my-2 rounded-2xl w-full z-40 border " + (dropdownPosition === 'top' ? 'bottom-full mb-2' : 'top-full mt-2') + " " + optionClassName
9420
+ }, /*#__PURE__*/React__default.createElement("div", null, isSearch ? /*#__PURE__*/React__default.createElement("div", {
9421
+ className: "px-3 flex items-center border-b-[1px]"
9422
+ }, /*#__PURE__*/React__default.createElement(LuSearch, {
9423
+ className: "inline text-gray3 me-2"
9424
+ }), /*#__PURE__*/React__default.createElement("input", {
9425
+ type: "text",
9426
+ ref: inputRef,
9427
+ className: "py-2 w-full border-0 focus:outline-none focus:ring-0",
9428
+ placeholder: "T\xECm ki\u1EBFm",
9429
+ value: inputSearch,
9430
+ onChange: function onChange(e) {
9431
+ setInputSearch(e.target.value);
9432
+ }
9433
+ })) : null, /*#__PURE__*/React__default.createElement("div", {
9434
+ className: "overflow-y-auto max-h-72 scroll-container",
9435
+ ref: optionRef
9436
+ }, (listOptions === null || listOptions === void 0 ? void 0 : listOptions.length) > 0 ? /*#__PURE__*/React__default.createElement("div", null, listOptions === null || listOptions === void 0 ? void 0 : listOptions.map(function (item, index) {
9437
+ return /*#__PURE__*/React__default.createElement("div", {
9438
+ key: "gjfd-" + index,
9439
+ className: "option px-2 cursor-default py-1.5 flex items-center hover:bg-gray-100 rounded-lg",
9440
+ onClick: function onClick(e) {
9441
+ handleSelection(item, e);
9152
9442
  }
9153
- )
9154
- }
9155
-
9156
- var api = init(defaultConverter, { path: '/' });
9157
- /* eslint-enable no-var */
9158
-
9159
- return api;
9160
-
9161
- }));
9443
+ }, /*#__PURE__*/React__default.createElement(IoMdCheckmark, {
9444
+ className: (checkSelection(item === null || item === void 0 ? void 0 : item.value) ? "" : 'invisible') + " inline me-2 w-4"
9445
+ }), renderItem ? renderItem(item) : /*#__PURE__*/React__default.createElement("div", {
9446
+ className: " whitespace-nowrap line-clamp-1"
9447
+ }, item === null || item === void 0 ? void 0 : item.label));
9448
+ }), loading ? /*#__PURE__*/React__default.createElement("div", {
9449
+ className: "flex justify-center py-4"
9450
+ }, /*#__PURE__*/React__default.createElement(Loading, null)) : null) : /*#__PURE__*/React__default.createElement("div", {
9451
+ className: "py-6 text-center"
9452
+ }, "Kh\xF4ng c\xF3 k\u1EBFt qu\u1EA3")))) : null), error ? /*#__PURE__*/React__default.createElement("div", {
9453
+ className: "text-danger"
9454
+ }, error) : null);
9162
9455
  });
9456
+ var SelectDynamic = memo(Select$2);
9163
9457
 
9164
9458
  var BookingForm = function BookingForm(props) {
9165
9459
  var _props$shopConfig = props.shopConfig,
@@ -9176,7 +9470,8 @@ var BookingForm = function BookingForm(props) {
9176
9470
  isModalBooking = _props$isModalBooking === void 0 ? false : _props$isModalBooking;
9177
9471
  var _useState = useState(false);
9178
9472
  var _useState2 = useState({
9179
- types: "1,10"
9473
+ types: "1,10",
9474
+ size: 16
9180
9475
  }),
9181
9476
  productsParams = _useState2[0],
9182
9477
  setProductsParams = _useState2[1];
@@ -9206,7 +9501,8 @@ var BookingForm = function BookingForm(props) {
9206
9501
  var _ProductController = ProductController(_extends({}, props, {
9207
9502
  params: productsParams
9208
9503
  })),
9209
- products = _ProductController.products;
9504
+ products = _ProductController.products,
9505
+ loading = _ProductController.loading;
9210
9506
  var _BookingController = BookingController(props),
9211
9507
  _BookingController$cr = _BookingController.createSchedule,
9212
9508
  createSchedule = _BookingController$cr === void 0 ? function () {} : _BookingController$cr;
@@ -9350,6 +9646,7 @@ var BookingForm = function BookingForm(props) {
9350
9646
  var handleSearchProducts = function handleSearchProducts(value) {
9351
9647
  setProductsParams(function (prev) {
9352
9648
  return _extends({}, prev, {
9649
+ size: 16,
9353
9650
  productName: value
9354
9651
  });
9355
9652
  });
@@ -9386,9 +9683,11 @@ var BookingForm = function BookingForm(props) {
9386
9683
  className: "grid grid-cols-1 gap-4"
9387
9684
  }, /*#__PURE__*/React__default.createElement("div", {
9388
9685
  className: "relative"
9389
- }, /*#__PURE__*/React__default.createElement(Select$1, {
9686
+ }, /*#__PURE__*/React__default.createElement(SelectDynamic, {
9687
+ setParams: setProductsParams,
9390
9688
  ref: inputSelectedRef,
9391
9689
  isMulti: true,
9690
+ loading: loading,
9392
9691
  defaultValue: listProductSelected,
9393
9692
  onClick: handleSelectedProduct,
9394
9693
  handleSearchOption: handleSearchProducts,
@@ -9502,6 +9801,7 @@ var BookingForm = function BookingForm(props) {
9502
9801
  className: "text-center"
9503
9802
  }, "Ch\xFAng t\xF4i \u0111\xE3 ghi nh\u1EADn th\xF4ng tin c\u1EE7a b\u1EA1n v\xE0 s\u1EBD li\xEAn h\u1EC7 l\u1EA1i ngay"))));
9504
9803
  };
9804
+ var BookingForm$1 = memo(BookingForm);
9505
9805
 
9506
9806
  var TreatmentsList7 = function TreatmentsList7(props) {
9507
9807
  var _props$shopConfigStyl = props.shopConfigStyle,
@@ -9622,7 +9922,7 @@ var TreatmentsList7 = function TreatmentsList7(props) {
9622
9922
  color: secondary
9623
9923
  }), isOpenModal ? /*#__PURE__*/React__default.createElement(ModalNotification, {
9624
9924
  onClose: handleCloseModal
9625
- }, /*#__PURE__*/React__default.createElement(BookingForm, {
9925
+ }, /*#__PURE__*/React__default.createElement(BookingForm$1, {
9626
9926
  className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh] !bg-bgSecondary",
9627
9927
  onCloseFormBooking: handleCloseModal,
9628
9928
  defaultValue: dataBooking,
@@ -9764,13 +10064,13 @@ var ServiceDetail1 = function ServiceDetail1(props) {
9764
10064
  product: product,
9765
10065
  className: "w-full aspect-square !object-contain rounded-2xl"
9766
10066
  })), /*#__PURE__*/React__default.createElement("div", {
9767
- className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
10067
+ className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
9768
10068
  }, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
9769
10069
  return /*#__PURE__*/React__default.createElement("img", {
9770
10070
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
9771
10071
  key: item === null || item === void 0 ? void 0 : item.imageId,
9772
10072
  alt: "",
9773
- className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " h-16 w-16 object-cover rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
10073
+ className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " \n h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full rounded-md lg:rounded-lg aspect-square object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
9774
10074
  onClick: function onClick() {
9775
10075
  handleDisplayImage(item);
9776
10076
  }
@@ -9817,7 +10117,7 @@ var ServiceDetail1 = function ServiceDetail1(props) {
9817
10117
  className: "text-gray3 mt-2"
9818
10118
  }, "Kh\xF4ng c\xF3 th\xF4ng tin"))), isBooking ? /*#__PURE__*/React__default.createElement(ModalNotification, {
9819
10119
  onClose: handleCloseModal
9820
- }, /*#__PURE__*/React__default.createElement(BookingForm, {
10120
+ }, /*#__PURE__*/React__default.createElement(BookingForm$1, {
9821
10121
  isModalBooking: isBooking,
9822
10122
  className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh]",
9823
10123
  onCloseFormBooking: handleCloseModal,
@@ -9891,7 +10191,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
9891
10191
  }, /*#__PURE__*/React__default.createElement("div", {
9892
10192
  className: "flex flex-col gap-4 col-span-2"
9893
10193
  }, /*#__PURE__*/React__default.createElement("div", {
9894
- className: "rounded-2xl p-2 bg-background border"
10194
+ className: "rounded-2xl bg-background border"
9895
10195
  }, displayImage ? /*#__PURE__*/React__default.createElement("img", {
9896
10196
  src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
9897
10197
  className: "w-full aspect-square object-contain rounded-2xl"
@@ -9899,13 +10199,13 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
9899
10199
  product: product,
9900
10200
  className: "w-full aspect-square !object-contain rounded-2xl"
9901
10201
  })), /*#__PURE__*/React__default.createElement("div", {
9902
- className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
10202
+ className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
9903
10203
  }, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
9904
10204
  return /*#__PURE__*/React__default.createElement("img", {
9905
10205
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
9906
10206
  key: item === null || item === void 0 ? void 0 : item.imageId,
9907
10207
  alt: "",
9908
- className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " h-16 w-16 object-cover rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
10208
+ className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " \n h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full rounded-md lg:rounded-lg aspect-square object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
9909
10209
  onClick: function onClick() {
9910
10210
  handleDisplayImage(item);
9911
10211
  }
@@ -9952,7 +10252,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
9952
10252
  className: "text-gray3 mt-2"
9953
10253
  }, "Kh\xF4ng c\xF3 th\xF4ng tin"))), isBooking ? /*#__PURE__*/React__default.createElement(ModalNotification, {
9954
10254
  onClose: handleCloseModal
9955
- }, /*#__PURE__*/React__default.createElement(BookingForm, {
10255
+ }, /*#__PURE__*/React__default.createElement(BookingForm$1, {
9956
10256
  isModalBooking: isBooking,
9957
10257
  className: "overflow-y-auto no-scrollbar w-[85vw] sm:w-[70vw] md:w-[60vw] lg:w-[50vw] max-h-[80vh]",
9958
10258
  onCloseFormBooking: handleCloseModal,
@@ -10027,7 +10327,7 @@ var ProductItem3 = function ProductItem3(props) {
10027
10327
  className: "w-full border border-stroke rounded-2xl " + className
10028
10328
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10029
10329
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10030
- className: "w-full h-48 md:h-60 xl:h-[304px] rounded-t-2xl"
10330
+ className: "w-full rounded-t-2xl"
10031
10331
  }), /*#__PURE__*/React__default.createElement("div", {
10032
10332
  className: "p-4 flex flex-col gap-2 md:gap-4 items-start"
10033
10333
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10054,7 +10354,7 @@ var ProductItem4 = function ProductItem4(props) {
10054
10354
  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
10055
10355
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10056
10356
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10057
- className: "w-full h-40 sm:h-56 lg:h-60 xl:h-64 bg-cover bg-no-repeat rounded-2xl"
10357
+ className: "w-full rounded-2xl"
10058
10358
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10059
10359
  className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis text-lg"
10060
10360
  }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10073,7 +10373,271 @@ var ProductItem4 = function ProductItem4(props) {
10073
10373
  }))));
10074
10374
  };
10075
10375
 
10076
- var ProductItem5 = function ProductItem5(props) {
10376
+ var ProductItem5 = function ProductItem5(props) {
10377
+ var _product$productInfo;
10378
+ var product = props.product,
10379
+ _props$Link = props.Link,
10380
+ Link = _props$Link === void 0 ? null : _props$Link,
10381
+ _props$shopConfigStyl = props.shopConfigStyle,
10382
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
10383
+ _props$className = props.className,
10384
+ className = _props$className === void 0 ? "" : _props$className;
10385
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
10386
+ Link: Link,
10387
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10388
+ }, /*#__PURE__*/React__default.createElement("div", {
10389
+ className: "w-full flex flex-col gap-4 rounded-2xl p-1 " + className
10390
+ }, /*#__PURE__*/React__default.createElement(ProductImage, {
10391
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10392
+ className: "w-full rounded-2xl"
10393
+ }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10394
+ className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis mb-2"
10395
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10396
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10397
+ className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10398
+ })), /*#__PURE__*/React__default.createElement("div", {
10399
+ className: "flex gap-2 md:gap-4 "
10400
+ }, /*#__PURE__*/React__default.createElement(AiOutlineShoppingCart, {
10401
+ className: "text-primary p-2.5 h-10 w-12 border border-primary rounded-lg hover:bg-primary hover:text-textButton " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass)
10402
+ }), /*#__PURE__*/React__default.createElement(Button, {
10403
+ label: "Mua ngay",
10404
+ className: "w-full",
10405
+ shopConfigStyle: shopConfigStyle
10406
+ }))));
10407
+ };
10408
+
10409
+ var ProductItem6 = function ProductItem6(props) {
10410
+ var _product$productInfo;
10411
+ var product = props.product,
10412
+ _props$shopConfigStyl = props.shopConfigStyle,
10413
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
10414
+ _props$Link = props.Link,
10415
+ Link = _props$Link === void 0 ? null : _props$Link,
10416
+ _props$className = props.className,
10417
+ className = _props$className === void 0 ? "" : _props$className;
10418
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
10419
+ Link: Link,
10420
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10421
+ }, /*#__PURE__*/React__default.createElement("div", {
10422
+ 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
10423
+ }, /*#__PURE__*/React__default.createElement(ProductImage, {
10424
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10425
+ className: "w-full !aspect-[3/4] rounded-2xl"
10426
+ }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10427
+ className: "text start line-clamp-1 w-full overflow-hidden text-ellipsis"
10428
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10429
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10430
+ className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10431
+ })), /*#__PURE__*/React__default.createElement("div", {
10432
+ className: "flex pt-4 gap-2 md:gap-4 border-t items-center"
10433
+ }, /*#__PURE__*/React__default.createElement("div", {
10434
+ className: "p-2 md:p-[10px] text-primary rounded-lg hover:bg-primary hover:text-textButton hover:opacity-80 border border-primary h-full w-auto flex items-center justify-center " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass) + " "
10435
+ }, /*#__PURE__*/React__default.createElement(FiShoppingCart, null)), /*#__PURE__*/React__default.createElement(Button, {
10436
+ label: "Mua ngay",
10437
+ className: "w-full",
10438
+ shopConfigStyle: shopConfigStyle
10439
+ }))));
10440
+ };
10441
+
10442
+ var ProductItem7 = function ProductItem7(props) {
10443
+ var _product$productInfo, _product$productInfo2, _product$productInfo3, _product$productInfo4, _product$productInfo5, _product$productInfo6, _product$productInfo7, _product$productInfo8, _product$productInfo9, _product$productInfo10, _product$productInfo11;
10444
+ var product = props.product,
10445
+ _props$Link = props.Link,
10446
+ Link = _props$Link === void 0 ? null : _props$Link,
10447
+ _props$className = props.className,
10448
+ className = _props$className === void 0 ? "" : _props$className;
10449
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
10450
+ Link: Link,
10451
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10452
+ }, /*#__PURE__*/React__default.createElement("div", {
10453
+ className: "w-full bg-bgSecondary relative p-2 md:p-4 rounded-2xl " + className
10454
+ }, /*#__PURE__*/React__default.createElement("div", {
10455
+ className: "relative"
10456
+ }, /*#__PURE__*/React__default.createElement("div", {
10457
+ className: "px-2 md:px-4 xl:px-6"
10458
+ }, /*#__PURE__*/React__default.createElement(ProductImage, {
10459
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10460
+ className: "w-full hover:scale-105 transition duration-300 ease-in-out rounded-2xl !object-contain"
10461
+ })), (product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.price) !== (product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.priceBeforeDiscount) && product !== null && product !== void 0 && (_product$productInfo3 = product.productInfo) !== null && _product$productInfo3 !== void 0 && _product$productInfo3.priceBeforeDiscount ? /*#__PURE__*/React__default.createElement("div", {
10462
+ className: "absolute top-4 left-0 py-1 px-4 rounded-r-2xl bg-danger text-textButton font-semibold shadow-lg"
10463
+ }, "-", Math.round(100 - (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.price) / (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.priceBeforeDiscount) * 100)) : null), /*#__PURE__*/React__default.createElement("div", {
10464
+ className: "flex flex-col mt-4 gap-4 items-start"
10465
+ }, /*#__PURE__*/React__default.createElement("div", {
10466
+ className: "line-clamp-2 min-h-12 w-full overflow-hidden text-ellipsis"
10467
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo6 = product.productInfo) === null || _product$productInfo6 === void 0 ? void 0 : _product$productInfo6.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10468
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10469
+ className: "text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10470
+ })), product !== null && product !== void 0 && product.isShowProductPriceOnLanding && product !== null && product !== void 0 && (_product$productInfo7 = product.productInfo) !== null && _product$productInfo7 !== void 0 && _product$productInfo7.priceBeforeDiscount && (product === null || product === void 0 ? void 0 : (_product$productInfo8 = product.productInfo) === null || _product$productInfo8 === void 0 ? void 0 : _product$productInfo8.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo9 = product.productInfo) === null || _product$productInfo9 === void 0 ? void 0 : _product$productInfo9.price) ? /*#__PURE__*/React__default.createElement("div", {
10471
+ className: "absolute top-5 left-0 font-semibold px-3 py-1 bg-danger text-textButton rounded-r-2xl shadow-lg v-max"
10472
+ }, 1 - 100 * (product === null || product === void 0 ? void 0 : (_product$productInfo10 = product.productInfo) === null || _product$productInfo10 === void 0 ? void 0 : _product$productInfo10.price) / (product === null || product === void 0 ? void 0 : (_product$productInfo11 = product.productInfo) === null || _product$productInfo11 === void 0 ? void 0 : _product$productInfo11.priceBeforeDiscount)) : null));
10473
+ };
10474
+
10475
+ var ProductItem8 = function ProductItem8(props) {
10476
+ var _product$productInfo;
10477
+ var product = props.product,
10478
+ _props$Link = props.Link,
10479
+ Link = _props$Link === void 0 ? null : _props$Link,
10480
+ _props$className = props.className,
10481
+ className = _props$className === void 0 ? "" : _props$className,
10482
+ _props$shopConfigStyl = props.shopConfigStyle,
10483
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
10484
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
10485
+ Link: Link,
10486
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10487
+ }, /*#__PURE__*/React__default.createElement("div", {
10488
+ className: "text-center rounded relative group " + className
10489
+ }, /*#__PURE__*/React__default.createElement("div", {
10490
+ className: "relative "
10491
+ }, /*#__PURE__*/React__default.createElement(ProductImage, {
10492
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10493
+ className: "!aspect-[5/8] rounded"
10494
+ }), /*#__PURE__*/React__default.createElement("div", {
10495
+ className: "absolute bottom-0 rounded-b pb-6 px-4 bg-gradient-to-t from-black/50 to-transparent flex flex-col items-center h-1/2 gap-2 w-full justify-end "
10496
+ }, /*#__PURE__*/React__default.createElement("div", {
10497
+ className: "text-lg text-textButton"
10498
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10499
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10500
+ className: !(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "",
10501
+ priceClassName: "text-textButton !font-normal",
10502
+ priceBeforeDiscountClassName: "text-textButton !font-normal"
10503
+ }), /*#__PURE__*/React__default.createElement(Button, {
10504
+ label: "Th\xEAm v\xE0o gi\u1ECF",
10505
+ shopConfigStyle: shopConfigStyle,
10506
+ className: "hidden group-hover:block transition-all duration-300 !font-normal"
10507
+ })))));
10508
+ };
10509
+
10510
+ var ProductItem9 = function ProductItem9(props) {
10511
+ var _product$productInfo;
10512
+ var product = props.product,
10513
+ _props$Link = props.Link,
10514
+ Link = _props$Link === void 0 ? null : _props$Link,
10515
+ _props$shopConfigStyl = props.shopConfigStyle,
10516
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
10517
+ _props$className = props.className,
10518
+ className = _props$className === void 0 ? "" : _props$className;
10519
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
10520
+ Link: Link,
10521
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10522
+ }, /*#__PURE__*/React__default.createElement("div", {
10523
+ className: "w-full flex flex-col gap-4 rounded-2xl p-2 md:p-6 bg-bgSecondary " + className
10524
+ }, /*#__PURE__*/React__default.createElement(ProductImage, {
10525
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10526
+ className: "hover:scale-105 transition duration-300 ease-in-out !object-contain !aspect-[9/8]"
10527
+ }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10528
+ className: "text-start line-clamp-2 font-medium min-h-12 w-full overflow-hidden text-ellipsis mb-2"
10529
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10530
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10531
+ priceClassName: "!text-secondary !text-base !font-normal",
10532
+ className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10533
+ })), /*#__PURE__*/React__default.createElement("div", {
10534
+ className: "flex gap-2 md:gap-4 "
10535
+ }, /*#__PURE__*/React__default.createElement(AiOutlineShoppingCart, {
10536
+ className: "text-primary p-2.5 h-10 w-12 border border-primary rounded-lg hover:bg-primary hover:text-textButton " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass)
10537
+ }), /*#__PURE__*/React__default.createElement(Button, {
10538
+ label: "Mua ngay",
10539
+ className: "w-full",
10540
+ shopConfigStyle: shopConfigStyle
10541
+ }))));
10542
+ };
10543
+
10544
+ var ProductItem10 = function ProductItem10(props) {
10545
+ var _product$productInfo;
10546
+ var product = props.product;
10547
+ return /*#__PURE__*/React__default.createElement("div", {
10548
+ className: "flex border-b border-stroke items-center py-4"
10549
+ }, /*#__PURE__*/React__default.createElement("div", {
10550
+ className: "mb-auto"
10551
+ }, /*#__PURE__*/React__default.createElement(ProductImage, {
10552
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10553
+ className: "!w-24 rounded-lg"
10554
+ })), /*#__PURE__*/React__default.createElement("div", {
10555
+ className: "ml-4 flex-1"
10556
+ }, /*#__PURE__*/React__default.createElement("div", {
10557
+ className: "text-xl"
10558
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), product !== null && product !== void 0 && product.isShowProductPriceOnLanding ? /*#__PURE__*/React__default.createElement("div", {
10559
+ className: "mt-2"
10560
+ }, /*#__PURE__*/React__default.createElement(ProductPrice, {
10561
+ product: product === null || product === void 0 ? void 0 : product.productInfo,
10562
+ priceClassName: "!font-normal text-lg"
10563
+ })) : null));
10564
+ };
10565
+
10566
+ function getMinMax$1(array, field) {
10567
+ if (!(array !== null && array !== void 0 && array.length) || !array[0].hasOwnProperty(field)) {
10568
+ return null;
10569
+ }
10570
+ var _array$reduce = array.reduce(function (acc, obj) {
10571
+ var value = obj[field];
10572
+ return {
10573
+ min: value < acc.min ? value : acc.min,
10574
+ max: value > acc.max ? value : acc.max
10575
+ };
10576
+ }, {
10577
+ min: array[0][field],
10578
+ max: array[0][field]
10579
+ }),
10580
+ min = _array$reduce.min,
10581
+ max = _array$reduce.max;
10582
+ return {
10583
+ min: min,
10584
+ max: max
10585
+ };
10586
+ }
10587
+ var ProductPrice2 = function ProductPrice2(props) {
10588
+ var product = props.product,
10589
+ variant = props.variant,
10590
+ _props$className = props.className,
10591
+ className = _props$className === void 0 ? "" : _props$className,
10592
+ _props$style = props.style,
10593
+ style = _props$style === void 0 ? {} : _props$style,
10594
+ _props$priceClassName = props.priceClassName,
10595
+ priceClassName = _props$priceClassName === void 0 ? "" : _props$priceClassName,
10596
+ _props$priceBeforeDis = props.priceBeforeDiscountClassName,
10597
+ priceBeforeDiscountClassName = _props$priceBeforeDis === void 0 ? "" : _props$priceBeforeDis;
10598
+ var _useState = useState(),
10599
+ displayPrice = _useState[0],
10600
+ setDisplayPrice = _useState[1];
10601
+ var _useState2 = useState(),
10602
+ displayPriceBeforeDiscount = _useState2[0],
10603
+ setDisplayPriceBeforeDiscount = _useState2[1];
10604
+ useEffect(function () {
10605
+ if (variant) {
10606
+ genProductPrice([variant]);
10607
+ } else if (product) {
10608
+ genProductPrice(product.variants);
10609
+ }
10610
+ }, [product, variant]);
10611
+ var genProductPrice = function genProductPrice(variants) {
10612
+ var mPrice = getMinMax$1(variants, 'price');
10613
+ var mPriceBeforeDiscount = getMinMax$1(variants, 'priceBeforeDiscount');
10614
+ if (mPrice && mPriceBeforeDiscount) {
10615
+ var _displayPriceBeforeDiscount = formatCurrency2(mPriceBeforeDiscount.min);
10616
+ var _displayPrice = formatCurrency2(mPrice.min);
10617
+ if (mPrice.min !== mPrice.max) {
10618
+ _displayPrice += " - " + formatCurrency2(mPrice.max);
10619
+ }
10620
+ if (mPriceBeforeDiscount.min !== mPriceBeforeDiscount.max) {
10621
+ _displayPriceBeforeDiscount += " - " + formatCurrency2(mPriceBeforeDiscount.max);
10622
+ }
10623
+ setDisplayPrice(_displayPrice);
10624
+ setDisplayPriceBeforeDiscount(_displayPriceBeforeDiscount);
10625
+ } else {
10626
+ var _displayPrice2 = formatCurrency2(product === null || product === void 0 ? void 0 : product.price);
10627
+ setDisplayPrice(_displayPrice2);
10628
+ }
10629
+ };
10630
+ return /*#__PURE__*/React__default.createElement("div", {
10631
+ className: "flex gap-4 flex-wrap " + className
10632
+ }, /*#__PURE__*/React__default.createElement("span", {
10633
+ className: "text-primary font-semibold " + priceClassName,
10634
+ style: style
10635
+ }, displayPrice), displayPriceBeforeDiscount !== displayPrice && displayPriceBeforeDiscount != null ? /*#__PURE__*/React__default.createElement("span", {
10636
+ className: "text-gray3 line-through " + priceBeforeDiscountClassName + " "
10637
+ }, displayPriceBeforeDiscount) : null);
10638
+ };
10639
+
10640
+ var ProductItem11 = function ProductItem11(props) {
10077
10641
  var _product$productInfo;
10078
10642
  var product = props.product,
10079
10643
  _props$Link = props.Link,
@@ -10086,14 +10650,19 @@ var ProductItem5 = function ProductItem5(props) {
10086
10650
  Link: Link,
10087
10651
  href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10088
10652
  }, /*#__PURE__*/React__default.createElement("div", {
10089
- className: "w-full flex flex-col gap-4 rounded-2xl p-1 " + className
10653
+ className: "w-full bg-bgSecondary " + className
10654
+ }, /*#__PURE__*/React__default.createElement("div", {
10655
+ className: "overflow-hidden"
10090
10656
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10091
10657
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10092
- className: "w-full w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
10093
- }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10658
+ className: "hover:scale-105 transition duration-300 ease-in-out"
10659
+ })), /*#__PURE__*/React__default.createElement("div", {
10660
+ className: "p-4 flex flex-col gap-4"
10661
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10094
10662
  className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis mb-2"
10095
- }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10663
+ }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice2, {
10096
10664
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10665
+ priceClassName: "!font-normal",
10097
10666
  className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10098
10667
  })), /*#__PURE__*/React__default.createElement("div", {
10099
10668
  className: "flex gap-2 md:gap-4 "
@@ -10103,108 +10672,11 @@ var ProductItem5 = function ProductItem5(props) {
10103
10672
  label: "Mua ngay",
10104
10673
  className: "w-full",
10105
10674
  shopConfigStyle: shopConfigStyle
10106
- }))));
10107
- };
10108
-
10109
- var ProductItem6 = function ProductItem6(props) {
10110
- var _product$productInfo;
10111
- var product = props.product,
10112
- _props$shopConfigStyl = props.shopConfigStyle,
10113
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
10114
- _props$Link = props.Link,
10115
- Link = _props$Link === void 0 ? null : _props$Link,
10116
- _props$className = props.className,
10117
- className = _props$className === void 0 ? "" : _props$className;
10118
- return /*#__PURE__*/React__default.createElement(LinkToPage, {
10119
- Link: Link,
10120
- href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10121
- }, /*#__PURE__*/React__default.createElement("div", {
10122
- 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
10123
- }, /*#__PURE__*/React__default.createElement(ProductImage, {
10124
- product: product === null || product === void 0 ? void 0 : product.productInfo,
10125
- className: "w-full h-48 md:h-60 xl:h-72 rounded-2xl"
10126
- }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10127
- className: "text start line-clamp-1 w-full overflow-hidden text-ellipsis"
10128
- }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10129
- product: product === null || product === void 0 ? void 0 : product.productInfo,
10130
- className: "text-lg text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "")
10131
- })), /*#__PURE__*/React__default.createElement("div", {
10132
- className: "flex pt-4 gap-2 md:gap-4 border-t items-center"
10133
- }, /*#__PURE__*/React__default.createElement("div", {
10134
- className: "p-2 md:p-[10px] text-primary rounded-lg hover:bg-primary hover:text-textButton hover:opacity-80 border border-primary h-full w-auto flex items-center justify-center " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass) + " "
10135
- }, /*#__PURE__*/React__default.createElement(FiShoppingCart, null)), /*#__PURE__*/React__default.createElement(Button, {
10136
- label: "Mua ngay",
10137
- className: "w-full",
10138
- shopConfigStyle: shopConfigStyle
10139
- }))));
10140
- };
10141
-
10142
- var ProductItem7 = function ProductItem7(props) {
10143
- var _product$productInfo, _product$productInfo2, _product$productInfo3, _product$productInfo4, _product$productInfo5, _product$productInfo6;
10144
- var product = props.product,
10145
- _props$Link = props.Link,
10146
- Link = _props$Link === void 0 ? null : _props$Link,
10147
- _props$className = props.className,
10148
- className = _props$className === void 0 ? "" : _props$className,
10149
- _props$classNamePrice = props.classNamePrice,
10150
- classNamePrice = _props$classNamePrice === void 0 ? "text-lg" : _props$classNamePrice;
10151
- return /*#__PURE__*/React__default.createElement(LinkToPage, {
10152
- Link: Link,
10153
- href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10154
- }, /*#__PURE__*/React__default.createElement("div", {
10155
- className: "w-full bg-bgSecondary relative rounded-2xl " + className
10156
- }, /*#__PURE__*/React__default.createElement(ProductImage, {
10157
- product: product === null || product === void 0 ? void 0 : product.productInfo,
10158
- className: "w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-t-2xl"
10159
- }), /*#__PURE__*/React__default.createElement("div", {
10160
- className: "p-3 sm:p-4 flex flex-col gap-4 items-start"
10161
- }, /*#__PURE__*/React__default.createElement("div", {
10162
- className: "line-clamp-1 w-full overflow-hidden text-ellipsis"
10163
- }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10164
- product: product === null || product === void 0 ? void 0 : product.productInfo,
10165
- className: "text-start " + (!(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "") + " " + classNamePrice
10166
- })), product !== null && product !== void 0 && product.isShowProductPriceOnLanding && product !== null && product !== void 0 && (_product$productInfo2 = product.productInfo) !== null && _product$productInfo2 !== void 0 && _product$productInfo2.priceBeforeDiscount && (product === null || product === void 0 ? void 0 : (_product$productInfo3 = product.productInfo) === null || _product$productInfo3 === void 0 ? void 0 : _product$productInfo3.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.price) ? /*#__PURE__*/React__default.createElement("div", {
10167
- className: "absolute top-5 left-0 font-semibold px-3 py-1 bg-danger text-textButton rounded-r-2xl shadow-lg v-max"
10168
- }, 1 - 100 * (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.price) / (product === null || product === void 0 ? void 0 : (_product$productInfo6 = product.productInfo) === null || _product$productInfo6 === void 0 ? void 0 : _product$productInfo6.priceBeforeDiscount)) : null));
10169
- };
10170
-
10171
- var ProductItem8 = function ProductItem8(props) {
10172
- var _product$productInfo;
10173
- var product = props.product,
10174
- _props$Link = props.Link,
10175
- Link = _props$Link === void 0 ? null : _props$Link,
10176
- _props$className = props.className,
10177
- className = _props$className === void 0 ? "" : _props$className,
10178
- _props$shopConfigStyl = props.shopConfigStyle,
10179
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
10180
- return /*#__PURE__*/React__default.createElement(LinkToPage, {
10181
- Link: Link,
10182
- href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10183
- }, /*#__PURE__*/React__default.createElement("div", {
10184
- className: "text-center rounded relative group " + className
10185
- }, /*#__PURE__*/React__default.createElement("div", {
10186
- className: "relative "
10187
- }, /*#__PURE__*/React__default.createElement(ProductImage, {
10188
- product: product === null || product === void 0 ? void 0 : product.productInfo,
10189
- className: "min-h-[360px] md:min-h-[400px] xl:min-h-[440px] !object-cover !rounded"
10190
- }), /*#__PURE__*/React__default.createElement("div", {
10191
- className: "absolute bottom-0 rounded-b pb-6 px-4 bg-gradient-to-t from-black/50 to-transparent flex flex-col items-center h-1/2 gap-2 w-full justify-end "
10192
- }, /*#__PURE__*/React__default.createElement("div", {
10193
- className: "text-lg text-textButton"
10194
- }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
10195
- product: product === null || product === void 0 ? void 0 : product.productInfo,
10196
- className: !(product !== null && product !== void 0 && product.isShowProductPriceOnLanding) ? "invisible" : "",
10197
- priceClassName: "text-textButton !font-normal",
10198
- priceBeforeDiscountClassName: "text-textButton !font-normal"
10199
- }), /*#__PURE__*/React__default.createElement(Button, {
10200
- label: "Th\xEAm v\xE0o gi\u1ECF",
10201
- shopConfigStyle: shopConfigStyle,
10202
- className: "hidden group-hover:block transition-all duration-300 !font-normal"
10203
10675
  })))));
10204
10676
  };
10205
10677
 
10206
10678
  var TreatmentItem1 = function TreatmentItem1(props) {
10207
- var _product$productInfo;
10679
+ var _product$productInfo, _product$productInfo2;
10208
10680
  var product = props.product,
10209
10681
  _props$Link = props.Link,
10210
10682
  Link = _props$Link === void 0 ? null : _props$Link,
@@ -10217,7 +10689,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
10217
10689
  className: "w-full flex flex-col gap-4 rounded-2xl p-1"
10218
10690
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10219
10691
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10220
- className: "w-full w-full h-[189px] md:h-[238px] xl:h-[304px] rounded-2xl"
10692
+ className: " rounded-2xl"
10221
10693
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10222
10694
  className: "line-clamp-1 mb-2 font-medium text-lg"
10223
10695
  }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10227,7 +10699,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
10227
10699
  className: "flex flex-col md:flex-row gap-2 md:items-center md:gap-6 "
10228
10700
  }, /*#__PURE__*/React__default.createElement("div", {
10229
10701
  className: "whitespace-nowrap"
10230
- }, "Th\u1EDDi gian: 120p"), /*#__PURE__*/React__default.createElement(Button, {
10702
+ }, "Th\u1EDDi gian: ", getDurationValue(product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.attributes)), /*#__PURE__*/React__default.createElement(Button, {
10231
10703
  shopConfigStyle: shopConfigStyle,
10232
10704
  label: "\u0110\u1EB7t l\u1ECBch",
10233
10705
  className: "w-full"
@@ -10306,7 +10778,14 @@ var Products2 = function Products2(props) {
10306
10778
  var _useState2 = useState(false),
10307
10779
  canGoNext = _useState2[0],
10308
10780
  setCanGoNext = _useState2[1];
10309
- var _ProductController = ProductController(props),
10781
+ var _useState3 = useState({
10782
+ size: 16,
10783
+ isSale: true
10784
+ }),
10785
+ params = _useState3[0];
10786
+ var _ProductController = ProductController(_extends({}, props, {
10787
+ params: params
10788
+ })),
10310
10789
  _ProductController$pr = _ProductController.products,
10311
10790
  products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
10312
10791
  _ProductController$lo = _ProductController.loading,
@@ -10328,13 +10807,13 @@ var Products2 = function Products2(props) {
10328
10807
  breakpoint: 1024,
10329
10808
  settings: {
10330
10809
  slidesToShow: 4,
10331
- slidesToScroll: 4
10810
+ slidesToScroll: 1
10332
10811
  }
10333
10812
  }, {
10334
10813
  breakpoint: 1023,
10335
10814
  settings: {
10336
10815
  slidesToShow: 3,
10337
- slidesToScroll: 3
10816
+ slidesToScroll: 1
10338
10817
  }
10339
10818
  }, {
10340
10819
  breakpoint: 635,
@@ -10342,6 +10821,12 @@ var Products2 = function Products2(props) {
10342
10821
  slidesToShow: 2,
10343
10822
  slidesToScroll: 2
10344
10823
  }
10824
+ }, {
10825
+ breakpoint: 370,
10826
+ settings: {
10827
+ slidesToShow: 1,
10828
+ slidesToScroll: 1
10829
+ }
10345
10830
  }]
10346
10831
  };
10347
10832
  useEffect(function () {
@@ -10375,12 +10860,12 @@ var Products2 = function Products2(props) {
10375
10860
  color: textBody
10376
10861
  }
10377
10862
  }, /*#__PURE__*/React__default.createElement("div", {
10378
- className: "relative rounded-3xl w-full py-10 md:px-10 sm:px-6 px-4",
10863
+ className: "relative rounded-3xl w-full py-6 md:py-10 md:px-6 px-3 xl:px-10",
10379
10864
  style: {
10380
10865
  background: secondary
10381
10866
  }
10382
10867
  }, /*#__PURE__*/React__default.createElement("h2", {
10383
- className: "font-semibold text-2xl md:text-4xl lg:text-4xl ps-5 pb-4",
10868
+ className: "font-semibold text-2xl md:text-4xl lg:text-4xl ps-5 pb-6",
10384
10869
  style: {
10385
10870
  color: textButton
10386
10871
  }
@@ -10394,16 +10879,15 @@ var Products2 = function Products2(props) {
10394
10879
  beforeChange: handleBeforeChange
10395
10880
  }), products === null || products === void 0 ? void 0 : products.map(function (product, index) {
10396
10881
  return /*#__PURE__*/React__default.createElement("div", {
10397
- className: "px-2 lg:px-3",
10882
+ className: "px-1 md:px-2 lg:px-3",
10398
10883
  key: "dfg-" + index
10399
10884
  }, /*#__PURE__*/React__default.createElement(ProductItem, {
10400
10885
  product: product,
10401
10886
  Link: Link,
10402
- shopConfigStyle: shopConfigStyle,
10403
- classNamePrice: "text-base md:text-lg"
10887
+ shopConfigStyle: shopConfigStyle
10404
10888
  }));
10405
10889
  })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null)), /*#__PURE__*/React__default.createElement("div", {
10406
- className: "absolute left-0 top-1/2 w-full flex justify-between px-2 md:px-4 lg:px-6"
10890
+ className: "absolute left-0 top-[45%] w-full flex justify-between px-2 md:px-4 lg:px-6"
10407
10891
  }, /*#__PURE__*/React__default.createElement("button", {
10408
10892
  onClick: goToPrev,
10409
10893
  className: (canGoPrev ? "bg-primary" : "bg-gray5 cursor-not-allowed") + " p-2 rounded-full"
@@ -10448,7 +10932,7 @@ var Pagination = function Pagination(_ref) {
10448
10932
  for (var i = start; i <= end; i++) {
10449
10933
  pages.push(i);
10450
10934
  }
10451
- if (current_page < total_pages - 2) pages.push("...");
10935
+ if (current_page < total_pages - 3) pages.push("...");
10452
10936
  pages.push(total_pages);
10453
10937
  return pages;
10454
10938
  };
@@ -10468,7 +10952,7 @@ var Pagination = function Pagination(_ref) {
10468
10952
  onClick: function onClick() {
10469
10953
  return typeof page === "number" && handlePageChange(page - 1);
10470
10954
  },
10471
- 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" : ""),
10955
+ className: "px-2 md: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" : ""),
10472
10956
  disabled: page === "..."
10473
10957
  }, page);
10474
10958
  })), /*#__PURE__*/React__default.createElement(IoChevronForwardOutline, {
@@ -10520,111 +11004,284 @@ var Products3 = function Products3(props) {
10520
11004
  categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId
10521
11005
  }));
10522
11006
  }
10523
- }, [categorySelected]);
10524
- var onSelectCategory = function onSelectCategory(category) {
10525
- setCategorySelected(category);
11007
+ }, [categorySelected]);
11008
+ var onSelectCategory = function onSelectCategory(category) {
11009
+ setCategorySelected(category);
11010
+ };
11011
+ var onPageChange = function onPageChange(pageNum) {
11012
+ setProductParams(_extends({}, productParams, {
11013
+ page: pageNum
11014
+ }));
11015
+ };
11016
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
11017
+ className: "" + SECTION_DEFAULT_CLASS
11018
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
11019
+ data: data,
11020
+ shopConfigStyle: shopConfigStyle
11021
+ }), /*#__PURE__*/React__default.createElement("div", {
11022
+ className: "grid grid-cols-1 md:grid-cols-4 gap-12"
11023
+ }, /*#__PURE__*/React__default.createElement("div", {
11024
+ className: "hidden md:block"
11025
+ }, /*#__PURE__*/React__default.createElement("div", {
11026
+ className: "text-xl"
11027
+ }, "Danh m\u1EE5c s\u1EA3n ph\u1EA9m"), /*#__PURE__*/React__default.createElement("div", {
11028
+ className: "overflow-y-auto max-h-96 scroll-container pr-3"
11029
+ }, /*#__PURE__*/React__default.createElement("div", {
11030
+ 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"),
11031
+ onClick: function onClick() {
11032
+ return onSelectCategory({
11033
+ categoryId: undefined
11034
+ });
11035
+ }
11036
+ }, /*#__PURE__*/React__default.createElement(IoIosHeartEmpty, {
11037
+ size: 24
11038
+ }), /*#__PURE__*/React__default.createElement("div", null, "T\u1EA5t c\u1EA3")), categories === null || categories === void 0 ? void 0 : categories.map(function (category, index) {
11039
+ return /*#__PURE__*/React__default.createElement("div", {
11040
+ 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"),
11041
+ key: index,
11042
+ onClick: function onClick() {
11043
+ return onSelectCategory(category);
11044
+ }
11045
+ }, /*#__PURE__*/React__default.createElement(IoIosHeartEmpty, {
11046
+ size: 24
11047
+ }), /*#__PURE__*/React__default.createElement("div", null, category === null || category === void 0 ? void 0 : category.cateName));
11048
+ }))), /*#__PURE__*/React__default.createElement("div", {
11049
+ className: "md:hidden"
11050
+ }), /*#__PURE__*/React__default.createElement("div", {
11051
+ className: "col-span-3 text-center"
11052
+ }, loading ? /*#__PURE__*/React__default.createElement("div", {
11053
+ className: "flex w-full justify-center items-center p-12 h-[700px]"
11054
+ }, /*#__PURE__*/React__default.createElement(Loading, {
11055
+ size: 32
11056
+ })) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
11057
+ className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-12 mt-12"
11058
+ }, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
11059
+ return /*#__PURE__*/React__default.createElement(ProductItem, {
11060
+ Link: Link,
11061
+ key: index,
11062
+ shopConfigStyle: shopConfigStyle,
11063
+ product: product
11064
+ });
11065
+ })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), (page === null || page === void 0 ? void 0 : page.total_pages) > 1 ? /*#__PURE__*/React__default.createElement(Pagination, _extends({
11066
+ className: "mt-12"
11067
+ }, page, {
11068
+ onPageChange: onPageChange
11069
+ })) : null))), /*#__PURE__*/React__default.createElement(Dash, {
11070
+ color: secondary
11071
+ }));
11072
+ };
11073
+
11074
+ var CarouselItem = function CarouselItem(props) {
11075
+ var _Object$keys;
11076
+ var _props$data = props.data,
11077
+ data = _props$data === void 0 ? [] : _props$data,
11078
+ _props$className = props.className,
11079
+ className = _props$className === void 0 ? "" : _props$className,
11080
+ _props$style = props.style,
11081
+ style = _props$style === void 0 ? {} : _props$style,
11082
+ _props$onClick = props.onClick,
11083
+ onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
11084
+ _props$isAll = props.isAll,
11085
+ isAll = _props$isAll === void 0 ? true : _props$isAll,
11086
+ _props$isNavigateButt = props.isNavigateButton,
11087
+ isNavigateButton = _props$isNavigateButt === void 0 ? true : _props$isNavigateButt,
11088
+ _props$itemClassName = props.itemClassName,
11089
+ itemClassName = _props$itemClassName === void 0 ? "" : _props$itemClassName;
11090
+ var listRef = useRef(null);
11091
+ var _useState = useState(false),
11092
+ canScrollLeft = _useState[0],
11093
+ setCanScrollLeft = _useState[1];
11094
+ var _useState2 = useState(false),
11095
+ canScrollRight = _useState2[0],
11096
+ setCanScrollRight = _useState2[1];
11097
+ var _useState3 = useState({}),
11098
+ value = _useState3[0],
11099
+ setValue = _useState3[1];
11100
+ useEffect(function () {
11101
+ var _listRef$current;
11102
+ checkScroll();
11103
+ (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.addEventListener("scroll", checkScroll);
11104
+ return function () {
11105
+ var _listRef$current2;
11106
+ return (_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.removeEventListener("scroll", checkScroll);
11107
+ };
11108
+ }, [data]);
11109
+ var checkScroll = function checkScroll() {
11110
+ if (listRef.current) {
11111
+ var _listRef$current3 = listRef.current,
11112
+ scrollLeft = _listRef$current3.scrollLeft,
11113
+ scrollWidth = _listRef$current3.scrollWidth,
11114
+ clientWidth = _listRef$current3.clientWidth;
11115
+ setCanScrollLeft(scrollLeft > 0);
11116
+ setCanScrollRight(scrollLeft + clientWidth < scrollWidth - 1);
11117
+ }
11118
+ };
11119
+ var handleClickPrevImg = function handleClickPrevImg() {
11120
+ if (listRef.current) {
11121
+ checkScroll();
11122
+ listRef.current.scrollBy({
11123
+ left: -300,
11124
+ behavior: "smooth"
11125
+ });
11126
+ }
10526
11127
  };
10527
- var onPageChange = function onPageChange(pageNum) {
10528
- setProductParams(_extends({}, productParams, {
10529
- page: pageNum
10530
- }));
11128
+ var handleClickNextImg = function handleClickNextImg() {
11129
+ if (listRef.current) {
11130
+ checkScroll();
11131
+ listRef.current.scrollBy({
11132
+ left: 300,
11133
+ behavior: "smooth"
11134
+ });
11135
+ }
10531
11136
  };
10532
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
10533
- className: "" + SECTION_DEFAULT_CLASS
10534
- }, /*#__PURE__*/React__default.createElement(SectionTitle, {
10535
- data: data,
10536
- shopConfigStyle: shopConfigStyle
10537
- }), /*#__PURE__*/React__default.createElement("div", {
10538
- className: "grid grid-cols-1 md:grid-cols-4 gap-12"
10539
- }, /*#__PURE__*/React__default.createElement("div", {
10540
- className: "hidden md:block"
11137
+ var handleOnClick = function handleOnClick(item) {
11138
+ setValue(item);
11139
+ onClick === null || onClick === void 0 ? void 0 : onClick(item);
11140
+ };
11141
+ return /*#__PURE__*/React__default.createElement("div", {
11142
+ className: "h-10 md:h-12 flex justify-between items-center " + className,
11143
+ style: style
10541
11144
  }, /*#__PURE__*/React__default.createElement("div", {
10542
- className: "text-xl"
10543
- }, "Danh m\u1EE5c s\u1EA3n ph\u1EA9m"), /*#__PURE__*/React__default.createElement("div", {
10544
- className: "overflow-y-auto max-h-96 scroll-container pr-3"
11145
+ className: "w-full overflow-hidden "
10545
11146
  }, /*#__PURE__*/React__default.createElement("div", {
10546
- 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"),
11147
+ className: "flex overflow-x-auto gap-2 " + (isNavigateButton ? "no-scrollbar" : "scroll-custom pb-2") + " items-center",
11148
+ ref: listRef
11149
+ }, isAll ? /*#__PURE__*/React__default.createElement("div", {
11150
+ className: " " + ((Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(value)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0 ? "bg-primary text-textButton" : "bg-background") + " text-primary w-max border border-primary p-1 md:p-2 rounded-lg cursor-pointer whitespace-nowrap",
10547
11151
  onClick: function onClick() {
10548
- return onSelectCategory({
10549
- categoryId: undefined
10550
- });
11152
+ handleOnClick({});
10551
11153
  }
10552
- }, /*#__PURE__*/React__default.createElement(IoIosHeartEmpty, {
10553
- size: 24
10554
- }), /*#__PURE__*/React__default.createElement("div", null, "T\u1EA5t c\u1EA3")), categories === null || categories === void 0 ? void 0 : categories.map(function (category, index) {
11154
+ }, "T\u1EA5t c\u1EA3") : null, data && (data === null || data === void 0 ? void 0 : data.length) > 0 && (data === null || data === void 0 ? void 0 : data.map(function (item, index) {
10555
11155
  return /*#__PURE__*/React__default.createElement("div", {
10556
- 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"),
10557
- key: index,
11156
+ className: ((value === null || value === void 0 ? void 0 : value.value) === (item === null || item === void 0 ? void 0 : item.value) ? "bg-primary text-textButton" : "bg-background") + " w-max border text-primary border-primary py-1 px-2 md:py-2 md:px-3 rounded-lg cursor-pointer whitespace-nowrap " + itemClassName,
11157
+ key: "carousel-" + index,
10558
11158
  onClick: function onClick() {
10559
- return onSelectCategory(category);
11159
+ handleOnClick(item);
10560
11160
  }
10561
- }, /*#__PURE__*/React__default.createElement(IoIosHeartEmpty, {
10562
- size: 24
10563
- }), /*#__PURE__*/React__default.createElement("div", null, category === null || category === void 0 ? void 0 : category.cateName));
10564
- }))), /*#__PURE__*/React__default.createElement("div", {
10565
- className: "md:hidden"
10566
- }), /*#__PURE__*/React__default.createElement("div", {
10567
- className: "col-span-3 text-center"
10568
- }, loading ? /*#__PURE__*/React__default.createElement("div", {
10569
- className: "flex w-full justify-center items-center p-12 h-[700px]"
10570
- }, /*#__PURE__*/React__default.createElement(Loading, {
10571
- size: 32
10572
- })) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
10573
- className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-12 mt-12"
10574
- }, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
10575
- return /*#__PURE__*/React__default.createElement(ProductItem, {
10576
- Link: Link,
10577
- key: index,
10578
- shopConfigStyle: shopConfigStyle,
10579
- product: product
10580
- });
10581
- })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), (page === null || page === void 0 ? void 0 : page.total_pages) > 1 ? /*#__PURE__*/React__default.createElement(Pagination, _extends({
10582
- className: "mt-12"
10583
- }, page, {
10584
- onPageChange: onPageChange
10585
- })) : null))), /*#__PURE__*/React__default.createElement(Dash, {
10586
- color: secondary
10587
- }));
11161
+ }, item === null || item === void 0 ? void 0 : item.label);
11162
+ })))), isNavigateButton ? /*#__PURE__*/React__default.createElement("div", {
11163
+ className: "hidden my-auto gap-4 md:flex justify-end ps-10"
11164
+ }, /*#__PURE__*/React__default.createElement("button", {
11165
+ className: "h-full w-9 h-9 md:h-11 md:w-11 items-center justify-center rounded-full " + (canScrollLeft ? "bg-primary cursor-pointer text-textButton" : "bg-gray5 text-gray3 cursor-not-allowed"),
11166
+ onClick: handleClickPrevImg,
11167
+ disabled: !canScrollLeft
11168
+ }, /*#__PURE__*/React__default.createElement(IoIosArrowBack, {
11169
+ size: 24,
11170
+ className: "inline-block text-lg"
11171
+ })), /*#__PURE__*/React__default.createElement("button", {
11172
+ className: "h-full w-9 h-9 md:h-11 md:w-11 flex items-center justify-center rounded-full " + (canScrollRight ? "bg-primary cursor-pointer text-textButton" : "bg-gray5 text-gray3 cursor-not-allowed"),
11173
+ onClick: handleClickNextImg,
11174
+ disabled: !canScrollRight
11175
+ }, /*#__PURE__*/React__default.createElement(IoIosArrowForward, {
11176
+ size: 24,
11177
+ className: "inline-block text-lg "
11178
+ }))) : null);
10588
11179
  };
10589
11180
 
10590
11181
  var Products9 = function Products9(props) {
10591
- var _Object$keys;
11182
+ var _Object$keys2;
10592
11183
  var _props$Link = props.Link,
10593
11184
  Link = _props$Link === void 0 ? null : _props$Link,
10594
11185
  shopConfigStyle = props.shopConfigStyle,
10595
11186
  _props$ProductItem = props.ProductItem,
10596
11187
  ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
10597
- var _useState = useState({
11188
+ var _useState = useState(true),
11189
+ loading = _useState[0],
11190
+ setLoading = _useState[1];
11191
+ var _useState2 = useState({
10598
11192
  size: 12
10599
11193
  }),
10600
- params = _useState[0],
10601
- setParams = _useState[1];
11194
+ params = _useState2[0];
11195
+ var _useState3 = useState(false),
11196
+ isAutoGetList = _useState3[0];
10602
11197
  var _CategoryController = CategoryController(_extends({}, props, {
10603
11198
  types: "0"
10604
11199
  })),
10605
11200
  _CategoryController$c = _CategoryController.categories,
10606
11201
  categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
10607
11202
  var _ProductController = ProductController(_extends({}, props, {
10608
- params: params
11203
+ params: params,
11204
+ isAutoGetList: isAutoGetList
10609
11205
  })),
10610
- _ProductController$pr = _ProductController.products,
10611
- products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
10612
- loading = _ProductController.loading;
11206
+ getProductListSearch = _ProductController.getProductListSearch;
11207
+ var _useState4 = useState([]),
11208
+ categoryProducts = _useState4[0],
11209
+ setCategoryProducts = _useState4[1];
11210
+ useEffect(function () {
11211
+ if ((categories === null || categories === void 0 ? void 0 : categories.length) > 0) {
11212
+ fetchAll();
11213
+ }
11214
+ }, [categories]);
11215
+ var fetchAll = function fetchAll() {
11216
+ try {
11217
+ setLoading(true);
11218
+ var _temp = _finallyRethrows(function () {
11219
+ return _catch(function () {
11220
+ var _categories$slice;
11221
+ var result = {};
11222
+ return Promise.resolve(Promise.all(categories === null || categories === void 0 ? void 0 : (_categories$slice = categories.slice(0, 4)) === null || _categories$slice === void 0 ? void 0 : _categories$slice.map(function (cat) {
11223
+ try {
11224
+ return Promise.resolve(getProductListSearch({
11225
+ categoryId: cat === null || cat === void 0 ? void 0 : cat.categoryId,
11226
+ size: 4
11227
+ })).then(function (products) {
11228
+ if ((products === null || products === void 0 ? void 0 : products.length) > 0) {
11229
+ result[cat === null || cat === void 0 ? void 0 : cat.cateName] = products;
11230
+ }
11231
+ });
11232
+ } catch (e) {
11233
+ return Promise.reject(e);
11234
+ }
11235
+ }))).then(function () {
11236
+ setCategoryProducts(result);
11237
+ });
11238
+ }, function (error) {
11239
+ console.log(error);
11240
+ });
11241
+ }, function (_wasThrown, _result) {
11242
+ setLoading(false);
11243
+ if (_wasThrown) throw _result;
11244
+ return _result;
11245
+ });
11246
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
11247
+ } catch (e) {
11248
+ return Promise.reject(e);
11249
+ }
11250
+ };
10613
11251
  var handleChooseCategory = function handleChooseCategory(item) {
10614
- setParams(_extends({}, params, {
10615
- categoryId: item === null || item === void 0 ? void 0 : item.categoryId,
10616
- size: 12
10617
- }));
11252
+ var _Object$keys;
11253
+ if ((Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(item)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0) {
11254
+ fetchAll();
11255
+ } else {
11256
+ fetchOne(item);
11257
+ }
10618
11258
  };
10619
- var groupedProducts = products === null || products === void 0 ? void 0 : products.reduce(function (acc, product) {
10620
- var _product$productInfo = product === null || product === void 0 ? void 0 : product.productInfo,
10621
- categoryName = _product$productInfo.categoryName;
10622
- if (!acc[categoryName]) {
10623
- acc[categoryName] = [];
11259
+ var fetchOne = function fetchOne(item) {
11260
+ try {
11261
+ setLoading(true);
11262
+ var _temp2 = _finallyRethrows(function () {
11263
+ return _catch(function () {
11264
+ return Promise.resolve(getProductListSearch({
11265
+ categoryId: item === null || item === void 0 ? void 0 : item.categoryId,
11266
+ size: 12
11267
+ })).then(function (products) {
11268
+ var _setCategoryProducts, _console$log;
11269
+ setCategoryProducts((_setCategoryProducts = {}, _setCategoryProducts[item === null || item === void 0 ? void 0 : item.cateName] = products, _setCategoryProducts));
11270
+ console.log("check::::", (_console$log = {}, _console$log[item === null || item === void 0 ? void 0 : item.cateName] = products, _console$log));
11271
+ });
11272
+ }, function (error) {
11273
+ console.log(error);
11274
+ });
11275
+ }, function (_wasThrown2, _result2) {
11276
+ setLoading(false);
11277
+ if (_wasThrown2) throw _result2;
11278
+ return _result2;
11279
+ });
11280
+ return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
11281
+ } catch (e) {
11282
+ return Promise.reject(e);
10624
11283
  }
10625
- acc[categoryName].push(product);
10626
- return acc;
10627
- }, {});
11284
+ };
10628
11285
  return /*#__PURE__*/React__default.createElement("div", {
10629
11286
  className: SECTION_CLASS + " flex flex-col gap-4 md:!my-6 md:gap-6 "
10630
11287
  }, /*#__PURE__*/React__default.createElement(CarouselItem, {
@@ -10632,7 +11289,7 @@ var Products9 = function Products9(props) {
10632
11289
  onClick: handleChooseCategory
10633
11290
  }), loading ? /*#__PURE__*/React__default.createElement("div", {
10634
11291
  className: "m-auto mt-20 min-h-32"
10635
- }, /*#__PURE__*/React__default.createElement(Loading, null)) : (Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(groupedProducts)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) > 0 ? Object.entries(groupedProducts).map(function (_ref, index) {
11292
+ }, /*#__PURE__*/React__default.createElement(Loading, null)) : (Object === null || Object === void 0 ? void 0 : (_Object$keys2 = Object.keys(categoryProducts)) === null || _Object$keys2 === void 0 ? void 0 : _Object$keys2.length) > 0 ? Object.entries(categoryProducts).map(function (_ref, index) {
10636
11293
  var _products$;
10637
11294
  var categoryName = _ref[0],
10638
11295
  products = _ref[1];
@@ -10656,7 +11313,9 @@ var Products9 = function Products9(props) {
10656
11313
  product: product,
10657
11314
  key: product === null || product === void 0 ? void 0 : product.landingShopProductId
10658
11315
  });
10659
- }) : null));
11316
+ }) : /*#__PURE__*/React__default.createElement("div", {
11317
+ className: "col-span-2 sm:col-span-3 lg:col-span-4"
11318
+ }, /*#__PURE__*/React__default.createElement(NotFoundProduct, null))));
10660
11319
  }) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
10661
11320
  };
10662
11321
 
@@ -10727,34 +11386,30 @@ var listFilter = [{
10727
11386
  value: "sortPriceDESC"
10728
11387
  }];
10729
11388
  var Products11 = function Products11(props) {
10730
- var _productsFilter$slice;
10731
11389
  var _props$shopConfigStyl = props.shopConfigStyle,
10732
11390
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
10733
11391
  _props$Link = props.Link,
10734
11392
  Link = _props$Link === void 0 ? null : _props$Link,
10735
11393
  _props$categoryId = props.categoryId,
10736
- categoryId = _props$categoryId === void 0 ? 0 : _props$categoryId,
11394
+ categoryId = _props$categoryId === void 0 ? "" : _props$categoryId,
10737
11395
  _props$ProductItem = props.ProductItem,
10738
11396
  ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
10739
11397
  var _useState = useState({
10740
11398
  page: 0,
10741
11399
  size: 12,
10742
- categoryId: categoryId
11400
+ categoryId: categoryId || ""
10743
11401
  }),
10744
11402
  params = _useState[0],
10745
11403
  setParams = _useState[1];
10746
- var _useState2 = useState(true),
10747
- firstLoading = _useState2[0],
10748
- setFirstLoading = _useState2[1];
10749
- var _useState3 = useState({}),
10750
- categorySelected = _useState3[0],
10751
- setCategorySelected = _useState3[1];
10752
- var _useState4 = useState([]),
10753
- productsFilter = _useState4[0],
10754
- setProductsFilter = _useState4[1];
10755
- var _useState5 = useState(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]),
10756
- filterItem = _useState5[0],
10757
- setFilterItem = _useState5[1];
11404
+ var _useState2 = useState({}),
11405
+ categorySelected = _useState2[0],
11406
+ setCategorySelected = _useState2[1];
11407
+ var _useState3 = useState([]),
11408
+ productsFilter = _useState3[0],
11409
+ setProductsFilter = _useState3[1];
11410
+ var _useState4 = useState(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]),
11411
+ filterItem = _useState4[0],
11412
+ setFilterItem = _useState4[1];
10758
11413
  var _CategoryController = CategoryController(_extends({}, props, {
10759
11414
  types: "0"
10760
11415
  })),
@@ -10768,22 +11423,33 @@ var Products11 = function Products11(props) {
10768
11423
  loading = _ProductController.loading,
10769
11424
  page = _ProductController.page;
10770
11425
  var handleOnChangePage = function handleOnChangePage(pageIndex) {
10771
- setFirstLoading(false);
10772
11426
  setParams(function (prev) {
10773
11427
  return _extends({}, prev, {
10774
11428
  page: pageIndex
10775
11429
  });
10776
11430
  });
11431
+ window.scrollTo({
11432
+ top: 0,
11433
+ behavior: 'smooth'
11434
+ });
10777
11435
  };
10778
11436
  var handleChooseCategory = function handleChooseCategory(category) {
11437
+ if (categoryId) {
11438
+ var newUrl = getLinkProductsByCategory(category);
11439
+ window.history.replaceState(null, '', newUrl);
11440
+ }
10779
11441
  setCategorySelected(category);
10780
- setFirstLoading(true);
10781
11442
  setFilterItem(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]);
10782
11443
  setParams(function (prev) {
10783
- return _extends({}, prev, {
11444
+ return {
11445
+ page: 0,
10784
11446
  categoryId: category === null || category === void 0 ? void 0 : category.categoryId,
10785
11447
  size: 12
10786
- });
11448
+ };
11449
+ });
11450
+ window.scrollTo({
11451
+ top: 0,
11452
+ behavior: 'smooth'
10787
11453
  });
10788
11454
  };
10789
11455
  useEffect(function () {
@@ -10795,44 +11461,54 @@ var Products11 = function Products11(props) {
10795
11461
  }
10796
11462
  }, [categories]);
10797
11463
  useEffect(function () {
10798
- setProductsFilter(products);
11464
+ if ((filterItem === null || filterItem === void 0 ? void 0 : filterItem.value) === "sortPriceDESC") {
11465
+ var productsCopy = [].concat(products);
11466
+ productsCopy === null || productsCopy === void 0 ? void 0 : productsCopy.sort(function (a, b) {
11467
+ var _a$productInfo, _b$productInfo;
11468
+ return (a === null || a === void 0 ? void 0 : (_a$productInfo = a.productInfo) === null || _a$productInfo === void 0 ? void 0 : _a$productInfo.price) - (b === null || b === void 0 ? void 0 : (_b$productInfo = b.productInfo) === null || _b$productInfo === void 0 ? void 0 : _b$productInfo.price);
11469
+ });
11470
+ setProductsFilter(productsCopy);
11471
+ } else {
11472
+ setProductsFilter(products);
11473
+ }
10799
11474
  }, [products, categorySelected]);
10800
11475
  var handleFilter = function handleFilter(item) {
10801
11476
  setFilterItem(item);
10802
- if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC") {
11477
+ if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC" && !(params !== null && params !== void 0 && params.isHighlight) && !(params !== null && params !== void 0 && params.isSale)) {
10803
11478
  var productsCopy = [].concat(products);
10804
11479
  productsCopy === null || productsCopy === void 0 ? void 0 : productsCopy.sort(function (a, b) {
10805
- var _b$productInfo, _a$productInfo;
10806
- return +(b === null || b === void 0 ? void 0 : (_b$productInfo = b.productInfo) === null || _b$productInfo === void 0 ? void 0 : _b$productInfo.price) - (a === null || a === void 0 ? void 0 : (_a$productInfo = a.productInfo) === null || _a$productInfo === void 0 ? void 0 : _a$productInfo.price);
11480
+ var _a$productInfo2, _b$productInfo2;
11481
+ return (a === null || a === void 0 ? void 0 : (_a$productInfo2 = a.productInfo) === null || _a$productInfo2 === void 0 ? void 0 : _a$productInfo2.price) - (b === null || b === void 0 ? void 0 : (_b$productInfo2 = b.productInfo) === null || _b$productInfo2 === void 0 ? void 0 : _b$productInfo2.price);
10807
11482
  });
10808
11483
  setProductsFilter(productsCopy);
10809
11484
  } else if ((item === null || item === void 0 ? void 0 : item.value) === "discount") {
10810
- var _productsCopy = [].concat(products);
10811
- _productsCopy === null || _productsCopy === void 0 ? void 0 : _productsCopy.filter(function (product) {
10812
- return (product === null || product === void 0 ? void 0 : product.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : product.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : product.price);
11485
+ setParams({
11486
+ page: 0,
11487
+ categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
11488
+ size: 12,
11489
+ isSale: true
10813
11490
  });
10814
- setProductsFilter(_productsCopy);
10815
11491
  } else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
10816
- setParams(function (prev) {
10817
- return _extends({}, prev, {
10818
- isHighlight: true
10819
- });
11492
+ setParams({
11493
+ page: 0,
11494
+ categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
11495
+ size: 12,
11496
+ isHighlight: true
10820
11497
  });
10821
11498
  } else {
10822
- setParams(function (prev) {
10823
- return _extends({}, prev, {
10824
- categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
10825
- size: 12
10826
- });
11499
+ setParams({
11500
+ page: 0,
11501
+ categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
11502
+ size: 12
10827
11503
  });
10828
11504
  }
10829
11505
  };
10830
11506
  return /*#__PURE__*/React__default.createElement("div", {
10831
11507
  className: SECTION_CLASS + " grid grid-cols-1 !my-6 !md:my-6 md:grid-cols-4 gap-6"
10832
11508
  }, /*#__PURE__*/React__default.createElement("div", {
10833
- className: "md:sticky top-0 self-start"
11509
+ className: "md:sticky top-16 self-start"
10834
11510
  }, (categories === null || categories === void 0 ? void 0 : categories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
10835
- className: " flex flex-col gap-2 rounded-3xl bg-bgSecondary p-4 max-h-96 overflow-y-auto"
11511
+ className: " flex flex-col gap-2 rounded-2xl bg-bgSecondary p-4 max-h-96 scroll-container overflow-y-auto"
10836
11512
  }, categories === null || categories === void 0 ? void 0 : categories.map(function (item, index) {
10837
11513
  return /*#__PURE__*/React__default.createElement("div", {
10838
11514
  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" : ""),
@@ -10840,7 +11516,9 @@ var Products11 = function Products11(props) {
10840
11516
  onClick: function onClick() {
10841
11517
  handleChooseCategory(item);
10842
11518
  }
10843
- }, item === null || item === void 0 ? void 0 : item.cateName);
11519
+ }, /*#__PURE__*/React__default.createElement("div", {
11520
+ className: "line-clamp-2"
11521
+ }, item === null || item === void 0 ? void 0 : item.cateName));
10844
11522
  })) : null), /*#__PURE__*/React__default.createElement("div", {
10845
11523
  className: "md:col-span-3 flex flex-col gap-6"
10846
11524
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10853,11 +11531,11 @@ var Products11 = function Products11(props) {
10853
11531
  handleFilter(item);
10854
11532
  }
10855
11533
  }, item === null || item === void 0 ? void 0 : item.label);
10856
- })), loading && firstLoading ? /*#__PURE__*/React__default.createElement("div", {
11534
+ })), loading ? /*#__PURE__*/React__default.createElement("div", {
10857
11535
  className: "w-full h-96 mb-1 flex justify-center items-center"
10858
11536
  }, /*#__PURE__*/React__default.createElement(Loading, null)) : /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10859
- className: "grid grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-3 md:gap-6 lg:gap-8"
10860
- }, (productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.length) > 0 ? productsFilter === null || productsFilter === void 0 ? void 0 : (_productsFilter$slice = productsFilter.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _productsFilter$slice === void 0 ? void 0 : _productsFilter$slice.map(function (product, index) {
11537
+ className: "grid grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-3 md:gap-6 xl:gap-8"
11538
+ }, (productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.length) > 0 ? productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.map(function (product, index) {
10861
11539
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
10862
11540
  href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo),
10863
11541
  Link: Link,
@@ -10881,26 +11559,6 @@ var Products11 = function Products11(props) {
10881
11559
  }) : null)));
10882
11560
  };
10883
11561
 
10884
- var ProductItem9 = function ProductItem9(props) {
10885
- var _product$productInfo;
10886
- var product = props.product;
10887
- return /*#__PURE__*/React__default.createElement("div", {
10888
- className: "flex border-b border-stroke items-center py-4"
10889
- }, /*#__PURE__*/React__default.createElement(ProductImage, {
10890
- product: product === null || product === void 0 ? void 0 : product.productInfo,
10891
- className: "!w-24 rounded-lg"
10892
- }), /*#__PURE__*/React__default.createElement("div", {
10893
- className: "ml-4 flex-1"
10894
- }, /*#__PURE__*/React__default.createElement("div", {
10895
- className: "text-xl"
10896
- }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), product !== null && product !== void 0 && product.isShowProductPriceOnLanding ? /*#__PURE__*/React__default.createElement("div", {
10897
- className: "mt-2"
10898
- }, /*#__PURE__*/React__default.createElement(ProductPrice, {
10899
- product: product === null || product === void 0 ? void 0 : product.productInfo,
10900
- priceClassName: "!font-normal text-lg"
10901
- })) : null));
10902
- };
10903
-
10904
11562
  var Products12 = function Products12(props) {
10905
11563
  var _props$shopConfigStyl = props.shopConfigStyle,
10906
11564
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
@@ -10920,40 +11578,102 @@ var Products12 = function Products12(props) {
10920
11578
  })),
10921
11579
  categories = _CategoryController.categories;
10922
11580
  var _ProductController = ProductController(_extends({}, props, {
10923
- params: params
11581
+ params: params
11582
+ })),
11583
+ _ProductController$pr = _ProductController.products,
11584
+ products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
11585
+ loading = _ProductController.loading;
11586
+ var handleFilterByCategory = function handleFilterByCategory(category) {
11587
+ setParams(function (prev) {
11588
+ return _extends({}, prev, {
11589
+ categoryId: category === null || category === void 0 ? void 0 : category.categoryId
11590
+ });
11591
+ });
11592
+ };
11593
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
11594
+ className: SECTION_CLASS + " w-full flex flex-col gap-6"
11595
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
11596
+ data: data,
11597
+ shopConfigStyle: shopConfigStyle
11598
+ }), /*#__PURE__*/React__default.createElement("div", {
11599
+ className: "flex justify-center"
11600
+ }, /*#__PURE__*/React__default.createElement("div", {
11601
+ className: "!overflow-hidden max-w-[80%] md:max-w-[67%] pt-2"
11602
+ }, /*#__PURE__*/React__default.createElement(CarouselItem, {
11603
+ isNavigateButton: false,
11604
+ data: categories,
11605
+ onClick: handleFilterByCategory
11606
+ }))), loading ? /*#__PURE__*/React__default.createElement("div", {
11607
+ className: "flex w-full justify-center p-12"
11608
+ }, /*#__PURE__*/React__default.createElement(Loading, null)) : products !== null && products !== void 0 && products.length ? /*#__PURE__*/React__default.createElement("div", {
11609
+ className: "grid grid-cols-1 md:grid-cols-2 gap-x-12"
11610
+ }, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
11611
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
11612
+ key: index,
11613
+ Link: Link,
11614
+ href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
11615
+ }, /*#__PURE__*/React__default.createElement(ProductItem10, {
11616
+ product: product
11617
+ }));
11618
+ })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null)));
11619
+ };
11620
+
11621
+ var Products14 = function Products14(props) {
11622
+ var _products$slice;
11623
+ var _props$Link = props.Link,
11624
+ Link = _props$Link === void 0 ? null : _props$Link,
11625
+ data = props.data,
11626
+ _props$shopConfigStyl = props.shopConfigStyle,
11627
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
11628
+ _props$SectionTitle = props.SectionTitle,
11629
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
11630
+ _props$ProductItem = props.ProductItem,
11631
+ ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
11632
+ var _ProductDetailControl = ProductDetailController(props),
11633
+ product = _ProductDetailControl.product;
11634
+ var _useState = useState(false),
11635
+ isAutoGetList = _useState[0],
11636
+ setIsAutoGetList = _useState[1];
11637
+ var _useState2 = useState({
11638
+ size: 12,
11639
+ categoryId: product === null || product === void 0 ? void 0 : product.categoryId
11640
+ }),
11641
+ params = _useState2[0],
11642
+ setParams = _useState2[1];
11643
+ var _ProductController = ProductController(_extends({}, props, {
11644
+ params: params,
11645
+ isAutoGetList: isAutoGetList
10924
11646
  })),
10925
11647
  _ProductController$pr = _ProductController.products,
10926
11648
  products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
10927
11649
  loading = _ProductController.loading;
10928
- var handleFilterByCategory = function handleFilterByCategory(category) {
10929
- setParams(function (prev) {
10930
- return _extends({}, prev, {
10931
- categoryId: category === null || category === void 0 ? void 0 : category.categoryId
11650
+ useEffect(function () {
11651
+ if (product !== null && product !== void 0 && product.categoryId) {
11652
+ setParams(function (prev) {
11653
+ return _extends({}, prev, {
11654
+ categoryId: product === null || product === void 0 ? void 0 : product.categoryId
11655
+ });
10932
11656
  });
10933
- });
10934
- };
10935
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
10936
- className: SECTION_DEFAULT_CLASS + " flex flex-col gap-6"
11657
+ setIsAutoGetList(true);
11658
+ }
11659
+ }, [product]);
11660
+ return /*#__PURE__*/React__default.createElement("div", {
11661
+ className: SECTION_CLASS + " flex flex-col gap-6 md:gap-12"
10937
11662
  }, /*#__PURE__*/React__default.createElement(SectionTitle, {
10938
11663
  data: data,
10939
11664
  shopConfigStyle: shopConfigStyle
10940
- }), /*#__PURE__*/React__default.createElement(CarouselItem, {
10941
- isNavigateButton: false,
10942
- data: categories,
10943
- onClick: handleFilterByCategory
10944
11665
  }), loading ? /*#__PURE__*/React__default.createElement("div", {
10945
- className: "flex w-full justify-center p-12"
10946
- }, /*#__PURE__*/React__default.createElement(Loading, null)) : products !== null && products !== void 0 && products.length ? /*#__PURE__*/React__default.createElement("div", {
10947
- className: "grid grid-cols-1 md:grid-cols-2 gap-x-12"
10948
- }, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
10949
- return /*#__PURE__*/React__default.createElement(LinkToPage, {
10950
- key: index,
11666
+ className: "m-auto mt-20 min-h-32"
11667
+ }, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
11668
+ className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-x-2 gap-y-4 md:gap-4 xl:gap-6"
11669
+ }, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, idx) {
11670
+ return /*#__PURE__*/React__default.createElement(ProductItem, {
10951
11671
  Link: Link,
10952
- href: getLinkProductDetail(product === null || product === void 0 ? void 0 : product.productInfo)
10953
- }, /*#__PURE__*/React__default.createElement(ProductItem9, {
10954
- product: product
10955
- }));
10956
- })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null)));
11672
+ shopConfigStyle: shopConfigStyle,
11673
+ product: product,
11674
+ key: "zjk-" + idx
11675
+ });
11676
+ })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null));
10957
11677
  };
10958
11678
 
10959
11679
  var ProductCategory2 = function ProductCategory2(props) {
@@ -11077,7 +11797,7 @@ var listFilter$1 = [{
11077
11797
  }
11078
11798
  }];
11079
11799
  var ProductSearch1 = function ProductSearch1(props) {
11080
- var _window, _window$location, _productsFilter$slice;
11800
+ var _window, _window$location, _products$slice;
11081
11801
  var _props$Link = props.Link,
11082
11802
  Link = _props$Link === void 0 ? null : _props$Link,
11083
11803
  _props$SectionTitle = props.SectionTitle,
@@ -11087,27 +11807,25 @@ var ProductSearch1 = function ProductSearch1(props) {
11087
11807
  shopConfigStyle = props.shopConfigStyle;
11088
11808
  var queryParams = new URLSearchParams((_window = window) === null || _window === void 0 ? void 0 : (_window$location = _window.location) === null || _window$location === void 0 ? void 0 : _window$location.search);
11089
11809
  var keywordValue = queryParams === null || queryParams === void 0 ? void 0 : queryParams.get('tu-khoa');
11090
- var _useState = useState([]),
11091
- productsFilter = _useState[0],
11092
- setProductsFilter = _useState[1];
11093
- var _useState2 = useState({
11810
+ var _useState = useState({
11094
11811
  productName: keywordValue,
11095
11812
  size: 12
11096
11813
  }),
11097
- params = _useState2[0],
11098
- setParams = _useState2[1];
11099
- var _useState3 = useState(true),
11100
- isGetMore = _useState3[0],
11101
- setIsGetMore = _useState3[1];
11102
- var _useState4 = useState(false),
11103
- isAutoGetList = _useState4[0],
11104
- setIsAutoGetList = _useState4[1];
11814
+ params = _useState[0],
11815
+ setParams = _useState[1];
11816
+ var _useState2 = useState(true),
11817
+ isGetMore = _useState2[0],
11818
+ setIsGetMore = _useState2[1];
11819
+ var _useState3 = useState(false),
11820
+ isAutoGetList = _useState3[0],
11821
+ setIsAutoGetList = _useState3[1];
11105
11822
  var _ProductController = ProductController(_extends({}, props, {
11106
11823
  params: params,
11107
11824
  isAutoGetList: isAutoGetList
11108
11825
  })),
11109
11826
  products = _ProductController.products,
11110
- loading = _ProductController.loading;
11827
+ loading = _ProductController.loading,
11828
+ page = _ProductController.page;
11111
11829
  useEffect(function () {
11112
11830
  setIsAutoGetList(true);
11113
11831
  setParams(function (prev) {
@@ -11116,11 +11834,6 @@ var ProductSearch1 = function ProductSearch1(props) {
11116
11834
  });
11117
11835
  });
11118
11836
  }, [keywordValue]);
11119
- useEffect(function () {
11120
- if ((products === null || products === void 0 ? void 0 : products.length) > 0) setProductsFilter(products);else {
11121
- setProductsFilter([]);
11122
- }
11123
- }, [products]);
11124
11837
  var handleGetMoreProducts = function handleGetMoreProducts() {
11125
11838
  setIsGetMore(false);
11126
11839
  setParams(function (prev) {
@@ -11131,16 +11844,16 @@ var ProductSearch1 = function ProductSearch1(props) {
11131
11844
  };
11132
11845
  var handleFilter = function handleFilter(item) {
11133
11846
  if ((item === null || item === void 0 ? void 0 : item.value) === "discount") {
11134
- var productsCopy = [].concat(products);
11135
- productsCopy === null || productsCopy === void 0 ? void 0 : productsCopy.filter(function (product) {
11136
- return (product === null || product === void 0 ? void 0 : product.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : product.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : product.price);
11847
+ setParams({
11848
+ size: 12,
11849
+ productName: keywordValue,
11850
+ isSale: true
11137
11851
  });
11138
- setProductsFilter(productsCopy);
11139
11852
  } else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
11140
- setParams(function (prev) {
11141
- return _extends({}, prev, {
11142
- isHighlight: true
11143
- });
11853
+ setParams({
11854
+ size: 12,
11855
+ productName: keywordValue,
11856
+ isHighlight: true
11144
11857
  });
11145
11858
  } else {
11146
11859
  setParams({
@@ -11158,21 +11871,21 @@ var ProductSearch1 = function ProductSearch1(props) {
11158
11871
  shopConfigStyle: shopConfigStyle
11159
11872
  }), /*#__PURE__*/React__default.createElement("div", {
11160
11873
  className: "text-lg"
11161
- }, "T\u1EEB kh\xF3a \"", keywordValue, "\" (", products === null || products === void 0 ? void 0 : products.length, " s\u1EA3n ph\u1EA9m)"), /*#__PURE__*/React__default.createElement(CarouselItem, {
11874
+ }, "T\u1EEB kh\xF3a \"", keywordValue, "\" (", page === null || page === void 0 ? void 0 : page.total_elements, " s\u1EA3n ph\u1EA9m)"), /*#__PURE__*/React__default.createElement(CarouselItem, {
11162
11875
  data: listFilter$1,
11163
11876
  isNavigateButton: false,
11164
11877
  onClick: handleFilter
11165
11878
  }), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
11166
11879
  className: "m-auto mt-20 min-h-32"
11167
- }, /*#__PURE__*/React__default.createElement(Loading, null)) : (productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
11880
+ }, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
11168
11881
  className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-x-2 gap-y-4 md:gap-4 xl:gap-6"
11169
- }, productsFilter === null || productsFilter === void 0 ? void 0 : (_productsFilter$slice = productsFilter.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _productsFilter$slice === void 0 ? void 0 : _productsFilter$slice.map(function (product, idx) {
11882
+ }, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, idx) {
11170
11883
  return /*#__PURE__*/React__default.createElement(ProductItem, {
11171
11884
  Link: Link,
11172
11885
  product: product,
11173
11886
  key: "htrhr-" + idx
11174
11887
  });
11175
- })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
11888
+ })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
11176
11889
  label: "Xem thêm",
11177
11890
  onClick: handleGetMoreProducts,
11178
11891
  className: "mx-auto " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass),
@@ -11552,12 +12265,12 @@ var ProductDetail10 = function ProductDetail10(props) {
11552
12265
  return /*#__PURE__*/React__default.createElement("div", {
11553
12266
  className: SECTION_CLASS + " mt-0 md:mt-0 mb-0 " + ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "bg-bgSecondary pb-8" : "bg-background")
11554
12267
  }, /*#__PURE__*/React__default.createElement("div", {
11555
- className: ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "" : "px-4 md:px-6") + " py-4 md:py-6 rounded-2xl grid grid-cols-1 md:grid-cols-5 md:gap-6 bg-bgSecondary"
12268
+ className: ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "" : "px-4 md:px-6") + " py-4 md:py-6 rounded-2xl grid grid-cols-1 md:grid-cols-5 gap-3 md:gap-6 bg-bgSecondary"
11556
12269
  }, /*#__PURE__*/React__default.createElement("div", {
11557
- className: "flex flex-col gap-4 col-span-2 "
12270
+ className: "flex flex-col gap-4 md:col-span-2 "
11558
12271
  }, displayImage ? /*#__PURE__*/React__default.createElement("img", {
11559
12272
  src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
11560
- className: "w-full border rounded-2xl p-2 bg-background aspect-square object-contain rounded-2xl "
12273
+ className: "w-full border bg-background aspect-square object-contain rounded-2xl "
11561
12274
  }) : /*#__PURE__*/React__default.createElement("div", {
11562
12275
  className: "flex justify-center items-center w-full border rounded-2xl aspect-square",
11563
12276
  style: {
@@ -11568,19 +12281,19 @@ var ProductDetail10 = function ProductDetail10(props) {
11568
12281
  height: "25%",
11569
12282
  fill: "#D9D9D9"
11570
12283
  })), /*#__PURE__*/React__default.createElement("div", {
11571
- className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
12284
+ className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
11572
12285
  }, product === null || product === void 0 ? void 0 : (_product$images2 = product.images) === null || _product$images2 === void 0 ? void 0 : _product$images2.map(function (item) {
11573
12286
  return /*#__PURE__*/React__default.createElement("img", {
11574
12287
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
11575
12288
  key: item === null || item === void 0 ? void 0 : item.imageId,
11576
12289
  alt: "",
11577
- className: "cursor-pointer h-16 w-16 rounded-lg bg-background\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 "),
12290
+ className: "cursor-pointer h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full aspect-square rounded-md lg:rounded-lg bg-background object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 "),
11578
12291
  onClick: function onClick() {
11579
12292
  handleDisplayImage(item);
11580
12293
  }
11581
12294
  });
11582
12295
  }))), /*#__PURE__*/React__default.createElement("div", {
11583
- className: "col-span-3"
12296
+ className: "md:col-span-3 "
11584
12297
  }, /*#__PURE__*/React__default.createElement("p", {
11585
12298
  className: "font-semibold text-2xl"
11586
12299
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -11594,7 +12307,7 @@ var ProductDetail10 = function ProductDetail10(props) {
11594
12307
  }, /*#__PURE__*/React__default.createElement("div", {
11595
12308
  className: "min-w-24"
11596
12309
  }, option === null || option === void 0 ? void 0 : option.name, ":"), /*#__PURE__*/React__default.createElement("div", {
11597
- className: "flex gap-2"
12310
+ className: "flex flex-wrap gap-2"
11598
12311
  }, ((option === null || option === void 0 ? void 0 : option.value) || []).map(function (v, i) {
11599
12312
  return /*#__PURE__*/React__default.createElement("button", {
11600
12313
  key: i,
@@ -11646,7 +12359,7 @@ var ProductDetail10 = function ProductDetail10(props) {
11646
12359
  __html: product === null || product === void 0 ? void 0 : product.description
11647
12360
  }
11648
12361
  }), !isSeeMore && !hiddenButton ? /*#__PURE__*/React__default.createElement("div", {
11649
- className: "h-10 relative -mt-10 rounded-b-lg",
12362
+ className: "h-28 relative -mt-28 rounded-b-lg",
11650
12363
  style: {
11651
12364
  background: "linear-gradient(to top, #81818169 0%, #00000003 50%)"
11652
12365
  }
@@ -11791,7 +12504,7 @@ var ProductDetail11 = function ProductDetail11(props) {
11791
12504
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
11792
12505
  key: item === null || item === void 0 ? void 0 : item.imageId,
11793
12506
  alt: "",
11794
- className: "cursor-pointer px-3 py-2 !h-24 !w-24 object-cover rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
12507
+ className: "cursor-pointer px-3 py-2 !h-24 !w-24 object-contain aspect-square rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
11795
12508
  onClick: function onClick() {
11796
12509
  handleDisplayImage(item);
11797
12510
  }
@@ -11823,7 +12536,7 @@ var ProductDetail11 = function ProductDetail11(props) {
11823
12536
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
11824
12537
  key: item === null || item === void 0 ? void 0 : item.imageId,
11825
12538
  alt: "",
11826
- className: "cursor-pointer px-2 py-1 !h-24 !w-24 object-cover rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
12539
+ className: "cursor-pointer px-2 py-1 !h-24 !w-24 object-contain rounded-lg aspect-square\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
11827
12540
  onClick: function onClick() {
11828
12541
  handleDisplayImage(item);
11829
12542
  }
@@ -11843,7 +12556,7 @@ var ProductDetail11 = function ProductDetail11(props) {
11843
12556
  }, /*#__PURE__*/React__default.createElement("div", {
11844
12557
  className: "min-w-24 my-auto"
11845
12558
  }, option === null || option === void 0 ? void 0 : option.name, ":"), /*#__PURE__*/React__default.createElement("div", {
11846
- className: "flex gap-2"
12559
+ className: "flex flex-wrap gap-2"
11847
12560
  }, ((option === null || option === void 0 ? void 0 : option.value) || []).map(function (v, i) {
11848
12561
  return /*#__PURE__*/React__default.createElement("button", {
11849
12562
  key: i,
@@ -11955,7 +12668,7 @@ var Booking1 = function Booking1(props) {
11955
12668
  shopConfigStyle: shopConfigStyle
11956
12669
  }), /*#__PURE__*/React__default.createElement("div", {
11957
12670
  className: "mt-12 grid grid-cols-1 gap-6 md:grid-cols-2 md:gap-12"
11958
- }, /*#__PURE__*/React__default.createElement(BookingForm, {
12671
+ }, /*#__PURE__*/React__default.createElement(BookingForm$1, {
11959
12672
  shopConfigStyle: shopConfigStyle,
11960
12673
  shopConfig: shopConfig,
11961
12674
  className: "!bg-bgSecondary"
@@ -11997,7 +12710,7 @@ var BookingForm6 = function BookingForm6(props) {
11997
12710
  className: "w-full h-auto"
11998
12711
  }), /*#__PURE__*/React__default.createElement("div", {
11999
12712
  className: "mt-4 whitespace-pre-line"
12000
- }, data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : _data$data6$.description)), /*#__PURE__*/React__default.createElement(BookingForm, {
12713
+ }, data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : _data$data6$.description)), /*#__PURE__*/React__default.createElement(BookingForm$1, {
12001
12714
  shopConfigStyle: shopConfigStyle,
12002
12715
  shopConfig: shopConfig,
12003
12716
  className: "col-span-2"
@@ -12241,7 +12954,7 @@ var BookingFoodForm = function BookingFoodForm(props) {
12241
12954
  })), /*#__PURE__*/React__default.createElement("div", {
12242
12955
  className: "text-center"
12243
12956
  }, /*#__PURE__*/React__default.createElement(Button, {
12244
- label: "Đặt lịch ngay",
12957
+ label: "Đặt bàn ngay",
12245
12958
  shopConfigStyle: shopConfigStyle,
12246
12959
  onClick: handleSubmit
12247
12960
  }))) : null, isOpenPopup && /*#__PURE__*/React__default.createElement(ModalNotification, {
@@ -12258,7 +12971,7 @@ var BookingFoodForm = function BookingFoodForm(props) {
12258
12971
  }
12259
12972
  })), /*#__PURE__*/React__default.createElement("div", {
12260
12973
  className: "font-medium text-2xl"
12261
- }, "\u0110\u1EB7t l\u1ECBch th\xE0nh c\xF4ng"), /*#__PURE__*/React__default.createElement("div", {
12974
+ }, "\u0110\u1EB7t b\xE0n th\xE0nh c\xF4ng"), /*#__PURE__*/React__default.createElement("div", {
12262
12975
  className: "text-center"
12263
12976
  }, "Ch\xFAng t\xF4i \u0111\xE3 ghi nh\u1EADn th\xF4ng tin c\u1EE7a b\u1EA1n v\xE0 s\u1EBD li\xEAn h\u1EC7 l\u1EA1i ngay"))));
12264
12977
  };
@@ -12280,7 +12993,7 @@ var BookingTable1 = function BookingTable1(props) {
12280
12993
  data: data,
12281
12994
  shopConfigStyle: shopConfigStyle
12282
12995
  }), /*#__PURE__*/React__default.createElement("div", {
12283
- className: "mt-6 md:mt-12 grid grid-cols-1 gap-6 md:grid-cols-3 md:gap-12"
12996
+ className: "mt-6 md:mt-12 grid grid-cols-1 gap-6 md:grid-cols-3 lg:gap-12"
12284
12997
  }, /*#__PURE__*/React__default.createElement(LinkToPage, {
12285
12998
  href: convertURL(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$.route) || (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$.link) || "#"
12286
12999
  }, data !== null && data !== void 0 && (_data$data3 = data.data) !== null && _data$data3 !== void 0 && (_data$data3$ = _data$data3[0]) !== null && _data$data3$ !== void 0 && _data$data3$.svgImage ? /*#__PURE__*/React__default.createElement("div", {
@@ -12291,13 +13004,13 @@ var BookingTable1 = function BookingTable1(props) {
12291
13004
  }
12292
13005
  })) : /*#__PURE__*/React__default.createElement("img", {
12293
13006
  src: data === null || data === void 0 ? void 0 : (_data$data5 = data.data) === null || _data$data5 === void 0 ? void 0 : (_data$data5$ = _data$data5[0]) === null || _data$data5$ === void 0 ? void 0 : _data$data5$.srcImage,
12294
- className: "w-full h-auto"
13007
+ className: "w-full h-full lg:h-auto object-cover rounded-2xl"
12295
13008
  }), /*#__PURE__*/React__default.createElement("div", {
12296
13009
  className: "mt-4 whitespace-pre-line"
12297
13010
  }, data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : _data$data6$.description)), /*#__PURE__*/React__default.createElement(BookingFoodForm, {
12298
13011
  shopConfigStyle: shopConfigStyle,
12299
13012
  shopConfig: shopConfig,
12300
- className: "col-span-2"
13013
+ className: "md:col-span-2"
12301
13014
  })));
12302
13015
  };
12303
13016
 
@@ -12305,7 +13018,9 @@ var Banner1 = function Banner1(props) {
12305
13018
  var data = props.data,
12306
13019
  shopConfigStyle = props.shopConfigStyle,
12307
13020
  _props$SectionTitle = props.SectionTitle,
12308
- SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
13021
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
13022
+ _props$Link = props.Link,
13023
+ Link = _props$Link === void 0 ? null : _props$Link;
12309
13024
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
12310
13025
  return /*#__PURE__*/React__default.createElement("div", {
12311
13026
  className: "" + SECTION_DEFAULT_CLASS
@@ -12315,12 +13030,15 @@ var Banner1 = function Banner1(props) {
12315
13030
  }), /*#__PURE__*/React__default.createElement("div", {
12316
13031
  className: "grid grid-cols-1 sm:grid-cols-3 gap-4 lg:gap-6 mt-6"
12317
13032
  }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
12318
- return /*#__PURE__*/React__default.createElement("img", {
13033
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
13034
+ Link: Link,
13035
+ href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
13036
+ }, /*#__PURE__*/React__default.createElement("img", {
12319
13037
  src: item === null || item === void 0 ? void 0 : item.srcImage,
12320
13038
  alt: "",
12321
13039
  className: "rounded-2xl",
12322
13040
  key: "hnfhn-" + index
12323
- });
13041
+ }));
12324
13042
  })));
12325
13043
  };
12326
13044
 
@@ -12409,6 +13127,35 @@ var Banner3 = function Banner3(props) {
12409
13127
  }));
12410
13128
  };
12411
13129
 
13130
+ var Banner4 = function Banner4(props) {
13131
+ var _data$data, _data$data$, _data$data2, _data$data2$, _data$data3, _data$data3$, _data$data4, _data$data4$slice;
13132
+ var data = props.data,
13133
+ _props$Link = props.Link,
13134
+ Link = _props$Link === void 0 ? null : _props$Link;
13135
+ return /*#__PURE__*/React__default.createElement("div", {
13136
+ className: SECTION_CLASS_PADDING + " grid grid-cols-1 bg-bgSecondary md:grid-cols-3 gap-6"
13137
+ }, /*#__PURE__*/React__default.createElement(LinkToPage, {
13138
+ className: "md:col-span-2",
13139
+ Link: Link,
13140
+ href: convertURL(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$.route) || (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$.link) || "#"
13141
+ }, /*#__PURE__*/React__default.createElement("img", {
13142
+ src: 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$.srcImage,
13143
+ className: " object-cover w-full h-full rounded-[10px]"
13144
+ })), /*#__PURE__*/React__default.createElement("div", {
13145
+ className: "flex flex-col gap-6 h-full"
13146
+ }, data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$slice = _data$data4.slice(1, 3)) === null || _data$data4$slice === void 0 ? void 0 : _data$data4$slice.map(function (item, index) {
13147
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
13148
+ Link: Link,
13149
+ href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
13150
+ className: "flex-1 min-h-0",
13151
+ key: "djsd-" + index
13152
+ }, /*#__PURE__*/React__default.createElement("img", {
13153
+ src: item === null || item === void 0 ? void 0 : item.srcImage,
13154
+ className: "object-cover w-full h-full rounded-[10px]"
13155
+ }));
13156
+ })));
13157
+ };
13158
+
12412
13159
  var Banner7 = function Banner7(props) {
12413
13160
  var _data$data;
12414
13161
  var _props$shopConfigStyl = props.shopConfigStyle,
@@ -12480,7 +13227,7 @@ var Partner1 = function Partner1(props) {
12480
13227
  data: data,
12481
13228
  shopConfigStyle: shopConfigStyle
12482
13229
  }), /*#__PURE__*/React__default.createElement("div", {
12483
- className: "grid grid-cols-4 md:grid-cols-6 gap-6 mt-4 md:mt-6 p-6 rounded-xl",
13230
+ className: "grid grid-cols-4 md:grid-cols-6 gap-6 mt-4 md:mt-6 p-4 md:p-6 rounded-xl",
12484
13231
  style: {
12485
13232
  background: bgSecondary
12486
13233
  }
@@ -12811,7 +13558,7 @@ var Footer1 = function Footer1(props) {
12811
13558
  href: "/",
12812
13559
  className: "flex items-center"
12813
13560
  }, /*#__PURE__*/React__default.createElement("img", {
12814
- className: "object-cover w-14 max-h-14",
13561
+ className: "object-contain w-14 h-14",
12815
13562
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
12816
13563
  }), /*#__PURE__*/React__default.createElement("h3", {
12817
13564
  className: "text-2xl md:text-3xl ms-2 font-headingFont ",
@@ -12954,7 +13701,7 @@ var Footer7 = function Footer7(props) {
12954
13701
  href: "/",
12955
13702
  className: "flex items-center gap-2"
12956
13703
  }, /*#__PURE__*/React__default.createElement("img", {
12957
- className: "object-cover w-14 max-h-14",
13704
+ className: "object-contain w-14 h-14",
12958
13705
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
12959
13706
  }), /*#__PURE__*/React__default.createElement("h3", {
12960
13707
  className: " text-2xl md:text-3xl ms-2 font-headingFont ",
@@ -13034,7 +13781,9 @@ var Footer7 = function Footer7(props) {
13034
13781
  style: {
13035
13782
  background: primary
13036
13783
  }
13037
- }))))), /*#__PURE__*/React__default.createElement("hr", null), /*#__PURE__*/React__default.createElement("div", {
13784
+ }))))), /*#__PURE__*/React__default.createElement("hr", {
13785
+ className: "mt-12"
13786
+ }), /*#__PURE__*/React__default.createElement("div", {
13038
13787
  className: "py-4"
13039
13788
  }, /*#__PURE__*/React__default.createElement("small", {
13040
13789
  className: "me-5"
@@ -13054,24 +13803,26 @@ var RatingStar = function RatingStar(props) {
13054
13803
  star = _props$star === void 0 ? 5 : _props$star,
13055
13804
  _props$style = props.style,
13056
13805
  style = _props$style === void 0 ? {} : _props$style,
13806
+ _props$color = props.color,
13807
+ color = _props$color === void 0 ? "#E2B93B" : _props$color,
13057
13808
  _props$className = props.className,
13058
13809
  className = _props$className === void 0 ? "" : _props$className;
13059
13810
  var res = [];
13060
13811
  for (var i = 1; i <= star; i++) {
13061
13812
  res.push(/*#__PURE__*/React__default.createElement(FaStar, {
13062
- color: "#E2B93B"
13813
+ color: color
13063
13814
  }));
13064
- if (i > 5) break;
13815
+ if (i >= 5) break;
13065
13816
  }
13066
13817
  var decimalPart = star % 1;
13067
13818
  if (decimalPart && decimalPart >= 0.5) {
13068
13819
  res.push(/*#__PURE__*/React__default.createElement(FaRegStarHalfStroke, {
13069
- color: "#E2B93B"
13820
+ color: color
13070
13821
  }));
13071
13822
  }
13072
13823
  for (var _i = res === null || res === void 0 ? void 0 : res.length; _i < 5; _i++) {
13073
13824
  res.push(/*#__PURE__*/React__default.createElement(FaRegStar, {
13074
- color: "#E2B93B"
13825
+ color: color
13075
13826
  }));
13076
13827
  }
13077
13828
  return /*#__PURE__*/React__default.createElement("div", {
@@ -13241,23 +13992,75 @@ var CustomerRating8 = function CustomerRating8(props) {
13241
13992
  src: item === null || item === void 0 ? void 0 : item.avatar,
13242
13993
  className: "w-40 h-40 rounded-full object-cover border-8 border-stroke"
13243
13994
  }), /*#__PURE__*/React__default.createElement("div", {
13244
- className: "text-xl text-primary"
13995
+ className: "text-xl text-primary text-center"
13245
13996
  }, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
13246
- className: "text-gray3"
13997
+ className: "text-gray3 text-center"
13247
13998
  }, item === null || item === void 0 ? void 0 : item.description), /*#__PURE__*/React__default.createElement("div", {
13248
13999
  className: "flex gap-2 "
13249
14000
  }, /*#__PURE__*/React__default.createElement(RiDoubleQuotesL, {
13250
- className: "text-gray3",
13251
- size: 36
14001
+ className: "flex-shrink-0 text-gray4",
14002
+ size: 16
13252
14003
  }), /*#__PURE__*/React__default.createElement("div", {
13253
14004
  className: "pt-4"
13254
- }, item === null || item === void 0 ? void 0 : item.content), /*#__PURE__*/React__default.createElement(RiDoubleQuotesL, {
13255
- className: " mt-auto text-gray3",
13256
- size: 36
14005
+ }, item === null || item === void 0 ? void 0 : item.content), /*#__PURE__*/React__default.createElement(RiDoubleQuotesR, {
14006
+ className: "flex-shrink-0 mt-auto text-gray4",
14007
+ size: 16
13257
14008
  })));
13258
14009
  }))));
13259
14010
  };
13260
14011
 
14012
+ var CustomerRating9 = function CustomerRating9(props) {
14013
+ var _data$data;
14014
+ var _props$shopConfigStyl = props.shopConfigStyle,
14015
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
14016
+ _props$data = props.data,
14017
+ data = _props$data === void 0 ? {} : _props$data,
14018
+ _props$SectionTitle = props.SectionTitle,
14019
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
14020
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
14021
+ className: SECTION_DEFAULT_CLASS
14022
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
14023
+ data: data,
14024
+ shopConfigStyle: shopConfigStyle
14025
+ }), /*#__PURE__*/React__default.createElement("div", {
14026
+ className: "mt-12 grid grid-cols-1 lg:grid-cols-3 gap-6"
14027
+ }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, index) {
14028
+ return /*#__PURE__*/React__default.createElement("div", {
14029
+ key: index,
14030
+ className: "flex bg-primary pt-16 px-6 pb-6"
14031
+ }, /*#__PURE__*/React__default.createElement("div", {
14032
+ className: "bg-background relative"
14033
+ }, /*#__PURE__*/React__default.createElement("div", {
14034
+ className: "flex justify-between items-center pr-4 w-full absolute top-[-40px]"
14035
+ }, /*#__PURE__*/React__default.createElement("div", {
14036
+ className: "text-[#A85A09]"
14037
+ }, /*#__PURE__*/React__default.createElement("svg", {
14038
+ width: "39",
14039
+ height: "28",
14040
+ viewBox: "0 0 39 28",
14041
+ fill: "none",
14042
+ xmlns: "http://www.w3.org/2000/svg"
14043
+ }, /*#__PURE__*/React__default.createElement("path", {
14044
+ d: "M34.5852 25.8793C34.9242 26.5446 34.4409 27.3333 33.6942 27.3333H27.7867C27.4106 27.3333 27.0664 27.1223 26.8957 26.7873L21.7391 16.6666V3.66663C21.7391 2.00977 23.0822 0.666626 24.7391 0.666626H35.0435C36.7003 0.666626 38.0435 2.00977 38.0435 3.66663V16.6666H29.8913L34.5852 25.8793ZM12.8461 25.8793C13.185 26.5446 12.7017 27.3333 11.955 27.3333H6.0475C5.67146 27.3333 5.3272 27.1223 5.15649 26.7873L-0.000110626 16.6666V3.66663C-0.000110626 2.00977 1.34304 0.666626 2.99989 0.666626H13.3043C14.9611 0.666626 16.3043 2.00977 16.3043 3.66663V16.6666H8.15208L12.8461 25.8793Z",
14045
+ fill: "currentColor"
14046
+ }))), /*#__PURE__*/React__default.createElement("img", {
14047
+ src: item === null || item === void 0 ? void 0 : item.avatar,
14048
+ className: " w-20 object-cover h-20 rounded-full"
14049
+ })), /*#__PURE__*/React__default.createElement("div", {
14050
+ className: "p-4 flex flex-col gap-2"
14051
+ }, /*#__PURE__*/React__default.createElement("div", {
14052
+ className: "text-lg text-textHeading md:text-2xl"
14053
+ }, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
14054
+ className: "w-full border border-secondary"
14055
+ }), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.content), /*#__PURE__*/React__default.createElement("div", {
14056
+ className: "ms-auto"
14057
+ }, /*#__PURE__*/React__default.createElement(RatingStar, {
14058
+ star: (item === null || item === void 0 ? void 0 : item.rate) || 5,
14059
+ color: "#A85A09"
14060
+ })))));
14061
+ }))));
14062
+ };
14063
+
13261
14064
  var CustomerRating10 = function CustomerRating10(props) {
13262
14065
  var _data$data;
13263
14066
  var _props$shopConfigStyl = props.shopConfigStyle,
@@ -13432,7 +14235,7 @@ var Gallery1 = function Gallery1(props) {
13432
14235
  }));
13433
14236
  };
13434
14237
 
13435
- var Gallery1$1 = function Gallery1(props) {
14238
+ var Gallery2 = function Gallery2(props) {
13436
14239
  var _data$data, _data$data$slice, _data$data2, _data$data2$slice, _data$data3, _data$data3$slice;
13437
14240
  var _props$shopConfigStyl = props.shopConfigStyle,
13438
14241
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
@@ -13452,25 +14255,49 @@ var Gallery1$1 = function Gallery1(props) {
13452
14255
  }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$slice = _data$data.slice(0, 2)) === null || _data$data$slice === void 0 ? void 0 : _data$data$slice.map(function (item, index) {
13453
14256
  return /*#__PURE__*/React__default.createElement("img", {
13454
14257
  src: item === null || item === void 0 ? void 0 : item.srcImage,
13455
- className: "w-full h-full object-cover rounded-xl md:rounded-2xl"
14258
+ className: "w-full h-full object-cover rounded-lg md:rounded-2xl"
13456
14259
  });
13457
14260
  })), /*#__PURE__*/React__default.createElement("div", {
13458
14261
  className: "flex flex-col gap-2 md:gap-4"
13459
14262
  }, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$slice = _data$data2.slice(2, 4)) === null || _data$data2$slice === void 0 ? void 0 : _data$data2$slice.map(function (item, index) {
13460
14263
  return /*#__PURE__*/React__default.createElement("img", {
13461
14264
  src: item === null || item === void 0 ? void 0 : item.srcImage,
13462
- className: "w-full h-full object-cover rounded-xl md:rounded-2xl odd:h-[130%]"
14265
+ className: "w-full h-full object-cover rounded-lg md:rounded-2xl odd:h-[130%]"
13463
14266
  });
13464
14267
  })), /*#__PURE__*/React__default.createElement("div", {
13465
14268
  className: "flex flex-col gap-2 md:gap-4"
13466
14269
  }, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$slice = _data$data3.slice(4, 6)) === null || _data$data3$slice === void 0 ? void 0 : _data$data3$slice.map(function (item, index) {
13467
14270
  return /*#__PURE__*/React__default.createElement("img", {
13468
14271
  src: item === null || item === void 0 ? void 0 : item.srcImage,
13469
- className: "w-full h-full object-cover rounded-xl md:rounded-2xl even:h-[130%]"
14272
+ className: "w-full h-full object-cover rounded-lg md:rounded-2xl even:h-[130%]"
13470
14273
  });
13471
14274
  })))));
13472
14275
  };
13473
14276
 
14277
+ var Gallery3 = function Gallery3(props) {
14278
+ var _data$data;
14279
+ var _props$shopConfigStyl = props.shopConfigStyle,
14280
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
14281
+ _props$data = props.data,
14282
+ data = _props$data === void 0 ? {} : _props$data,
14283
+ _props$SectionTitle = props.SectionTitle,
14284
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
14285
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
14286
+ className: "" + SECTION_DEFAULT_CLASS
14287
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
14288
+ data: data,
14289
+ shopConfigStyle: shopConfigStyle
14290
+ }), /*#__PURE__*/React__default.createElement("div", {
14291
+ className: "grid grid-cols-3 gap-2 md:gap-6 mt-6 md:mt-12"
14292
+ }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, index) {
14293
+ return /*#__PURE__*/React__default.createElement("img", {
14294
+ src: item === null || item === void 0 ? void 0 : item.srcImage,
14295
+ key: "iggdf-" + index,
14296
+ className: (index === 1 || index === 5 ? "col-span-2" : "") + " w-full h-full object-cover"
14297
+ });
14298
+ }))));
14299
+ };
14300
+
13474
14301
  var PageTitle1 = function PageTitle1(props) {
13475
14302
  var _sectionData$;
13476
14303
  var data = props.data,
@@ -13501,13 +14328,13 @@ var PageTitle2 = function PageTitle2(props) {
13501
14328
  backgroundImage: "url(" + (sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage) + ")"
13502
14329
  }
13503
14330
  }, /*#__PURE__*/React__default.createElement("div", {
13504
- className: "absolute top-0 w-full h-full bg-black opacity-40 z-0"
14331
+ className: "absolute top-0 w-full h-full bg-black/60 z-0"
13505
14332
  }), /*#__PURE__*/React__default.createElement("div", {
13506
- className: "relative w-full p-20 z-10 flex flex-col gap-6 items-center justify-center"
14333
+ className: "relative w-full p-10 lg:p-20 z-10 flex flex-col gap-6 items-center justify-center"
13507
14334
  }, /*#__PURE__*/React__default.createElement("h2", {
13508
14335
  className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
13509
14336
  }, data !== null && data !== void 0 && data.sectionTitle ? data === null || data === void 0 ? void 0 : data.sectionTitle : route === null || route === void 0 ? void 0 : route.label), data !== null && data !== void 0 && data.sectionDescription ? /*#__PURE__*/React__default.createElement("div", {
13510
- className: "text-lg md:text-2xl text-white"
14337
+ className: "text-lg md:text-2xl text-white text-center"
13511
14338
  }, data === null || data === void 0 ? void 0 : data.sectionDescription) : null));
13512
14339
  };
13513
14340
 
@@ -13537,12 +14364,12 @@ var Breadcrumb1 = function Breadcrumb1(props) {
13537
14364
  return e === null || e === void 0 ? void 0 : e.length;
13538
14365
  })) === null || _route$route$split$fi === void 0 ? void 0 : _route$route$split$fi.slice(0, 2);
13539
14366
  items = (_items = items) === null || _items === void 0 ? void 0 : _items.map(function (e) {
13540
- var _e, _e$replace, _e$replace$replace, _e$replace$replace$re;
14367
+ var _e, _e$replace, _e$replace$replace, _e$replace$replace$re, _e$replace$replace$re2;
13541
14368
  if (e === "product") e = "products";else if (e === "service") e = "services";
13542
14369
  return (routes === null || routes === void 0 ? void 0 : routes.find(function (r) {
13543
14370
  return (r === null || r === void 0 ? void 0 : r.name) === e;
13544
14371
  })) || {
13545
- label: (_e = e) === null || _e === void 0 ? void 0 : (_e$replace = _e.replace(/-{3}/g, "###")) === null || _e$replace === void 0 ? void 0 : (_e$replace$replace = _e$replace.replace(/-/g, " ")) === null || _e$replace$replace === void 0 ? void 0 : (_e$replace$replace$re = _e$replace$replace.replace(/###/g, "-")) === null || _e$replace$replace$re === void 0 ? void 0 : _e$replace$replace$re.replace(/~/g, "/")
14372
+ label: (_e = e) === null || _e === void 0 ? void 0 : (_e$replace = _e.replace(/pct/g, '%')) === null || _e$replace === void 0 ? void 0 : (_e$replace$replace = _e$replace.replace(/fs/g, '/')) === null || _e$replace$replace === void 0 ? void 0 : (_e$replace$replace$re = _e$replace$replace.replace(/amp/g, '&')) === null || _e$replace$replace$re === void 0 ? void 0 : (_e$replace$replace$re2 = _e$replace$replace$re.replace(/-/g, ' ')) === null || _e$replace$replace$re2 === void 0 ? void 0 : _e$replace$replace$re2.replace(/hyp/g, '-')
13546
14373
  };
13547
14374
  });
13548
14375
  (_items2 = items) === null || _items2 === void 0 ? void 0 : _items2.unshift({
@@ -13550,7 +14377,6 @@ var Breadcrumb1 = function Breadcrumb1(props) {
13550
14377
  label: "Trang chủ",
13551
14378
  route: "/"
13552
14379
  });
13553
- console.log(items);
13554
14380
  setItems(items);
13555
14381
  };
13556
14382
  return /*#__PURE__*/React__default.createElement("div", {
@@ -13588,9 +14414,9 @@ var PageTitle3 = function PageTitle3(props) {
13588
14414
  backgroundImage: "url(" + (sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.srcImage) + ")"
13589
14415
  }
13590
14416
  }, /*#__PURE__*/React__default.createElement("div", {
13591
- className: "absolute top-0 w-full h-full bg-black opacity-60 z-0"
14417
+ className: "absolute top-0 w-full h-full bg-black/60 z-0"
13592
14418
  }), /*#__PURE__*/React__default.createElement("div", {
13593
- className: "relative w-full p-20 z-10 flex flex-col items-center justify-center"
14419
+ className: "relative w-full pt-8 md:p-2 md:p-12 lg:p-20 z-10 flex flex-col items-center justify-center"
13594
14420
  }, /*#__PURE__*/React__default.createElement("h2", {
13595
14421
  className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center font-headingFont"
13596
14422
  }, route === null || route === void 0 ? void 0 : (_route$route = route.route) === null || _route$route === void 0 ? void 0 : (_route$route$split = _route$route.split("/")) === null || _route$route$split === void 0 ? void 0 : (_route$route$split$fi = _route$route$split.filter(function (e) {
@@ -14063,6 +14889,10 @@ var FormCheckout = forwardRef(function (props, ref) {
14063
14889
  })));
14064
14890
  });
14065
14891
 
14892
+ var dayjs_min = createCommonjsModule(function (module, exports) {
14893
+ !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
14894
+ });
14895
+
14066
14896
  var OrderControllerWithoutLogin = function OrderControllerWithoutLogin(props) {
14067
14897
  _objectDestructuringEmpty(props);
14068
14898
  var draftOrderWithoutLogin = function draftOrderWithoutLogin(shopId, dataOrder) {
@@ -14732,7 +15562,7 @@ var SearchBar6 = function SearchBar6(props) {
14732
15562
  }
14733
15563
  };
14734
15564
  return /*#__PURE__*/React__default.createElement("div", {
14735
- 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 ",
15565
+ className: "w-full flex flex-col justify-center px-3 md:px-6 gap-2 md:gap-4 lg:gap-6 items-center py-6 md:py-12 lg:px-20",
14736
15566
  style: {
14737
15567
  background: "url(" + (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.srcImage) + ")",
14738
15568
  backgroundPosition: "center",
@@ -14791,7 +15621,7 @@ var ShopHighlights2 = function ShopHighlights2(props) {
14791
15621
  }) : /*#__PURE__*/React__default.createElement("img", {
14792
15622
  src: item === null || item === void 0 ? void 0 : item.srcImage,
14793
15623
  alt: "logo",
14794
- className: "w-16 h-16 p-3 rounded-full bg-primary"
15624
+ className: "w-16 h-16 p-3 rounded-full object-cover bg-primary"
14795
15625
  }), /*#__PURE__*/React__default.createElement("div", {
14796
15626
  className: "font-medium text-lg"
14797
15627
  }, 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", {
@@ -14823,7 +15653,7 @@ var ShopHighlights5 = function ShopHighlights5(props) {
14823
15653
  }) : /*#__PURE__*/React__default.createElement("img", {
14824
15654
  src: item === null || item === void 0 ? void 0 : item.srcImage,
14825
15655
  alt: "logo",
14826
- className: "w-16 h-16 rounded-full bg-primary"
15656
+ className: "w-16 h-16 rounded-full object-cover bg-primary"
14827
15657
  }), /*#__PURE__*/React__default.createElement("div", {
14828
15658
  className: "font-semibold text-xl text-textHeading pt-2 border-t border-textHeading"
14829
15659
  }, 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", {
@@ -14853,7 +15683,7 @@ var ShopHighlights6 = function ShopHighlights6(props) {
14853
15683
  }) : /*#__PURE__*/React__default.createElement("img", {
14854
15684
  src: item === null || item === void 0 ? void 0 : item.srcImage,
14855
15685
  alt: "logo",
14856
- className: "w-16 h-16"
15686
+ className: "w-16 h-16 object-cover"
14857
15687
  }), /*#__PURE__*/React__default.createElement("div", {
14858
15688
  className: " w-44 h-0.5 rounded-full bg-primary"
14859
15689
  }), /*#__PURE__*/React__default.createElement("div", {
@@ -14945,7 +15775,7 @@ var ShopHighlights8 = function ShopHighlights8(props) {
14945
15775
  className: "flex flex-col h-full gap-3"
14946
15776
  }, /*#__PURE__*/React__default.createElement("img", {
14947
15777
  src: item === null || item === void 0 ? void 0 : item.srcImage,
14948
- className: "object-cover"
15778
+ className: "object-cover rounded-lg"
14949
15779
  }), /*#__PURE__*/React__default.createElement("div", {
14950
15780
  className: "text-2xl text-textBody"
14951
15781
  }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
@@ -14954,6 +15784,89 @@ var ShopHighlights8 = function ShopHighlights8(props) {
14954
15784
  })));
14955
15785
  };
14956
15786
 
15787
+ var ShopHighlights9 = function ShopHighlights9(props) {
15788
+ var data = props.data,
15789
+ _props$Link = props.Link,
15790
+ Link = _props$Link === void 0 ? null : _props$Link,
15791
+ _props$SectionTitle = props.SectionTitle,
15792
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
15793
+ var sectionData = data === null || data === void 0 ? void 0 : data.data;
15794
+ return /*#__PURE__*/React__default.createElement("div", {
15795
+ className: SECTION_CLASS + " flex flex-col gap-6 md:gap-10"
15796
+ }, /*#__PURE__*/React__default.createElement(SectionTitle, {
15797
+ data: data
15798
+ }), /*#__PURE__*/React__default.createElement("div", {
15799
+ className: "grid grid-cols-1 lg:grid-cols-2 gap-4 lg:gap-x-12 lg:gap-y-6"
15800
+ }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
15801
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
15802
+ Link: Link,
15803
+ href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
15804
+ key: "kdf-" + index
15805
+ }, /*#__PURE__*/React__default.createElement("div", {
15806
+ className: "flex flex-col md:flex-row h-full gap-4"
15807
+ }, /*#__PURE__*/React__default.createElement("img", {
15808
+ src: item === null || item === void 0 ? void 0 : item.srcImage,
15809
+ className: "object-cover rounded-lg w-full md:min-w-60 md:max-w-60"
15810
+ }), /*#__PURE__*/React__default.createElement("div", {
15811
+ className: "flex flex-col gap-2"
15812
+ }, /*#__PURE__*/React__default.createElement("div", {
15813
+ className: "text-lg font-semibold text-textHeading"
15814
+ }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
15815
+ className: "w-1/3 border border-stroke"
15816
+ }), /*#__PURE__*/React__default.createElement("div", {
15817
+ className: "flex-grow text-textBody leading-relaxed"
15818
+ }, item === null || item === void 0 ? void 0 : item.description))));
15819
+ })));
15820
+ };
15821
+
15822
+ var ShopHighlights10 = function ShopHighlights10(props) {
15823
+ var data = props.data,
15824
+ _props$Link = props.Link,
15825
+ Link = _props$Link === void 0 ? null : _props$Link;
15826
+ var sectionData = data === null || data === void 0 ? void 0 : data.data;
15827
+ return /*#__PURE__*/React__default.createElement("div", {
15828
+ className: "pt-10"
15829
+ }, /*#__PURE__*/React__default.createElement("div", {
15830
+ className: "relative overflow-hidden w-full"
15831
+ }, /*#__PURE__*/React__default.createElement("svg", {
15832
+ viewBox: "0 0 1440 105",
15833
+ className: "text-[#FFE7CC] w-[105%]",
15834
+ fill: "none",
15835
+ xmlns: "http://www.w3.org/2000/svg"
15836
+ }, /*#__PURE__*/React__default.createElement("path", {
15837
+ d: "M439.5 55.3739C216.5 71.3734 77 37.8735 0 0.747667V104.606H1440C1410.56 83.7584 1313.93 35.6959 1162.92 10.2239C974.151 -21.6161 726.714 34.7672 439.5 55.3739Z",
15838
+ fill: "currentColor"
15839
+ })), /*#__PURE__*/React__default.createElement("div", {
15840
+ className: "text-primary w-[105%] absolute top-2"
15841
+ }, /*#__PURE__*/React__default.createElement("svg", {
15842
+ viewBox: "0 0 1440 104",
15843
+ fill: "none",
15844
+ xmlns: "http://www.w3.org/2000/svg"
15845
+ }, /*#__PURE__*/React__default.createElement("path", {
15846
+ d: "M439.5 54.6864C216.5 70.6859 77 37.186 0 0.0601582V103.918H1440C1410.56 83.0709 1313.93 35.0084 1162.92 9.53638C974.151 -22.3036 726.714 34.0797 439.5 54.6864Z",
15847
+ fill: "currentColor"
15848
+ })))), /*#__PURE__*/React__default.createElement("div", {
15849
+ className: SECTION_CLASS + " mt-0 md:mt-0 grid grid-cols-1 md:grid-cols-3 gap-4 md:gap-4 bg-primary py-10"
15850
+ }, sectionData === null || sectionData === void 0 ? void 0 : sectionData.map(function (item, index) {
15851
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
15852
+ Link: Link,
15853
+ href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
15854
+ key: "kdf-" + index
15855
+ }, /*#__PURE__*/React__default.createElement("div", {
15856
+ className: "flex flex-col h-full gap-6"
15857
+ }, /*#__PURE__*/React__default.createElement("div", {
15858
+ className: "flex flex-col gap-3 items-center"
15859
+ }, /*#__PURE__*/React__default.createElement("div", {
15860
+ className: "text-2xl text-center text-textButton"
15861
+ }, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React__default.createElement("div", {
15862
+ className: "flex-grow text-lg leading-relaxed text-center text-textSecondary"
15863
+ }, item === null || item === void 0 ? void 0 : item.description)), /*#__PURE__*/React__default.createElement("img", {
15864
+ src: item === null || item === void 0 ? void 0 : item.srcImage,
15865
+ className: "aspect-video object-cover mt-auto border-4 border-secondary"
15866
+ })));
15867
+ })));
15868
+ };
15869
+
14957
15870
  var VideoFull1 = function VideoFull1(props) {
14958
15871
  var _data$data, _data$data$;
14959
15872
  var shopConfigStyle = props.shopConfigStyle,
@@ -15041,11 +15954,6 @@ var NewsController = function NewsController(props) {
15041
15954
  var _response$data2, _response$data2$data, _response$data3, _response$data3$data;
15042
15955
  setNewsArticles(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$data = _response$data2.data) === null || _response$data2$data === void 0 ? void 0 : _response$data2$data.content);
15043
15956
  setPage(response === null || response === void 0 ? void 0 : (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : (_response$data3$data = _response$data3.data) === null || _response$data3$data === void 0 ? void 0 : _response$data3$data.totalElements);
15044
- var url = new URL(window.location.href);
15045
- if (/^(\/(tin-tuc-theo-danh-muc))\/[^/]+-\d+$/.test(url.pathname)) {
15046
- url.pathname = url.pathname.replace(/\/[^/]+-\d+$/, "");
15047
- window.history.replaceState({}, '', url.pathname + url.search);
15048
- }
15049
15957
  }
15050
15958
  setLoading(false);
15051
15959
  });
@@ -15279,7 +16187,8 @@ var News1 = function News1(props) {
15279
16187
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
15280
16188
  _props$Link = props.Link,
15281
16189
  Link = _props$Link === void 0 ? null : _props$Link,
15282
- catId = props.catId;
16190
+ _props$catId = props.catId,
16191
+ catId = _props$catId === void 0 ? "" : _props$catId;
15283
16192
  var _useState = useState({
15284
16193
  page: 0,
15285
16194
  sort: "timeUpdate,DESC",
@@ -15319,6 +16228,18 @@ var News1 = function News1(props) {
15319
16228
  setCategorySelected(category);
15320
16229
  }
15321
16230
  }, [newsCategories]);
16231
+ var handleSelectedCateogry = function handleSelectedCateogry(item) {
16232
+ if (catId) {
16233
+ var newUrl = getLinkNewsByCategory(item);
16234
+ window.history.replaceState(null, '', newUrl);
16235
+ }
16236
+ setCategorySelected(item);
16237
+ setParams(function (prev) {
16238
+ return _extends({}, prev, {
16239
+ catId: item === null || item === void 0 ? void 0 : item.catId
16240
+ });
16241
+ });
16242
+ };
15322
16243
  return /*#__PURE__*/React__default.createElement("div", {
15323
16244
  className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-3 gap-6"
15324
16245
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -15339,12 +16260,7 @@ var News1 = function News1(props) {
15339
16260
  className: "px-6 hover:bg-gray-100 hover:text-primary cursor-pointer " + ((item === null || item === void 0 ? void 0 : item.catId) === (categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catId) ? "bg-gray-100 text-primary" : "") + " ",
15340
16261
  key: "sdjfdh-" + index,
15341
16262
  onClick: function onClick() {
15342
- setCategorySelected(item);
15343
- setParams(function (prev) {
15344
- return _extends({}, prev, {
15345
- catId: item === null || item === void 0 ? void 0 : item.catId
15346
- });
15347
- });
16263
+ handleSelectedCateogry(item);
15348
16264
  }
15349
16265
  }, /*#__PURE__*/React__default.createElement("div", {
15350
16266
  className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
@@ -15398,12 +16314,7 @@ var News1 = function News1(props) {
15398
16314
  className: "px-4 hover:bg-gray-100 hover:text-primary cursor-pointer " + ((item === null || item === void 0 ? void 0 : item.catId) === (categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catId) ? "bg-gray-100 text-primary" : "") + " ",
15399
16315
  key: "sdjfdh-" + index,
15400
16316
  onClick: function onClick() {
15401
- setCategorySelected(item);
15402
- setParams(function (prev) {
15403
- return _extends({}, prev, {
15404
- catId: item === null || item === void 0 ? void 0 : item.catId
15405
- });
15406
- });
16317
+ handleSelectedCateogry(item);
15407
16318
  }
15408
16319
  }, /*#__PURE__*/React__default.createElement("div", {
15409
16320
  className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
@@ -15499,7 +16410,7 @@ var NewsDetail1 = function NewsDetail1(props) {
15499
16410
  }), (newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
15500
16411
  className: "top-6 block md:hidden"
15501
16412
  }, /*#__PURE__*/React__default.createElement("div", {
15502
- className: "px-6 bg-primary rounded-t-lg text-lg text-textButton text-center"
16413
+ className: "px-6 py-3 bg-primary rounded-t-lg text-lg text-textButton text-center"
15503
16414
  }, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
15504
16415
  className: "rounded-b-lg bg-bgSecondary"
15505
16416
  }, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {
@@ -15555,5 +16466,5 @@ var NewsDetail1 = function NewsDetail1(props) {
15555
16466
  }))) : null);
15556
16467
  };
15557
16468
 
15558
- export { About1, About5, About6, Address1, Banner1, Banner2, Banner3, Banner7, BannerFull1, BannerFull2, Booking1, BookingForm6, BookingTable1, Breadcrumb1, Button, Carts1, Contact1, CustomerRating1, CustomerRating10, CustomerRating5, CustomerRating6, CustomerRating8, DateTimePicker, Employees1, Features2, Features3, Footer1, Footer7, Gallery1, Gallery1$1 as Gallery2, Hero1, Hero10, Hero11, Hero12, Hero13, Hero2, Hero5, Hero6, Input, InputPhoneNumber, Links1, ModalNotification, NavBar1, NavBar7, News1, NewsDetail1, NewsHighlight1, PageTitle1, PageTitle2, PageTitle3, Partner1, ProductCategory2, ProductDetail10, ProductDetail11, ProductHighlight1, ProductHot1, ProductHot3, ProductImage, ProductItem2, ProductItem3, ProductItem4, ProductItem5, ProductItem6, ProductItem7, ProductItem8, ProductList5, ProductList7, ProductSale2, ProductSearch1, Products10, Products11, Products12, Products2, Products3, Products9, ProductsTop1, SearchBar2, SearchBar5, SearchBar6, SearchProduct1, SectionTitle1, SectionTitle2, SectionTitle3, SectionTitle4, Select$1 as Select, ServiceDetail1, ShopHighlights2, ShopHighlights5, ShopHighlights6, ShopHighlights7, ShopHighlights8, TextArea, TreatmentDetail1, TreatmentItem1, TreatmentsCategory7, TreatmentsList6, TreatmentsList7, VideoFull1 };
16469
+ export { About1, About5, About6, Address1, Banner1, Banner2, Banner3, Banner4, Banner7, BannerFull1, BannerFull2, Booking1, BookingForm6, BookingTable1, Breadcrumb1, Button, Carts1, Contact1, CustomerRating1, CustomerRating10, CustomerRating5, CustomerRating6, CustomerRating8, CustomerRating9, DateTimePicker, Employees1, Features2, Features3, Footer1, Footer7, Gallery1, Gallery2, Gallery3, Hero1, Hero10, Hero11, Hero12, Hero13, Hero14, Hero15, Hero16, Hero2, Hero5, Hero6, Input, InputPhoneNumber, Links1, ModalNotification, NavBar1, NavBar7, News1, NewsDetail1, NewsHighlight1, PageTitle1, PageTitle2, PageTitle3, Partner1, ProductCategory2, ProductDetail10, ProductDetail11, ProductHighlight1, ProductHot1, ProductHot3, ProductImage, ProductItem10, ProductItem11, ProductItem2, ProductItem3, ProductItem4, ProductItem5, ProductItem6, ProductItem7, ProductItem8, ProductItem9, ProductList5, ProductList7, ProductSale2, ProductSearch1, Products10, Products11, Products12, Products14, Products2, Products3, Products9, ProductsTop1, SearchBar2, SearchBar5, SearchBar6, SearchProduct1, SectionTitle1, SectionTitle2, SectionTitle3, SectionTitle4, SectionTitle5, Select$1 as Select, ServiceDetail1, ShopHighlights10, ShopHighlights2, ShopHighlights5, ShopHighlights6, ShopHighlights7, ShopHighlights8, ShopHighlights9, TextArea, TreatmentDetail1, TreatmentItem1, TreatmentsCategory7, TreatmentsList6, TreatmentsList7, VideoFull1 };
15559
16470
  //# sourceMappingURL=index.modern.js.map