nvis-fe-cms-libs 2.1.5 → 2.1.6

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.
@@ -844,7 +844,7 @@ const PartnerCard = ({ partner, idx, t, getLogoUrl, isDarkMode }) => {
844
844
  }
845
845
  );
846
846
  };
847
- function useWindowSize$1() {
847
+ function useWindowSize$3() {
848
848
  const [width, setWidth] = useState(
849
849
  typeof window !== "undefined" ? window.innerWidth : 1200
850
850
  );
@@ -856,13 +856,13 @@ function useWindowSize$1() {
856
856
  }, []);
857
857
  return width;
858
858
  }
859
- const PartnersSection = ({ data, t, imageBaseUrl = "", section }) => {
859
+ const PartnersSection$1 = ({ data, t, imageBaseUrl = "", section }) => {
860
860
  var _a, _b, _c;
861
861
  const partnersData = ((_c = (_b = (_a = data == null ? void 0 : data.sectionDataBindingItems) == null ? void 0 : _a.filter((item) => item == null ? void 0 : item.data)) == null ? void 0 : _b.sort((a, b) => (a.sortOrder || 0) - (b.sortOrder || 0))) == null ? void 0 : _c.map((item) => item.data)) || [];
862
862
  const [currentPartnerSlide, setCurrentPartnerSlide] = useState(0);
863
863
  const [partnersVisible, setPartnersVisible] = useState(false);
864
864
  const partnersRef = useRef(null);
865
- const windowWidth = useWindowSize$1();
865
+ const windowWidth = useWindowSize$3();
866
866
  const sectionTitle = (section == null ? void 0 : section.title) || t("partners.sectionTitle") || "Đối tác";
867
867
  const getLogoUrl = (logoUrl) => {
868
868
  if (!logoUrl) return null;
@@ -948,6 +948,240 @@ const PartnersSection = ({ data, t, imageBaseUrl = "", section }) => {
948
948
  ) })
949
949
  ] }) });
950
950
  };
