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