nvis-fe-cms-libs 2.1.13 → 2.1.15

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.
@@ -50,6 +50,7 @@ var __async = (__this, __arguments, generator) => {
50
50
  });
51
51
  };
52
52
  import require$$0, { useRef, useState, useEffect, useMemo, forwardRef, createElement } from "react";
53
+ import { createPortal } from "react-dom";
53
54
  var jsxRuntime = { exports: {} };
54
55
  var reactJsxRuntime_production = {};
55
56
  /**
@@ -547,7 +548,7 @@ const AboutCompanySection = ({ data, t, isDarkMode, imageBaseUrl = "" }) => {
547
548
  };
548
549
  const logoUrl = getLogoUrl(logo);
549
550
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
550
- /* @__PURE__ */ jsxRuntimeExports.jsxs("section", { className: "relative min-h-[80vh] flex items-center justify-center overflow-hidden pt-8 bg-white", children: [
551
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("section", { className: `relative min-h-[80vh] flex items-center justify-center overflow-hidden pt-8 ${isDarkMode ? "bg-gray-900" : "bg-white"}`, children: [
551
552
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "absolute inset-0", children: [
552
553
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "absolute inset-0", children: [
553
554
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -596,17 +597,17 @@ const AboutCompanySection = ({ data, t, isDarkMode, imageBaseUrl = "" }) => {
596
597
  }
597
598
  }
598
599
  ) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-2xl font-bold text-gradient-brand", children: shortName }) }) }),
599
- /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-5xl lg:text-6xl font-extrabold tracking-tight mb-4 text-gradient-brand drop-shadow-[0_2px_6px_rgba(0,0,0,0.4)]", children: name })
600
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: `text-5xl lg:text-6xl font-extrabold tracking-tight mb-4 ${isDarkMode ? "text-white" : "text-gray-900"} drop-shadow-[0_2px_6px_rgba(0,0,0,0.4)]`, children: name })
600
601
  ] }),
601
602
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "max-w-4xl mx-auto", children: [
602
603
  /* @__PURE__ */ jsxRuntimeExports.jsx(
603
604
  "div",
604
605
  {
605
606
  dangerouslySetInnerHTML: { __html: shortDescription },
606
- className: "prose max-w-none mb-8 leading-relaxed text-inverse text-lg sm:text-xl md:text-2xl font-light tracking-wide"
607
+ className: `prose max-w-none mb-8 leading-relaxed text-lg sm:text-xl md:text-2xl font-light tracking-wide ${isDarkMode ? "text-gray-300" : "text-gray-700"}`
607
608
  }
608
609
  ),
609
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "inline-flex items-center px-4 py-2 rounded-full border bg-white/20 border-white/40 text-inverse text-small font-medium", children: [
610
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `inline-flex items-center px-4 py-2 rounded-full border ${isDarkMode ? "bg-gray-800 border-gray-700 text-gray-200" : "bg-gray-100 border-gray-300 text-gray-800"} text-small font-medium`, children: [
610
611
  safeT("aboutCompany.hero.establishedYear", { year: establishedYear }),
611
612
  " - ",
612
613
  safeT("aboutCompany.hero.experience", { years: experienceYears })
@@ -645,6 +646,76 @@ const AboutCompanySection = ({ data, t, isDarkMode, imageBaseUrl = "" }) => {
645
646
  ] }) }) })
646
647
  ] });
647
648
  };