951
+ const PartnerCard_2 = ({ partner, idx, t, getLogoUrl, isDarkMode }) => {
952
+ const itemRef = useRef(null);
953
+ const [visible, setVisible] = useState(false);
954
+ const [isHovered, setIsHovered] = useState(false);
955
+ useEffect(() => {
956
+ const observer = new IntersectionObserver(
957
+ (entries) => {
958
+ entries.forEach((entry) => {
959
+ if (entry.isIntersecting) {
960
+ setVisible(true);
961
+ observer.unobserve(entry.target);
962
+ }
963
+ });
964
+ },
965
+ { threshold: 0.2 }
966
+ );
967
+ if (itemRef.current) observer.observe(itemRef.current);
968
+ return () => itemRef.current && observer.unobserve(itemRef.current);
969
+ }, []);
970
+ const logoSrc = getLogoUrl(partner.logoUrl);
971
+ const cardContent = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
972
+ isDarkMode && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
973
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
974
+ "div",
975
+ {
976
+ className: "absolute w-12 h-12 rounded-full",
977
+ style: { left: "10%", top: "20%", background: "rgba(255,255,255,0.05)" }
978
+ }
979
+ ),
980
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
981
+ "div",
982
+ {
983
+ className: "absolute w-10 h-10 rounded-full",
984
+ style: { right: "30%", bottom: "10%", background: "rgba(255,255,255,0.05)" }
985
+ }
986
+ ),
987
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
988
+ "div",
989
+ {
990
+ className: "absolute w-14 h-14 rounded-md",
991
+ style: { left: "20%", bottom: "30%", background: "rgba(255,255,255,0.05)" }
992
+ }
993
+ ),
994
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
995
+ "div",
996
+ {
997
+ className: "absolute inset-0 opacity-20",
998
+ style: {
999
+ backgroundImage: 'url("data:image/svg+xml,%3Csvg width=\\"60\\" height=\\"60\\" viewBox=\\"0 0 60 60\\" xmlns=\\"http://www.w3.org/2000/svg\\"%3E%3Cg fill=\\"none\\" fill-rule=\\"evenodd\\"%3E%3Cg fill=\\"%23ffffff\\" fill-opacity=\\"0.05\\"%3E%3Ccircle cx=\\"30\\" cy=\\"30\\" r=\\"2\\"/\\%3E%3C/g\\%3E%3C/g\\%3E%3C/svg\\%3E")'
1000
+ }
1001
+ }
1002
+ )
1003
+ ] }),
1004
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
1005
+ "div",
1006
+ {
1007
+ className: "w-full rounded-lg overflow-hidden bg-surface flex items-center justify-center p-4",
1008
+ style: {
1009
+ height: "75%",
1010
+ borderWidth: "1px",
1011
+ borderStyle: "solid",
1012
+ borderColor: isHovered ? "var(--brand-primary)" : "var(--border-color)",
1013
+ backgroundColor: isHovered ? "var(--bg-body)" : "var(--bg-surface)",
1014
+ transition: "all 0.3s ease"
1015
+ },
1016
+ children: logoSrc ? /* @__PURE__ */ jsxRuntimeExports.jsx(
1017
+ "img",
1018
+ {
1019
+ src: logoSrc,
1020
+ alt: partner.name,
1021
+ className: "max-w-full max-h-full object-contain",
1022
+ style: {
1023
+ filter: isHovered ? "grayscale(0) opacity(1)" : isDarkMode ? "grayscale(0.3) opacity(0.8)" : "grayscale(0.2) opacity(0.9)",
1024
+ transform: isHovered ? "scale(1.05)" : "scale(1)",
1025
+ transition: "all 0.3s ease"
1026
+ }
1027
+ }
1028
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full h-full bg-gradient-brand flex items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-white font-bold text-center text-small px-1", children: partner.name }) })
1029
+ }
1030
+ ),
1031
+ partner.websiteUrl && /* @__PURE__ */ jsxRuntimeExports.jsxs(
1032
+ "div",
1033
+ {
1034
+ className: "card-link justify-center",
1035
+ style: {
1036
+ opacity: isHovered ? 1 : 0,
1037
+ transform: isHovered ? "translateY(0)" : "translateY(4px)",
1038
+ transition: "all 0.3s ease"
1039
+ },
1040
+ children: [
1041
+ t("partners.viewDetails") || "Xem chi tiết",
1042
+ " →"
1043
+ ]
1044
+ }
1045
+ )
1046
+ ] });
1047
+ const baseClasses = `card items-center justify-center transition-all duration-700 ease-out overflow-hidden ${visible ? "opacity-100 scale-100" : "opacity-0 scale-75"}`;
1048
+ const dynamicStyles = {
1049
+ transitionDelay: `${idx * 150}ms`
1050
+ };
1051
+ if (partner.websiteUrl) {
1052
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
1053
+ "a",
1054
+ {
1055
+ ref: itemRef,
1056
+ href: partner.websiteUrl,
1057
+ target: "_blank",
1058
+ rel: "noopener noreferrer",
1059
+ className: `${baseClasses} cursor-pointer`,
1060
+ style: __spreadProps(__spreadValues({}, dynamicStyles), {
1061
+ textDecoration: "none"
1062
+ }),
1063
+ onMouseEnter: () => setIsHovered(true),
1064
+ onMouseLeave: () => setIsHovered(false),
1065
+ children: cardContent
1066
+ }
1067
+ );
1068
+ }
1069
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
1070
+ "div",
1071
+ {
1072
+ ref: itemRef,
1073
+ className: baseClasses,
1074
+ style: dynamicStyles,
1075
+ onMouseEnter: () => setIsHovered(true),
1076
+ onMouseLeave: () => setIsHovered(false),
1077
+ children: cardContent
1078
+ }
1079
+ );
1080
+ };
1081
+ function useWindowSize$2() {
1082
+ const [width, setWidth] = useState(
1083
+ typeof window !== "undefined" ? window.innerWidth : 1200
1084
+ );
1085
+ useEffect(() => {
1086
+ if (typeof window === "undefined") return;
1087
+ const handleResize = () => setWidth(window.innerWidth);
1088
+ window.addEventListener("resize", handleResize);
1089
+ return () => window.removeEventListener("resize", handleResize);
1090
+ }, []);
1091
+ return width;
1092
+ }
1093
+ const PartnersSection = ({ data, t, imageBaseUrl = "", section }) => {
1094
+ var _a, _b, _c;
1095
+ const partnersData = ((_c = (_b = (_a = data == null ? void 0 : data.sectionDataBindingItems) == null ? void 0 : _a.filter((item) => item == null ? void 0 : item.data)) == null ? void 0 : _b.sort((a, b) => (a.sortOrder || 0) - (b.sortOrder || 0))) == null ? void 0 : _c.map((item) => item.data)) || [];
1096
+ const [currentPartnerSlide, setCurrentPartnerSlide] = useState(0);
1097
+ const [partnersVisible, setPartnersVisible] = useState(false);
1098
+ const partnersRef = useRef(null);
1099
+ const windowWidth = useWindowSize$2();
1100
+ const sectionTitle = (section == null ? void 0 : section.title) || t("partners.sectionTitle") || "Đối tác";
1101
+ const getLogoUrl = (logoUrl) => {
1102
+ if (!logoUrl) return null;
1103
+ if (logoUrl.startsWith("http")) return logoUrl;
1104
+ return `${imageBaseUrl}${logoUrl}`;
1105
+ };
1106
+ const partners = useMemo(() => {
1107
+ const getPerSlide = () => {
1108
+ if (windowWidth < 640) return 2;
1109
+ if (windowWidth < 1024) return 3;
1110
+ return 4;
1111
+ };
1112
+ const grouped = [];
1113
+ const perSlide = getPerSlide();
1114
+ for (let i = 0; i < partnersData.length; i += perSlide) {
1115
+ grouped.push(partnersData.slice(i, i + perSlide));
1116
+ }
1117
+ return grouped;
1118
+ }, [partnersData, windowWidth]);
1119
+ useEffect(() => {
1120
+ if (partners.length > 1) {
1121
+ const interval = setInterval(() => {
1122
+ setCurrentPartnerSlide((prev) => (prev + 1) % partners.length);
1123
+ }, 5e3);
1124
+ return () => clearInterval(interval);
1125
+ }
1126
+ }, [partners.length]);
1127
+ useEffect(() => {
1128
+ const observer = new IntersectionObserver(
1129
+ (entries) => {
1130
+ entries.forEach((entry) => {
1131
+ if (entry.isIntersecting) {
1132
+ setPartnersVisible(true);
1133
+ observer.unobserve(entry.target);
1134
+ }
1135
+ });
1136
+ },
1137
+ { threshold: 0.1 }
1138
+ );
1139
+ if (partnersRef.current) observer.observe(partnersRef.current);
1140
+ return () => partnersRef.current && observer.unobserve(partnersRef.current);
1141
+ }, []);
1142
+ if (!partnersData.length) return null;
1143
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(SectionWrapper, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: [
1144
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center mb-12", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "inline-block px-4 py-2 rounded-full border border-[var(--border-color)] bg-surface text-subtitle font-semibold text-brand-primary shadow-sm", children: [
1145
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeIcon, { name: "icon-partner", folder: "PartnersSection", className: "w-4 h-4 icon-gradient" }),
1146
+ " ",
1147
+ sectionTitle
1148
+ ] }) }),
1149
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: partnersRef, className: "relative overflow-hidden", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
1150
+ "div",
1151
+ {
1152
+ className: `transition-all duration-1000 ease-out ${partnersVisible ? "opacity-100 scale-100" : "opacity-0 scale-95"}`,
1153
+ children: [
1154
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative h-56 md:h-64 lg:h-72 xl:h-80 mb-8", children: partners.map((group, slideIndex) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1155
+ "div",
1156
+ {
1157
+ className: `absolute inset-0 transition-all duration-1000 ease-in-out ${slideIndex === currentPartnerSlide ? "opacity-100 translate-x-0" : slideIndex < currentPartnerSlide ? "opacity-0 -translate-x-full" : "opacity-0 translate-x-full"}`,
1158
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-6 h-full px-2", children: group.map((partner, idx) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1159
+ PartnerCard_2,
1160
+ {
1161
+ partner,
1162
+ idx,
1163
+ t,
1164
+ getLogoUrl
1165
+ },
1166
+ partner.id || idx
1167
+ )) })
1168
+ },
1169
+ slideIndex
1170
+ )) }),
1171
+ partners.length > 1 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center space-x-2", children: partners.map((_, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1172
+ "button",
1173
+ {
1174
+ onClick: () => setCurrentPartnerSlide(index2),
1175
+ className: `w-3 h-3 rounded-full transition-all duration-300 ${index2 === currentPartnerSlide ? "bg-brand-primary scale-125 shadow-lg" : "bg-surface hover:bg-brand-primary/70"}`,
1176
+ "aria-label": `Slide ${index2 + 1}`
1177
+ },
1178
+ index2
1179
+ )) })
1180
+ ]
1181
+ }
1182
+ ) })
1183
+ ] }) });
1184
+ };
951
1185
  const MilestoneSection = ({ data, t, isDarkMode, getMilestoneTimeline, section }) => {
952
1186
  const [milestones, setMilestones] = useState([]);
953
1187
  const [loading, setLoading] = useState(true);
@@ -1121,7 +1355,7 @@ const TestimonialsSection = ({ data, t, section }) => {
1121
1355
  ] })