649
+ const AboutCompanySection_2 = ({ data, t, isDarkMode, imageBaseUrl = "" }) => {
650
+ var _a, _b;
651
+ const safeT = typeof t === "function" ? t : (key, options) => {
652
+ console.warn(`Translation function not provided for key: ${key}`);
653
+ return key;
654
+ };
655
+ const companyData = (_b = (_a = data == null ? void 0 : data.sectionDataBindingItems) == null ? void 0 : _a[0]) == null ? void 0 : _b.data;
656
+ if (!companyData) {
657
+ return null;
658
+ }
659
+ const name = companyData.name || safeT("aboutCompany.defaults.companyName");
660
+ const shortName = companyData.shortName || safeT("aboutCompany.defaults.shortName");
661
+ const shortDescription = companyData.shortDescription || safeT("aboutCompany.defaults.shortDescription");
662
+ const establishedYear = companyData.establishedYear || "----";
663
+ const experienceYears = companyData.experienceYears || "0";
664
+ companyData.description || "";
665
+ const logo = companyData.logo || null;
666
+ const getLogoUrl = (logoUrl2) => {
667
+ if (!logoUrl2) return null;
668
+ if (logoUrl2.startsWith("http")) return logoUrl2;
669
+ return `${imageBaseUrl}${logoUrl2}`;
670
+ };
671
+ const logoUrl = getLogoUrl(logo);
672
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
673
+ "section",
674
+ {
675
+ className: "relative min-h-[80vh] flex items-center justify-center overflow-hidden pt-8 bg-cover bg-center bg-no-repeat",
676
+ style: {
677
+ backgroundImage: 'url("/image_intro_company.png")'
678
+ },
679
+ children: [
680
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-slate-950/70" }),
681
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative z-10 max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 text-center", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-6", children: [
682
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
683
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-40 h-40 mx-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full h-full flex items-center justify-center", children: logoUrl ? /* @__PURE__ */ jsxRuntimeExports.jsx(
684
+ "img",
685
+ {
686
+ src: logoUrl,
687
+ alt: name || shortName,
688
+ className: "w-full h-full object-contain",
689
+ onError: (e) => {
690
+ e.target.style.display = "none";
691
+ const fallbackDiv = document.createElement("div");
692
+ fallbackDiv.className = "text-2xl font-bold text-gradient-accent";
693
+ fallbackDiv.textContent = shortName;
694
+ e.target.parentElement.appendChild(fallbackDiv);
695
+ }
696
+ }
697
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-2xl font-bold text-gradient-accent", children: shortName }) }) }),
698
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-5xl lg:text-6xl font-extrabold tracking-tight mb-4 text-white drop-shadow-[0_2px_6px_rgba(0,0,0,0.5)]", children: name })
699
+ ] }),
700
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "max-w-4xl mx-auto", children: [
701
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
702
+ "div",
703
+ {
704
+ dangerouslySetInnerHTML: { __html: shortDescription },
705
+ className: "prose max-w-none mb-8 leading-relaxed text-lg sm:text-xl md:text-2xl font-light tracking-wide text-slate-200"
706
+ }
707
+ ),
708
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "inline-flex items-center px-4 py-2 rounded-full border bg-white/10 border-white/20 text-white text-small font-medium", children: [
709
+ safeT("aboutCompany.hero.establishedYear", { year: establishedYear }),
710
+ " - ",
711
+ safeT("aboutCompany.hero.experience", { years: experienceYears })
712
+ ] })
713
+ ] })
714
+ ] }) })
715
+ ]
716
+ }
717
+ ) });
718
+ };
648
719
  const TimelineSection = ({ data, t, section }) => {
649
720
  var _a, _b, _c;
650
721
  const timelineData = ((_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)) || [];
@@ -1770,6 +1841,209 @@ const PartnerListSection_2 = ({ t, getPartnerList, imageBaseUrl = "", section })
1770
1841
  ) })
1771
1842
  ] }) });
1772
1843
  };