1122
1356
  ] }) });
1123
1357
  };
1124
- const PartnerListCard = ({ partner, idx, t, isDarkMode, getLogoUrl }) => {
1358
+ const PartnerListCard$1 = ({ partner, idx, t, isDarkMode, getLogoUrl }) => {
1125
1359
  const logoUrl = getLogoUrl(partner.logoUrl);
1126
1360
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
1127
1361
  "a",
@@ -1201,7 +1435,7 @@ const PartnerListCard = ({ partner, idx, t, isDarkMode, getLogoUrl }) => {
1201
1435
  }
1202
1436
  );
1203
1437
  };
1204
- function useWindowSize() {
1438
+ function useWindowSize$1() {
1205
1439
  const [width, setWidth] = useState(
1206
1440
  typeof window !== "undefined" ? window.innerWidth : 1200
1207
1441
  );
@@ -1213,6 +1447,230 @@ function useWindowSize() {
1213
1447
  return width;
1214
1448
  }
1215
1449
  const PartnerListSection = ({ t, getPartnerList, imageBaseUrl = "", section }) => {
1450
+ const [partnersData, setPartnersData] = useState([]);
1451
+ const [error, setError] = useState(null);
1452
+ const [loading, setLoading] = useState(true);
1453
+ const [currentPartnerSlide, setCurrentPartnerSlide] = useState(0);
1454
+ const [partnersVisible, setPartnersVisible] = useState(false);
1455
+ const partnersRef = useRef(null);
1456
+ const windowWidth = useWindowSize$1();
1457
+ const sectionTitle = (section == null ? void 0 : section.title) || t("partners.sectionTitle");
1458
+ const getLogoUrl = (logoUrl) => {
1459
+ if (!logoUrl) return null;
1460
+ if (logoUrl.startsWith("http")) return logoUrl;
1461
+ return `${imageBaseUrl}${logoUrl}`;
1462
+ };
1463
+ useEffect(() => {
1464
+ const fetchData = () => __async(null, null, function* () {
1465
+ try {
1466
+ const res = yield getPartnerList();
1467
+ if (res.success) {
1468
+ setPartnersData(res.data || []);
1469
+ } else {
1470
+ setError(res.error || "Error fetching partners");
1471
+ }
1472
+ } catch (err) {
1473
+ setError(err.message);
1474
+ } finally {
1475
+ setLoading(false);
1476
+ }
1477
+ });
1478
+ fetchData();
1479
+ }, []);
1480
+ const partners = useMemo(() => {
1481
+ const getPerSlide = () => {
1482
+ if (windowWidth < 640) return 2;
1483
+ if (windowWidth < 1024) return 3;
1484
+ return 4;
1485
+ };
1486
+ const grouped = [];
1487
+ const perSlide = getPerSlide();
1488
+ for (let i = 0; i < partnersData.length; i += perSlide) {
1489
+ grouped.push(partnersData.slice(i, i + perSlide));
1490
+ }
1491
+ return grouped;
1492
+ }, [partnersData, windowWidth]);
1493
+ useEffect(() => {
1494
+ if (partners.length > 1) {
1495
+ const interval = setInterval(() => {
1496
+ setCurrentPartnerSlide((prev) => (prev + 1) % partners.length);
1497
+ }, 5e3);
1498
+ return () => clearInterval(interval);
1499
+ }
1500
+ }, [partners.length]);
1501
+ useEffect(() => {
1502
+ const fallbackTimer = setTimeout(() => setPartnersVisible(true), 500);
1503
+ const observer = new IntersectionObserver(
1504
+ (entries) => {
1505
+ entries.forEach((entry) => {
1506
+ if (entry.isIntersecting) {
1507
+ clearTimeout(fallbackTimer);
1508
+ setPartnersVisible(true);
1509
+ observer.unobserve(entry.target);
1510
+ }
1511
+ });
1512
+ },
1513
+ { threshold: 0.1, rootMargin: "50px" }
1514
+ );
1515
+ if (partnersRef.current) observer.observe(partnersRef.current);
1516
+ else {
1517
+ clearTimeout(fallbackTimer);
1518
+ setPartnersVisible(true);
1519
+ }
1520
+ return () => {
1521
+ clearTimeout(fallbackTimer);
1522
+ if (partnersRef.current) observer.unobserve(partnersRef.current);
1523
+ };
1524
+ }, []);
1525
+ if (loading) {
1526
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("section", { className: "py-20 text-center bg-body", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-body text-muted", children: t("partners.loading") || "Đang tải danh sách đối tác..." }) });
1527
+ }
1528
+ if (error) {
1529
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("section", { className: "py-20 text-center bg-body", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-body text-brand-secondary", children: t("partners.error") || error }) });
1530
+ }
1531
+ if (!partnersData.length) return null;
1532
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(SectionWrapper, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: [
1533
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center mb-12", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "inline-block px-4 py-2 rounded-full border border-[var(--border-color)] bg-surface text-subtitle font-semibold text-brand-primary shadow-sm", children: [
1534
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeIcon, { name: "icon-partner", folder: "PartnersSection", className: "w-4 h-4 icon-gradient" }),
1535
+ " ",
1536
+ sectionTitle
1537
+ ] }) }),
1538
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: partnersRef, className: "relative", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
1539
+ "div",
1540
+ {
1541
+ className: `transition-all duration-1000 ease-out ${partnersVisible ? "opacity-100 scale-100" : "opacity-0 scale-95"}`,
1542
+ children: [
1543
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative overflow-hidden mb-12", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { minHeight: "320px" }, children: partners.map((group, slideIndex) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1544
+ "div",
1545
+ {
1546
+ className: `absolute inset-0 w-full transition-all duration-1000 ease-in-out ${slideIndex === currentPartnerSlide ? "opacity-100 translate-x-0" : slideIndex < currentPartnerSlide ? "opacity-0 -translate-x-full" : "opacity-0 translate-x-full"}`,
1547
+ style: {
1548
+ zIndex: slideIndex === currentPartnerSlide ? 10 : 1
1549
+ },
1550
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-8 px-2", children: group.map((partner, idx) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1551
+ PartnerListCard$1,
1552
+ {
1553
+ partner,
1554
+ idx,
1555
+ t,
1556
+ getLogoUrl
1557
+ },
1558
+ partner.id || `${slideIndex}-${idx}`
1559
+ )) })
1560
+ },
1561
+ slideIndex
1562
+ )) }) }),
1563
+ partners.length > 1 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center space-x-3", style: {
1564
+ position: "relative",
1565
+ zIndex: 100,
1566
+ paddingTop: "1rem"
1567
+ }, children: partners.map((_, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1568
+ "button",
1569
+ {
1570
+ onClick: () => setCurrentPartnerSlide(index2),
1571
+ style: {
1572
+ width: "12px",
1573
+ height: "12px",
1574
+ borderRadius: "50%",
1575
+ border: "none",
1576
+ cursor: "pointer",
1577
+ transition: "all 0.3s ease",
1578
+ backgroundColor: index2 === currentPartnerSlide ? "var(--brand-primary)" : "rgba(151, 151, 151, 0.8)",
1579
+ transform: index2 === currentPartnerSlide ? "scale(1.3)" : "scale(1)"
1580
+ },
1581
+ onMouseEnter: (e) => {
1582
+ if (index2 !== currentPartnerSlide) {
1583
+ e.currentTarget.style.backgroundColor = "rgba(151, 151, 151, 0.8)";
1584
+ }
1585
+ },
1586
+ onMouseLeave: (e) => {
1587
+ if (index2 !== currentPartnerSlide) {
1588
+ e.currentTarget.style.backgroundColor = "rgba(151, 151, 151, 0.8)";
1589
+ }
1590
+ },
1591
+ "aria-label": `Slide ${index2 + 1}`
1592
+ },
1593
+ index2
1594
+ )) })
1595
+ ]
1596
+ }
1597
+ ) })
1598
+ ] }) });
1599
+ };
1600
+ const PartnerListCard = ({ partner, idx, t, isDarkMode, getLogoUrl }) => {
1601
+ const logoUrl = getLogoUrl(partner.logoUrl);
1602
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
1603
+ "a",
1604
+ {
1605
+ href: partner.websiteUrl || "#",
1606
+ target: partner.websiteUrl ? "_blank" : "_self",
1607
+ rel: partner.websiteUrl ? "noopener noreferrer" : "",
1608
+ className: "card",
1609
+ style: {
1610
+ animationDelay: `${idx * 0.1}s`,
1611
+ textDecoration: "none",
1612
+ overflow: "hidden",
1613
+ minHeight: "280px",
1614
+ padding: "1.5rem",
1615
+ display: "flex",
1616
+ flexDirection: "column"
1617
+ },
1618
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: {
1619
+ display: "flex",
1620
+ flexDirection: "column",
1621
+ alignItems: "center",
1622
+ justifyContent: "center",
1623
+ flex: 1
1624
+ }, children: logoUrl ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: {
1625
+ width: "100%",
1626
+ height: "100px",
1627
+ display: "flex",
1628
+ alignItems: "center",
1629
+ justifyContent: "center",
1630
+ marginBottom: "1rem"
1631
+ }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1632
+ "img",
1633
+ {
1634
+ src: logoUrl,
1635
+ alt: partner.name || t("partners.logoAlt") || "Partner logo",
1636
+ style: {
1637
+ maxWidth: "100%",
1638
+ maxHeight: "100%",
1639
+ objectFit: "contain",
1640
+ transition: "transform 300ms cubic-bezier(0.4, 0, 0.2, 1)"
1641
+ },
1642
+ onMouseEnter: (e) => {
1643
+ e.currentTarget.style.transform = "scale(1.05)";
1644
+ },
1645
+ onMouseLeave: (e) => {
1646
+ e.currentTarget.style.transform = "scale(1)";
1647
+ },
1648
+ loading: "lazy"
1649
+ }
1650
+ ) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-surface", style: {
1651
+ width: "5rem",
1652
+ height: "5rem",
1653
+ borderRadius: "9999px",
1654
+ display: "flex",
1655
+ alignItems: "center",
1656
+ justifyContent: "center",
1657
+ marginBottom: "1rem"
1658
+ }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { fontSize: "1.875rem" }, children: "🤝" }) }) })
1659
+ }
1660
+ );
1661
+ };
1662
+ function useWindowSize() {
1663
+ const [width, setWidth] = useState(
1664
+ typeof window !== "undefined" ? window.innerWidth : 1200
1665
+ );
1666
+ useEffect(() => {
1667
+ const handleResize = () => setWidth(window.innerWidth);
1668
+ window.addEventListener("resize", handleResize);
1669
+ return () => window.removeEventListener("resize", handleResize);
1670
+ }, []);
1671
+ return width;
1672
+ }
1673
+ const PartnerListSection_2 = ({ t, getPartnerList, imageBaseUrl = "", section }) => {
1216
1674
  const [partnersData, setPartnersData] = useState([]);
1217
1675
  const [error, setError] = useState(null);
1218
1676
  const [loading, setLoading] = useState(true);
@@ -4941,10 +5399,12 @@ const index = {
4941
5399
  CompanyValues,
4942
5400
  TimelineSection,
4943
5401
  PartnerCard,
4944
- PartnersSection,
5402
+ PartnersSection: PartnersSection$1,
5403
+ PartnersSection_2: PartnersSection,
4945
5404
  MilestoneSection,
4946
5405
  TestimonialsSection,
4947
- PartnerListCard,
5406
+ PartnerListCard: PartnerListCard$1,
5407
+ PartnerListSection_2,
4948
5408
  PartnerListSection,
4949
5409
  ContactFormSection,
4950
5410
  ContactInfoSection,
@@ -4979,9 +5439,11 @@ export {
4979
5439
  PageChildrenSelectSection2,
4980
5440
  PageHighlightSection,
4981
5441
  PartnerCard,
4982
- PartnerListCard,
5442
+ PartnerListCard$1 as PartnerListCard,
4983
5443
  PartnerListSection,
4984
- PartnersSection,
5444
+ PartnerListSection_2,
5445
+ PartnersSection$1 as PartnersSection,
5446
+ PartnersSection as PartnersSection_2,
4985
5447
  ProductListSection,
4986
5448
  TestimonialsSection,
4987
5449
  TextSection,