1844
+ const PartnerAutoSection_1 = ({ getPartnerList, t, isDarkMode, imageBaseUrl = "", section }) => {
1845
+ const [partners, setPartners] = useState([]);
1846
+ const [loading, setLoading] = useState(true);
1847
+ const [currentPage, setCurrentPage] = useState(0);
1848
+ useEffect(() => {
1849
+ const loadData = () => __async(null, null, function* () {
1850
+ if (!getPartnerList) return;
1851
+ setLoading(true);
1852
+ try {
1853
+ const result = yield getPartnerList();
1854
+ if (result && result.success && Array.isArray(result.data)) {
1855
+ const sorted = [...result.data].sort((a, b) => (a.order || 0) - (b.order || 0));
1856
+ setPartners(sorted);
1857
+ }
1858
+ } catch (error) {
1859
+ console.error("Error loading auto partners:", error);
1860
+ } finally {
1861
+ setLoading(false);
1862
+ }
1863
+ });
1864
+ loadData();
1865
+ }, [getPartnerList]);
1866
+ const getImageUrl = (imagePath) => {
1867
+ if (!imagePath) return "";
1868
+ if (imagePath.startsWith("http://") || imagePath.startsWith("https://")) {
1869
+ return imagePath;
1870
+ }
1871
+ return `${imageBaseUrl}${imagePath}`;
1872
+ };
1873
+ const itemsPerPage = 30;
1874
+ const totalPages = Math.ceil(partners.length / itemsPerPage);
1875
+ const currentPartners = partners.slice(
1876
+ currentPage * itemsPerPage,
1877
+ (currentPage + 1) * itemsPerPage
1878
+ );
1879
+ if (loading) {
1880
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(SectionWrapper, { isDarkMode, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative max-w-7xl mx-auto px-6 sm:px-8 lg:px-12 animate-pulse", children: [
1881
+ (section == null ? void 0 : section.title) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-8 w-64 bg-gray-200 dark:bg-slate-700 mx-auto rounded-lg mb-12" }),
1882
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 gap-6 md:gap-8", children: Array.from({ length: 12 }).map((_, i) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-gray-200 dark:bg-slate-700 rounded-xl h-28 border border-gray-150 dark:border-gray-850" }, i)) })
1883
+ ] }) });
1884
+ }
1885
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(SectionWrapper, { isDarkMode, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative max-w-7xl mx-auto px-6 sm:px-8 lg:px-12", children: [
1886
+ (section == null ? void 0 : section.title) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center mb-12", children: [
1887
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
1888
+ "div",
1889
+ {
1890
+ className: "text-3xl font-bold mb-4",
1891
+ style: { color: isDarkMode ? "#F8FAFC" : "#1E3888" },
1892
+ dangerouslySetInnerHTML: { __html: section.title }
1893
+ }
1894
+ ),
1895
+ section.description && /* @__PURE__ */ jsxRuntimeExports.jsx(
1896
+ "div",
1897
+ {
1898
+ className: "text-lg",
1899
+ style: { color: isDarkMode ? "#CBD5E1" : "#475569" },
1900
+ dangerouslySetInnerHTML: { __html: section.description }
1901
+ }
1902
+ )
1903
+ ] }),
1904
+ currentPartners.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 gap-6 md:gap-8", children: currentPartners.map((partner) => {
1905
+ const hasUrl = !!partner.websiteUrl;
1906
+ const CardElement = hasUrl ? "a" : "div";
1907
+ const cardProps = hasUrl ? {
1908
+ href: partner.websiteUrl,
1909
+ target: "_blank",
1910
+ rel: "noopener noreferrer"
1911
+ } : {};
1912
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
1913
+ CardElement,
1914
+ __spreadProps(__spreadValues({}, cardProps), {
1915
+ className: "flex items-center justify-center p-5 bg-white dark:bg-slate-800 rounded-xl hover:shadow-lg transition-all duration-300 hover:-translate-y-1 h-28 border border-gray-100 dark:border-gray-700 shadow-sm",
1916
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1917
+ "img",
1918
+ {
1919
+ src: getImageUrl(partner.logoUrl),
1920
+ alt: partner.name || "Partner logo",
1921
+ className: "max-w-full max-h-16 object-contain transition-all duration-300",
1922
+ onError: (e) => {
1923
+ e.target.src = "https://via.placeholder.com/150x80?text=Logo";
1924
+ }
1925
+ }
1926
+ )
1927
+ }),
1928
+ partner.id
1929
+ );
1930
+ }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center py-10", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-gray-500 dark:text-gray-400", children: (t == null ? void 0 : t("partners.noData")) || "Chưa có dữ liệu đối tác." }) }),
1931
+ totalPages > 1 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-center items-center gap-4 mt-12", children: [
1932
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
1933
+ "button",
1934
+ {
1935
+ onClick: () => setCurrentPage((prev) => Math.max(0, prev - 1)),
1936
+ disabled: currentPage === 0,
1937
+ className: "w-12 h-12 rounded-full border border-blue-600 dark:border-blue-400 flex items-center justify-center text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-slate-800 transition-colors disabled:opacity-30 disabled:cursor-not-allowed",
1938
+ "aria-label": "Trang trước",
1939
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-5 h-5 stroke-current fill-none", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) })
1940
+ }
1941
+ ),
1942
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
1943
+ "button",
1944
+ {
1945
+ onClick: () => setCurrentPage((prev) => Math.min(totalPages - 1, prev + 1)),
1946
+ disabled: currentPage === totalPages - 1,
1947
+ className: "w-12 h-12 rounded-full border border-blue-600 dark:border-blue-400 flex items-center justify-center text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-slate-800 transition-colors disabled:opacity-30 disabled:cursor-not-allowed",
1948
+ "aria-label": "Trang sau",
1949
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-5 h-5 stroke-current fill-none", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) })
1950
+ }
1951
+ )
1952
+ ] })
1953
+ ] }) });
1954
+ };
1955
+ const PartnersGridSection_3 = ({ data, t, isDarkMode, imageBaseUrl = "", section }) => {
1956
+ const [currentPage, setCurrentPage] = useState(0);
1957
+ const extractPartners = (data2) => {
1958
+ if (!(data2 == null ? void 0 : data2.sectionDataBindingItems) || data2.sectionDataBindingItems.length === 0) {
1959
+ return [];
1960
+ }
1961
+ return data2.sectionDataBindingItems.filter((item) => item && item.data).map((item) => item.data).sort((a, b) => (a.order || 0) - (b.order || 0));
1962
+ };
1963
+ const getImageUrl = (imagePath) => {
1964
+ if (!imagePath) return "";
1965
+ if (imagePath.startsWith("http://") || imagePath.startsWith("https://")) {
1966
+ return imagePath;
1967
+ }
1968
+ return `${imageBaseUrl}${imagePath}`;
1969
+ };
1970
+ const partners = extractPartners(data);
1971
+ const itemsPerPage = 30;
1972
+ const totalPages = Math.ceil(partners.length / itemsPerPage);
1973
+ const currentPartners = partners.slice(
1974
+ currentPage * itemsPerPage,
1975
+ (currentPage + 1) * itemsPerPage
1976
+ );
1977
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(SectionWrapper, { isDarkMode, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative max-w-7xl mx-auto px-6 sm:px-8 lg:px-12", children: [
1978
+ (section == null ? void 0 : section.title) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center mb-12", children: [
1979
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
1980
+ "div",
1981
+ {
1982
+ className: "text-3xl font-bold mb-4",
1983
+ style: { color: isDarkMode ? "#F8FAFC" : "#1E3888" },
1984
+ dangerouslySetInnerHTML: { __html: section.title }
1985
+ }
1986
+ ),
1987
+ section.description && /* @__PURE__ */ jsxRuntimeExports.jsx(
1988
+ "div",
1989
+ {
1990
+ className: "text-lg",
1991
+ style: { color: isDarkMode ? "#CBD5E1" : "#475569" },
1992
+ dangerouslySetInnerHTML: { __html: section.description }
1993
+ }
1994
+ )
1995
+ ] }),
1996
+ currentPartners.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 gap-6 md:gap-8", children: currentPartners.map((partner) => {
1997
+ const hasUrl = !!partner.websiteUrl;
1998
+ const CardElement = hasUrl ? "a" : "div";
1999
+ const cardProps = hasUrl ? {
2000
+ href: partner.websiteUrl,
2001
+ target: "_blank",
2002
+ rel: "noopener noreferrer"
2003
+ } : {};
2004
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
2005
+ CardElement,
2006
+ __spreadProps(__spreadValues({}, cardProps), {
2007
+ className: "flex items-center justify-center p-5 bg-white dark:bg-slate-800 rounded-xl hover:shadow-lg transition-all duration-300 hover:-translate-y-1 h-28 border border-gray-100 dark:border-gray-700 shadow-sm",
2008
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
2009
+ "img",
2010
+ {
2011
+ src: getImageUrl(partner.logoUrl),
2012
+ alt: partner.name || "Partner logo",
2013
+ className: "max-w-full max-h-16 object-contain transition-all duration-300",
2014
+ onError: (e) => {
2015
+ e.target.src = "https://via.placeholder.com/150x80?text=Logo";
2016
+ }
2017
+ }
2018
+ )
2019
+ }),
2020
+ partner.id
2021
+ );
2022
+ }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center py-10", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-gray-500 dark:text-gray-400", children: (t == null ? void 0 : t("partners.noData")) || "Chưa có dữ liệu đối tác." }) }),
2023
+ totalPages > 1 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-center items-center gap-4 mt-12", children: [
2024
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
2025
+ "button",
2026
+ {
2027
+ onClick: () => setCurrentPage((prev) => Math.max(0, prev - 1)),
2028
+ disabled: currentPage === 0,
2029
+ className: "w-12 h-12 rounded-full border border-blue-600 dark:border-blue-400 flex items-center justify-center text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-slate-800 transition-colors disabled:opacity-30 disabled:cursor-not-allowed",
2030
+ "aria-label": "Trang trước",
2031
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-5 h-5 stroke-current fill-none", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) })
2032
+ }
2033
+ ),
2034
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
2035
+ "button",
2036
+ {
2037
+ onClick: () => setCurrentPage((prev) => Math.min(totalPages - 1, prev + 1)),
2038
+ disabled: currentPage === totalPages - 1,
2039
+ className: "w-12 h-12 rounded-full border border-blue-600 dark:border-blue-400 flex items-center justify-center text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-slate-800 transition-colors disabled:opacity-30 disabled:cursor-not-allowed",
2040
+ "aria-label": "Trang sau",
2041
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-5 h-5 stroke-current fill-none", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) })
2042
+ }
2043
+ )
2044
+ ] })
2045
+ ] }) });
2046
+ };
1773
2047
  const ContactFormSection = ({ data, t, isDarkMode, consultationRequestService }) => {
1774
2048
  const [formData, setFormData] = useState({
1775
2049
  fullName: "",
@@ -5343,8 +5617,357 @@ const HeroBannerSection = ({ data, t, isDarkMode, imageBaseUrl = "" }) => {
5343
5617
  ] }) })
5344
5618
  ] });
5345
5619
  };
5620
+ const HeroBannerSection_2 = ({ data, t, isDarkMode, imageBaseUrl = "" }) => {
5621
+ var _a, _b;
5622
+ const [activeSlide, setActiveSlide] = useState(0);
5623
+ const [isLightboxOpen, setIsLightboxOpen] = useState(false);
5624
+ const extractBannerData = (data2) => {
5625
+ if (!(data2 == null ? void 0 : data2.sectionDataBindingItems) || data2.sectionDataBindingItems.length === 0) {
5626
+ return null;
5627
+ }
5628
+ const item = data2.sectionDataBindingItems[0];
5629
+ if (!item || !item.data) {
5630
+ return null;
5631
+ }
5632
+ const bannerData2 = item.data;
5633
+ if (!bannerData2.id && !bannerData2.name) {
5634
+ return null;
5635
+ }
5636
+ const extractedData = {
5637
+ id: bannerData2.id,
5638
+ name: bannerData2.name || "",
5639
+ description: bannerData2.description || "",
5640
+ images: Array.isArray(bannerData2.images) ? bannerData2.images : []
5641
+ };
5642
+ return extractedData;
5643
+ };
5644
+ const bannerData = extractBannerData(data);
5645
+ const getImageUrl = (imagePath) => {
5646
+ if (!imagePath) {
5647
+ return null;
5648
+ }
5649
+ if (imagePath.startsWith("http://") || imagePath.startsWith("https://")) {
5650
+ return imagePath;
5651
+ }
5652
+ return `${imageBaseUrl}${imagePath}`;
5653
+ };
5654
+ const slideImages = ((_a = bannerData == null ? void 0 : bannerData.images) == null ? void 0 : _a.map((img) => ({
5655
+ id: img.id || `img-${Math.random()}`,
5656
+ url: getImageUrl(img.url)
5657
+ }))) || [];
5658
+ const defaultImage = "https://images.unsplash.com/photo-1566073771259-6a8506099945?w=1920&h=1080&fit=crop&q=80";
5659
+ const displayImages = [...slideImages].slice(0, 3);
5660
+ if (!bannerData) {
5661
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("section", { className: "py-20 bg-body", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "max-w-7xl mx-auto px-4 text-center", children: [
5662
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-lg font-semibold mb-2 text-main", children: (t == null ? void 0 : t("banner.noData.title")) || "Chưa có dữ liệu" }),
5663
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-muted", children: (t == null ? void 0 : t("banner.noData.description")) || "Hiện tại chưa có banner nào được thiết lập." })
5664
+ ] }) });
5665
+ }
5666
+ const renderImages = () => {
5667
+ if (displayImages.length === 0) {
5668
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center border-2 border-dashed border-gray-300 dark:border-gray-700 rounded-lg aspect-[16/10] w-full max-w-md mx-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-gray-400 text-sm", children: "Chưa có hình ảnh" }) });
5669
+ }
5670
+ const configs = [
5671
+ { className: "banner2-img-0 dsm-float-slow", originalIndex: 0 },
5672
+ { className: "banner2-img-1 dsm-float-medium", originalIndex: 1 },
5673
+ { className: "banner2-img-2 dsm-float-fast", originalIndex: 2 }
5674
+ ];
5675
+ let mappedImages = [];
5676
+ if (displayImages.length === 1) {
5677
+ mappedImages = [{ img: displayImages[0], config: configs[1], originalIndex: 0 }];
5678
+ } else if (displayImages.length === 2) {
5679
+ mappedImages = [
5680
+ { img: displayImages[0], config: configs[0], originalIndex: 0 },
5681
+ { img: displayImages[1], config: configs[1], originalIndex: 1 }
5682
+ ];
5683
+ } else {
5684
+ mappedImages = [
5685
+ { img: displayImages[0], config: configs[0], originalIndex: 0 },
5686
+ { img: displayImages[1], config: configs[1], originalIndex: 1 },
5687
+ { img: displayImages[2], config: configs[2], originalIndex: 2 }
5688
+ ];
5689
+ }
5690
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative w-full banner2-image-container", children: mappedImages.map((item, idx) => /* @__PURE__ */ jsxRuntimeExports.jsx(
5691
+ "div",
5692
+ {
5693
+ className: `absolute transition-all duration-300 hover:scale-[1.03] hover:!z-40 cursor-pointer ${item.config.className}`,
5694
+ onClick: () => {
5695
+ setActiveSlide(item.originalIndex);
5696
+ setIsLightboxOpen(true);
5697
+ },
5698
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
5699
+ "img",
5700
+ {
5701
+ src: item.img.url,
5702
+ alt: `${bannerData.name} - ${idx + 1}`,
5703
+ className: "w-full aspect-[16/10] object-cover rounded-lg shadow-[0_15px_30px_rgba(0,0,0,0.3)] border border-gray-200 dark:border-gray-800",
5704
+ onError: (e) => {
5705
+ e.target.src = defaultImage;
5706
+ }
5707
+ }
5708
+ )
5709
+ },
5710
+ item.img.id
5711
+ )) });
5712
+ };
5713
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(SectionWrapper, { isDarkMode, children: [
5714
+ /* @__PURE__ */ jsxRuntimeExports.jsx("style", { children: `
5715
+ @keyframes dsmFloatSlow {
5716
+ 0%, 100% { transform: translateY(0px) rotate(0.2deg); }
5717
+ 50% { transform: translateY(-12px) rotate(-0.2deg); }
5718
+ }
5719
+ @keyframes dsmFloatMedium {
5720
+ 0%, 100% { transform: translateY(0px) rotate(-0.1deg); }
5721
+ 50% { transform: translateY(-8px) rotate(0.1deg); }
5722
+ }
5723
+ @keyframes dsmFloatFast {
5724
+ 0%, 100% { transform: translateY(0px) rotate(0deg); }
5725
+ 50% { transform: translateY(-15px) rotate(0.3deg); }
5726
+ }
5727
+ .dsm-float-slow {
5728
+ animation: dsmFloatSlow 6s ease-in-out infinite;
5729
+ }
5730
+ .dsm-float-medium {
5731
+ animation: dsmFloatMedium 7s ease-in-out infinite;
5732
+ }
5733
+ .dsm-float-fast {
5734
+ animation: dsmFloatFast 5s ease-in-out infinite;
5735
+ }
5736
+
5737
+ /* Mobile layout (default) */
5738
+ .banner2-image-container {
5739
+ position: relative;
5740
+ width: 100%;
5741
+ min-height: 280px;
5742
+ margin-top: 1.5rem;
5743
+ }
5744
+ .banner2-img-0 {
5745
+ left: 0%;
5746
+ top: 25%;
5747
+ width: 50%;
5748
+ z-index: 10;
5749
+ }
5750
+ .banner2-img-1 {
5751
+ left: 15%;
5752
+ top: 5%;
5753
+ width: 60%;
5754
+ z-index: 20;
5755
+ }
5756
+ .banner2-img-2 {
5757
+ left: 40%;
5758
+ top: 40%;
5759
+ width: 50%;
5760
+ z-index: 30;
5761
+ }
5762
+
5763
+ /* Desktop layout (min-width: 1024px) */
5764
+ @media (min-width: 1024px) {
5765
+ .banner2-image-container {
5766
+ min-height: 480px;
5767
+ margin-top: 0;
5768
+ }
5769
+ .banner2-img-0 {
5770
+ left: 0%;
5771
+ top: 30%;
5772
+ width: 50%;
5773
+ }
5774
+ .banner2-img-1 {
5775
+ left: 15%;
5776
+ top: 10%;
5777
+ width: 65%;
5778
+ }
5779
+ .banner2-img-2 {
5780
+ left: 40%;
5781
+ top: 45%;
5782
+ width: 55%;
5783
+ }
5784
+ }
5785
+ ` }),
5786
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "absolute inset-0 overflow-hidden pointer-events-none", children: [
5787
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
5788
+ "div",
5789
+ {
5790
+ className: "absolute top-0 right-0 w-96 h-96 rounded-full opacity-20 blur-3xl",
5791
+ style: {
5792
+ background: isDarkMode ? "#1086CD" : "#1E3888"
5793
+ }
5794
+ }
5795
+ ),
5796
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
5797
+ "div",
5798
+ {
5799
+ className: "absolute bottom-0 left-0 w-96 h-96 rounded-full opacity-10 blur-3xl",
5800
+ style: {
5801
+ background: isDarkMode ? "#1E3888" : "#1086CD"
5802
+ }
5803
+ }
5804
+ )
5805
+ ] }),
5806
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative max-w-7xl mx-auto px-6 sm:px-8 lg:px-12", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col lg:flex-row items-center justify-between gap-8 lg:gap-12", children: [
5807
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full lg:w-1/2 lg:pr-8 lg:self-start lg:pt-8", children: [
5808
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
5809
+ "div",
5810
+ {
5811
+ className: "leading-tight mb-6",
5812
+ style: {
5813
+ color: isDarkMode ? "#F8FAFC" : "#1E3888"
5814
+ },
5815
+ dangerouslySetInnerHTML: { __html: bannerData.name }
5816
+ }
5817
+ ),
5818
+ bannerData.description && /* @__PURE__ */ jsxRuntimeExports.jsx(
5819
+ "div",
5820
+ {
5821
+ className: "text-lg sm:text-xl leading-relaxed mb-8",
5822
+ style: {
5823
+ color: isDarkMode ? "#CBD5E1" : "#475569"
5824
+ },
5825
+ dangerouslySetInnerHTML: { __html: bannerData.description }
5826
+ }
5827
+ )
5828
+ ] }),
5829
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full lg:w-1/2 py-4 md:py-4 lg:py-5", children: renderImages() })
5830
+ ] }) }),
5831
+ isLightboxOpen && createPortal(
5832
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
5833
+ "div",
5834
+ {
5835
+ className: "fixed inset-0 flex items-center justify-center p-4",
5836
+ style: {
5837
+ background: "rgba(0, 0, 0, 0.95)",
5838
+ backdropFilter: "blur(10px)",
5839
+ zIndex: 99999
5840
+ },
5841
+ onClick: () => setIsLightboxOpen(false),
5842
+ children: [
5843
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
5844
+ "button",
5845
+ {
5846
+ onClick: () => setIsLightboxOpen(false),
5847
+ className: "absolute top-4 right-4 p-3 transition-all duration-300 hover:scale-110",
5848
+ style: {
5849
+ background: "transparent",
5850
+ border: "none",
5851
+ cursor: "pointer",
5852
+ zIndex: 1e5
5853
+ },
5854
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
5855
+ "svg",
5856
+ {
5857
+ className: "w-6 h-6",
5858
+ fill: "none",
5859
+ stroke: "white",
5860
+ viewBox: "0 0 24 24",
5861
+ style: { filter: "drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5))" },
5862
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" })
5863
+ }
5864
+ )
5865
+ }
5866
+ ),
5867
+ displayImages.length > 1 && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
5868
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
5869
+ "button",
5870
+ {
5871
+ onClick: (e) => {
5872
+ e.stopPropagation();
5873
+ setActiveSlide((prev) => (prev - 1 + displayImages.length) % displayImages.length);
5874
+ },
5875
+ className: "absolute left-4 p-3 transition-all duration-300 hover:scale-110",
5876
+ style: {
5877
+ background: "transparent",
5878
+ border: "none",
5879
+ cursor: "pointer",
5880
+ zIndex: 1e5
5881
+ },
5882
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
5883
+ "svg",
5884
+ {
5885
+ className: "w-6 h-6",
5886
+ fill: "none",
5887
+ stroke: "white",
5888
+ viewBox: "0 0 24 24",
5889
+ style: { filter: "drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5))" },
5890
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" })
5891
+ }
5892
+ )
5893
+ }
5894
+ ),
5895
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
5896
+ "button",
5897
+ {
5898
+ onClick: (e) => {
5899
+ e.stopPropagation();
5900
+ setActiveSlide((prev) => (prev + 1) % displayImages.length);
5901
+ },
5902
+ className: "absolute right-4 p-3 transition-all duration-300 hover:scale-110",
5903
+ style: {
5904
+ background: "transparent",
5905
+ border: "none",
5906
+ cursor: "pointer",
5907
+ zIndex: 1e5
5908
+ },
5909
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
5910
+ "svg",
5911
+ {
5912
+ className: "w-6 h-6",
5913
+ fill: "none",
5914
+ stroke: "white",
5915
+ viewBox: "0 0 24 24",
5916
+ style: { filter: "drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5))" },
5917
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" })
5918
+ }
5919
+ )
5920
+ }
5921
+ )
5922
+ ] }),
5923
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
5924
+ "div",
5925
+ {
5926
+ className: "relative max-w-7xl max-h-full",
5927
+ onClick: (e) => e.stopPropagation(),
5928
+ children: [
5929
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
5930
+ "img",
5931
+ {
5932
+ src: ((_b = displayImages[activeSlide]) == null ? void 0 : _b.url) || defaultImage,
5933
+ alt: bannerData.name,
5934
+ className: "max-w-full max-h-[90vh] object-contain rounded",
5935
+ onError: (e) => {
5936
+ e.target.src = defaultImage;
5937
+ }
5938
+ }
5939
+ ),
5940
+ displayImages.length > 1 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute bottom-4 left-1/2 transform -translate-x-1/2 flex gap-2", children: displayImages.map((_, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
5941
+ "button",
5942
+ {
5943
+ onClick: (e) => {
5944
+ e.stopPropagation();
5945
+ setActiveSlide(index2);
5946
+ },
5947
+ className: "w-2 h-2 rounded-full transition-all duration-300",
5948
+ style: {
5949
+ background: activeSlide === index2 ? "white" : "rgba(255, 255, 255, 0.5)",
5950
+ width: activeSlide === index2 ? "24px" : "8px"
5951
+ }
5952
+ },
5953
+ index2
5954
+ )) })
5955
+ ]
5956
+ }
5957
+ )
5958
+ ]
5959
+ }
5960
+ ),
5961
+ document.body
5962
+ )
5963
+ ] });
5964
+ };
5346
5965
  const index = {
5347
5966
  AboutCompanySection,
5967
+ AboutCompanySection_2,
5968
+ HeroBannerSection_2,
5969
+ PartnerAutoSection_1,
5970
+ PartnersGridSection_3,
5348
5971
  CompanyValues,
5349
5972
  TimelineSection,
5350
5973
  PartnerCard,
@@ -5373,6 +5996,7 @@ const index = {
5373
5996
  };
5374
5997
  export {
5375
5998
  AboutCompanySection,
5999
+ AboutCompanySection_2,
5376
6000
  CompanyValues,
5377
6001
  ContactFormSection,
5378
6002
  ContactInfoSection,
@@ -5382,15 +6006,18 @@ export {
5382
6006
  DiagramSection2,
5383
6007
  FaqSection,
5384
6008
  HeroBannerSection,
6009
+ HeroBannerSection_2,
5385
6010
  MilestoneSection,
5386
6011
  PageChildrenSelectSection,
5387
6012
  PageChildrenSelectSection1,
5388
6013
  PageChildrenSelectSection2,
5389
6014
  PageHighlightSection,
6015
+ PartnerAutoSection_1,
5390
6016
  PartnerCard,
5391
6017
  PartnerListCard$1 as PartnerListCard,
5392
6018
  PartnerListSection,
5393
6019
  PartnerListSection_2,
6020
+ PartnersGridSection_3,
5394
6021
  PartnersSection$1 as PartnersSection,
5395
6022
  PartnersSection as PartnersSection_2,
5396
6023
  ProductListSection,