@loafmarkets/ui 0.1.64 → 0.1.65

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.
package/dist/index.mjs CHANGED
@@ -6,6 +6,7 @@ import { clsx } from 'clsx';
6
6
  import { twMerge } from 'tailwind-merge';
7
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
8
  import styled25, { keyframes, css } from 'styled-components';
9
+ import * as ReactDOM from 'react-dom';
9
10
  import { Newspaper, BedDouble, Bath, CarFront } from 'lucide-react';
10
11
  import * as LightweightCharts from 'lightweight-charts';
11
12
  import { BiChevronUp, BiChevronDown, BiX, BiCoin, BiWallet, BiCreditCard, BiCalendar, BiInfoCircle, BiPencil, BiImages, BiVideo, BiMap } from 'react-icons/bi';
@@ -2675,19 +2676,16 @@ var ensureAnimationsInjected = () => {
2675
2676
  50% { opacity: 1; transform: scale(1); }
2676
2677
  100% { opacity: 0.6; transform: scale(0.9); }
2677
2678
  }
2678
-
2679
2679
  @keyframes propertyNewsSlideIn {
2680
2680
  from { transform: translateY(-6px); opacity: 0; }
2681
2681
  to { transform: translateY(0); opacity: 1; }
2682
2682
  }
2683
-
2684
2683
  @keyframes propertyNewsSpin {
2685
2684
  to { transform: rotate(360deg); }
2686
2685
  }
2687
-
2688
- @keyframes propertyNewsFadeIn {
2689
- from { opacity: 0; max-height: 0; }
2690
- to { opacity: 1; max-height: 300px; }
2686
+ @keyframes propertyNewsModalIn {
2687
+ from { opacity: 0; transform: translateY(12px) scale(0.98); }
2688
+ to { opacity: 1; transform: translateY(0) scale(1); }
2691
2689
  }
2692
2690
  `;
2693
2691
  document.head.appendChild(style);
@@ -2709,11 +2707,7 @@ var categoryStyles = {
2709
2707
  var formatDate = (value) => {
2710
2708
  if (typeof value === "string") return value;
2711
2709
  if (!(value instanceof Date) || Number.isNaN(value.getTime())) return "";
2712
- return value.toLocaleDateString(void 0, {
2713
- month: "short",
2714
- day: "numeric",
2715
- year: "numeric"
2716
- });
2710
+ return value.toLocaleDateString(void 0, { month: "short", day: "numeric", year: "numeric" });
2717
2711
  };
2718
2712
  var formatTimeAgo = (timestamp) => {
2719
2713
  const diff = (Date.now() - new Date(timestamp).getTime()) / 1e3;
@@ -2727,24 +2721,137 @@ function getSentimentInfo(score) {
2727
2721
  if (score < -0.15) return { arrow: "\u25BC", label: "Bearish", color: "#f6465d" };
2728
2722
  return { arrow: "\u2014", label: "Neutral", color: "#848e9c" };
2729
2723
  }
2730
- function ChevronIcon({ isOpen }) {
2731
- return /* @__PURE__ */ jsx(
2732
- "svg",
2724
+ function NewsArticleModal({ item, onClose }) {
2725
+ const sentimentInfo = getSentimentInfo(item.sentimentScore);
2726
+ const catStyle = categoryStyles[item.type] ?? categoryStyles.market;
2727
+ React5.useEffect(() => {
2728
+ const handler = (e) => {
2729
+ if (e.key === "Escape") onClose();
2730
+ };
2731
+ document.addEventListener("keydown", handler);
2732
+ document.body.style.overflow = "hidden";
2733
+ return () => {
2734
+ document.removeEventListener("keydown", handler);
2735
+ document.body.style.overflow = "";
2736
+ };
2737
+ }, [onClose]);
2738
+ const modal = /* @__PURE__ */ jsx(
2739
+ "div",
2733
2740
  {
2734
- xmlns: "http://www.w3.org/2000/svg",
2735
- width: "14",
2736
- height: "14",
2737
- viewBox: "0 0 24 24",
2738
- fill: "currentColor",
2739
2741
  style: {
2740
- color: "rgba(255,255,255,0.4)",
2741
- transition: "transform 0.2s",
2742
- transform: isOpen ? "rotate(90deg)" : "rotate(0deg)",
2743
- flexShrink: 0
2742
+ position: "fixed",
2743
+ inset: 0,
2744
+ background: "rgba(0,0,0,0.72)",
2745
+ zIndex: 9999,
2746
+ display: "flex",
2747
+ alignItems: "center",
2748
+ justifyContent: "center",
2749
+ padding: "1rem"
2744
2750
  },
2745
- children: /* @__PURE__ */ jsx("path", { d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z" })
2751
+ onClick: onClose,
2752
+ children: /* @__PURE__ */ jsxs(
2753
+ "div",
2754
+ {
2755
+ style: {
2756
+ background: "#1c1c1c",
2757
+ border: "1px solid rgba(255,255,255,0.12)",
2758
+ borderRadius: "14px",
2759
+ padding: "1.5rem",
2760
+ maxWidth: "540px",
2761
+ width: "100%",
2762
+ maxHeight: "80vh",
2763
+ overflowY: "auto",
2764
+ boxShadow: "0 24px 64px rgba(0,0,0,0.6)",
2765
+ animation: "propertyNewsModalIn 0.22s ease-out"
2766
+ },
2767
+ onClick: (e) => e.stopPropagation(),
2768
+ children: [
2769
+ /* @__PURE__ */ jsx("div", { style: { display: "flex", justifyContent: "flex-end", marginBottom: "0.75rem" }, children: /* @__PURE__ */ jsx(
2770
+ "button",
2771
+ {
2772
+ type: "button",
2773
+ onClick: onClose,
2774
+ style: {
2775
+ background: "rgba(255,255,255,0.07)",
2776
+ border: "none",
2777
+ borderRadius: "6px",
2778
+ cursor: "pointer",
2779
+ color: "rgba(255,255,255,0.6)",
2780
+ padding: "0.3rem 0.5rem",
2781
+ lineHeight: 1,
2782
+ display: "flex",
2783
+ alignItems: "center"
2784
+ },
2785
+ children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) })
2786
+ }
2787
+ ) }),
2788
+ sentimentInfo && /* @__PURE__ */ jsx("div", { style: { marginBottom: "0.6rem" }, children: /* @__PURE__ */ jsxs(
2789
+ "span",
2790
+ {
2791
+ style: {
2792
+ display: "inline-flex",
2793
+ alignItems: "center",
2794
+ gap: "0.3rem",
2795
+ fontSize: "0.7rem",
2796
+ fontWeight: 700,
2797
+ color: sentimentInfo.color,
2798
+ padding: "0.2rem 0.55rem",
2799
+ borderRadius: "4px",
2800
+ background: `${sentimentInfo.color}1a`,
2801
+ border: `1px solid ${sentimentInfo.color}40`
2802
+ },
2803
+ children: [
2804
+ sentimentInfo.arrow,
2805
+ " ",
2806
+ sentimentInfo.label
2807
+ ]
2808
+ }
2809
+ ) }),
2810
+ /* @__PURE__ */ jsx("h2", { style: { fontSize: "1rem", fontWeight: 600, color: "#fff", lineHeight: 1.5, margin: "0 0 1rem" }, children: item.title }),
2811
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "0.5rem", alignItems: "center", flexWrap: "wrap", marginBottom: "1.25rem" }, children: [
2812
+ /* @__PURE__ */ jsx("span", { style: { fontSize: "0.72rem", color: "#848e9c" }, children: typeof item.date === "string" ? item.date : formatDate(item.date) }),
2813
+ item.source && /* @__PURE__ */ jsx(
2814
+ "span",
2815
+ {
2816
+ style: {
2817
+ padding: "0.15rem 0.45rem",
2818
+ borderRadius: "3px",
2819
+ fontSize: "0.65rem",
2820
+ fontWeight: 500,
2821
+ background: "rgba(255,255,255,0.07)",
2822
+ color: "#848e9c"
2823
+ },
2824
+ children: item.source
2825
+ }
2826
+ ),
2827
+ /* @__PURE__ */ jsx(
2828
+ "span",
2829
+ {
2830
+ style: {
2831
+ padding: "0.2rem 0.55rem",
2832
+ borderRadius: "4px",
2833
+ border: `1px solid ${catStyle.borderColor}`,
2834
+ background: catStyle.backgroundColor,
2835
+ color: catStyle.color,
2836
+ fontSize: "0.65rem",
2837
+ fontWeight: 600,
2838
+ textTransform: "uppercase"
2839
+ },
2840
+ children: item.type === "property" ? catStyle.label : "Market News"
2841
+ }
2842
+ )
2843
+ ] }),
2844
+ /* @__PURE__ */ jsx("div", { style: { height: "1px", background: "rgba(255,255,255,0.08)", marginBottom: "1.25rem" } }),
2845
+ item.summary ? /* @__PURE__ */ jsx("p", { style: { fontSize: "0.875rem", color: "rgba(255,255,255,0.8)", lineHeight: 1.75, margin: 0 }, children: item.summary }) : /* @__PURE__ */ jsx("p", { style: { fontSize: "0.8rem", color: "rgba(255,255,255,0.35)", fontStyle: "italic", margin: 0 }, children: "Summary not available for this article." })
2846
+ ]
2847
+ }
2848
+ )
2746
2849
  }
2747
2850
  );
2851
+ if (typeof document !== "undefined") {
2852
+ return ReactDOM.createPortal(modal, document.body);
2853
+ }
2854
+ return modal;
2748
2855
  }
2749
2856
  var PropertyNewsUpdates = React5.forwardRef(
2750
2857
  ({
@@ -2769,6 +2876,7 @@ var PropertyNewsUpdates = React5.forwardRef(
2769
2876
  const purchaseItems = purchasesProp ?? [];
2770
2877
  const [page, setPage] = React5.useState(0);
2771
2878
  const [expandedId, setExpandedId] = React5.useState(null);
2879
+ const [selectedItem, setSelectedItem] = React5.useState(null);
2772
2880
  React5.useEffect(() => {
2773
2881
  ensureAnimationsInjected();
2774
2882
  }, []);
@@ -2776,7 +2884,10 @@ var PropertyNewsUpdates = React5.forwardRef(
2776
2884
  setHomePage(0);
2777
2885
  }, [homeTab]);
2778
2886
  const hasItems = Array.isArray(items) && items.length > 0;
2779
- const totalPages = React5.useMemo(() => hasItems ? Math.max(1, Math.ceil(items.length / ITEMS_PER_PAGE)) : 1, [hasItems, items.length]);
2887
+ const totalPages = React5.useMemo(
2888
+ () => hasItems ? Math.max(1, Math.ceil(items.length / ITEMS_PER_PAGE)) : 1,
2889
+ [hasItems, items.length]
2890
+ );
2780
2891
  React5.useEffect(() => {
2781
2892
  setPage((prev) => Math.min(prev, totalPages - 1));
2782
2893
  }, [totalPages]);
@@ -2806,89 +2917,22 @@ var PropertyNewsUpdates = React5.forwardRef(
2806
2917
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
2807
2918
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: [
2808
2919
  isHomeVariant && /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "currentColor", style: { color: "var(--color-text, #fff)" }, children: /* @__PURE__ */ jsx("path", { d: "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 14H4v-4h11v4zm0-5H4V9h11v4zm5 5h-4V9h4v9z" }) }),
2809
- isPurchaseVariant && /* @__PURE__ */ jsx(
2810
- "span",
2811
- {
2812
- style: {
2813
- display: "inline-block",
2814
- width: "8px",
2815
- height: "8px",
2816
- borderRadius: "50%",
2817
- backgroundColor: "#0ecb81",
2818
- boxShadow: "0 0 8px rgba(14,203,129,0.8)",
2819
- animation: "propertyNewsPulse 1.5s infinite"
2820
- }
2821
- }
2822
- ),
2920
+ isPurchaseVariant && /* @__PURE__ */ jsx("span", { style: { display: "inline-block", width: "8px", height: "8px", borderRadius: "50%", backgroundColor: "#0ecb81", boxShadow: "0 0 8px rgba(14,203,129,0.8)", animation: "propertyNewsPulse 1.5s infinite" } }),
2823
2921
  /* @__PURE__ */ jsxs("div", { children: [
2824
2922
  /* @__PURE__ */ jsx("p", { className: isHomeVariant ? "text-base font-semibold text-white" : "text-lg font-semibold text-white", children: resolvedHeading }),
2825
2923
  subheading ? /* @__PURE__ */ jsx("p", { className: "text-sm text-white/60", children: subheading }) : null
2826
2924
  ] })
2827
2925
  ] }),
2828
- isHomeVariant && viewAllHref ? /* @__PURE__ */ jsxs(
2829
- "a",
2830
- {
2831
- href: viewAllHref,
2832
- style: {
2833
- color: "var(--color-accent, #f0b90b)",
2834
- fontWeight: 500,
2835
- fontSize: "0.8rem",
2836
- textDecoration: "none",
2837
- display: "flex",
2838
- alignItems: "center",
2839
- gap: "0.25rem"
2840
- },
2841
- children: [
2842
- viewAllLabel,
2843
- /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }) })
2844
- ]
2845
- }
2846
- ) : !isHomeVariant && !isPurchaseVariant ? connectionStatus === "connecting" ? /* @__PURE__ */ jsxs(
2847
- "div",
2848
- {
2849
- className: "inline-flex items-center font-semibold uppercase",
2850
- style: { gap: "0.35rem", fontSize: "0.8rem", letterSpacing: "0.15em", color: "#f97316" },
2851
- children: [
2852
- /* @__PURE__ */ jsx(
2853
- "span",
2854
- {
2855
- style: {
2856
- display: "inline-block",
2857
- width: "10px",
2858
- height: "10px",
2859
- borderRadius: "50%",
2860
- border: "2px solid rgba(249,115,22,0.3)",
2861
- borderTopColor: "#f97316",
2862
- animation: "propertyNewsSpin 0.8s linear infinite"
2863
- }
2864
- }
2865
- ),
2866
- "CONNECTING"
2867
- ]
2868
- }
2869
- ) : /* @__PURE__ */ jsxs(
2870
- "div",
2871
- {
2872
- className: "inline-flex items-center font-semibold uppercase text-emerald-300",
2873
- style: { gap: "0.35rem", fontSize: "0.8rem", letterSpacing: "0.15em" },
2874
- children: [
2875
- /* @__PURE__ */ jsx(
2876
- "span",
2877
- {
2878
- style: {
2879
- display: "inline-block",
2880
- width: "6px",
2881
- height: "6px",
2882
- borderRadius: "50%",
2883
- backgroundColor: "#34d399",
2884
- animation: "propertyNewsPulse 2s infinite"
2885
- }
2886
- }
2887
- ),
2888
- "LIVE"
2889
- ]
2890
- }
2891
- ) : null
2926
+ isHomeVariant && viewAllHref ? /* @__PURE__ */ jsxs("a", { href: viewAllHref, style: { color: "var(--color-accent, #f0b90b)", fontWeight: 500, fontSize: "0.8rem", textDecoration: "none", display: "flex", alignItems: "center", gap: "0.25rem" }, children: [
2927
+ viewAllLabel,
2928
+ /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }) })
2929
+ ] }) : !isHomeVariant && !isPurchaseVariant ? connectionStatus === "connecting" ? /* @__PURE__ */ jsxs("div", { className: "inline-flex items-center font-semibold uppercase", style: { gap: "0.35rem", fontSize: "0.8rem", letterSpacing: "0.15em", color: "#f97316" }, children: [
2930
+ /* @__PURE__ */ jsx("span", { style: { display: "inline-block", width: "10px", height: "10px", borderRadius: "50%", border: "2px solid rgba(249,115,22,0.3)", borderTopColor: "#f97316", animation: "propertyNewsSpin 0.8s linear infinite" } }),
2931
+ "CONNECTING"
2932
+ ] }) : /* @__PURE__ */ jsxs("div", { className: "inline-flex items-center font-semibold uppercase text-emerald-300", style: { gap: "0.35rem", fontSize: "0.8rem", letterSpacing: "0.15em" }, children: [
2933
+ /* @__PURE__ */ jsx("span", { style: { display: "inline-block", width: "6px", height: "6px", borderRadius: "50%", backgroundColor: "#34d399", animation: "propertyNewsPulse 2s infinite" } }),
2934
+ "LIVE"
2935
+ ] }) : null
2892
2936
  ] }),
2893
2937
  isHomeVariant && /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: 0, marginTop: "0.75rem", marginBottom: "0.25rem" }, children: ["all", "property", "market"].map((tab) => /* @__PURE__ */ jsx(
2894
2938
  "button",
@@ -2910,343 +2954,149 @@ var PropertyNewsUpdates = React5.forwardRef(
2910
2954
  },
2911
2955
  tab
2912
2956
  )) }),
2913
- /* @__PURE__ */ jsx("div", { className: "mt-4 flex flex-1 flex-col gap-3 overflow-visible", children: isPurchaseVariant ? purchaseItems.length > 0 ? purchaseItems.slice(0, 7).map((purchase, index) => {
2914
- const maxAmount = 6e4;
2915
- const barPercent = Math.min(85, Math.max(15, purchase.amount / maxAmount * 100));
2916
- const isAlternate = index % 2 === 1;
2917
- return /* @__PURE__ */ jsxs(
2918
- "div",
2919
- {
2920
- style: {
2921
- display: "flex",
2922
- justifyContent: "space-between",
2923
- alignItems: "center",
2924
- padding: "0.625rem 0.75rem",
2925
- borderBottom: "1px solid rgba(255,255,255,0.05)",
2926
- position: "relative",
2927
- overflow: "hidden",
2928
- backgroundColor: isAlternate ? "rgba(255,255,255,0.03)" : "transparent"
2929
- },
2930
- children: [
2931
- /* @__PURE__ */ jsx(
2932
- "div",
2933
- {
2934
- style: {
2935
- position: "absolute",
2936
- top: 0,
2937
- right: 0,
2938
- bottom: 0,
2939
- width: `${barPercent}%`,
2940
- background: "linear-gradient(90deg, transparent 0%, rgba(14,203,129,0.15) 100%)",
2941
- pointerEvents: "none"
2942
- }
2943
- }
2944
- ),
2945
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", minWidth: 0, position: "relative" }, children: [
2946
- /* @__PURE__ */ jsx("span", { style: { fontWeight: 500, fontSize: "0.875rem", color: "#fff", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: purchase.name }),
2947
- /* @__PURE__ */ jsx("span", { style: { fontSize: "0.7rem", color: "var(--color-text-secondary, #848e9c)", marginTop: "0.125rem" }, children: formatTimeAgo(purchase.timestamp) })
2948
- ] }),
2949
- /* @__PURE__ */ jsxs("span", { style: { fontWeight: 600, fontSize: "0.875rem", color: "#fff", whiteSpace: "nowrap", marginLeft: "1rem", position: "relative" }, children: [
2950
- "$",
2951
- purchase.amount >= 1e6 ? `${(purchase.amount / 1e6).toFixed(2)}M` : Math.round(purchase.amount).toLocaleString()
2952
- ] })
2953
- ]
2954
- },
2955
- purchase.id
2956
- );
2957
- }) : /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", padding: "3rem 0", gap: "0.75rem" }, children: [
2958
- /* @__PURE__ */ jsx(
2959
- "div",
2960
- {
2961
- style: {
2962
- width: "28px",
2963
- height: "28px",
2964
- border: "3px solid rgba(255,255,255,0.1)",
2965
- borderTopColor: "var(--color-accent, #f0b90b)",
2966
- borderRadius: "50%",
2967
- animation: "propertyNewsSpin 1s linear infinite"
2968
- }
2969
- }
2970
- ),
2971
- /* @__PURE__ */ jsx("span", { style: { fontSize: "0.8rem", color: "rgba(255,255,255,0.4)" }, children: "Awaiting offering..." })
2972
- ] }) : isHomeVariant ? hasItems ? homePaginatedItems.map((item, index) => {
2973
- const key = item.displayId ?? item.id ?? `${item.title}-${index}`;
2974
- const tagType = item.type;
2975
- const isProperty = tagType === "property";
2976
- const sentimentInfo = getSentimentInfo(item.sentimentScore);
2977
- const isExpanded = expandedId === key;
2978
- return /* @__PURE__ */ jsxs(
2979
- "div",
2980
- {
2981
- style: {
2982
- padding: "0.75rem 0",
2983
- borderBottom: index < homePaginatedItems.length - 1 ? "1px solid rgba(255,255,255,0.05)" : "none"
2984
- },
2985
- children: [
2986
- /* @__PURE__ */ jsxs(
2987
- "button",
2988
- {
2989
- type: "button",
2990
- onClick: () => toggleExpand(key),
2991
- style: {
2992
- width: "100%",
2993
- textAlign: "left",
2994
- background: "transparent",
2995
- border: "none",
2996
- cursor: "pointer",
2997
- padding: 0,
2998
- display: "flex",
2999
- justifyContent: "space-between",
3000
- alignItems: "flex-start",
3001
- gap: "0.5rem",
3002
- color: "inherit"
3003
- },
3004
- children: [
3005
- /* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
3006
- /* @__PURE__ */ jsx("h3", { style: { fontSize: "0.85rem", fontWeight: 400, marginBottom: "0.25rem", color: "#f8f9fa", lineHeight: 1.4 }, children: item.title }),
3007
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "0.5rem", alignItems: "center", flexWrap: "wrap" }, children: [
3008
- /* @__PURE__ */ jsx("span", { style: { color: "#848e9c", fontSize: "0.7rem" }, children: typeof item.date === "string" ? item.date : formatDate(item.date) }),
3009
- item.source && /* @__PURE__ */ jsx(
3010
- "span",
3011
- {
3012
- style: {
3013
- padding: "0.1rem 0.4rem",
3014
- borderRadius: "3px",
3015
- fontSize: "0.62rem",
3016
- fontWeight: 500,
3017
- backgroundColor: "rgba(255,255,255,0.07)",
3018
- color: "#848e9c",
3019
- whiteSpace: "nowrap"
3020
- },
3021
- children: item.source
3022
- }
3023
- ),
3024
- /* @__PURE__ */ jsx(
3025
- "span",
3026
- {
3027
- style: {
3028
- padding: "0.15rem 0.4rem",
3029
- borderRadius: "2px",
3030
- fontSize: "0.65rem",
3031
- fontWeight: 500,
3032
- backgroundColor: isProperty ? "rgba(14,203,129,0.1)" : "rgba(240,185,11,0.1)",
3033
- color: isProperty ? "#0ecb81" : "#f0b90b"
3034
- },
3035
- children: isProperty ? "Property Update" : "Market News"
3036
- }
3037
- ),
3038
- sentimentInfo && /* @__PURE__ */ jsxs(
3039
- "span",
3040
- {
3041
- style: {
3042
- fontSize: "0.65rem",
3043
- fontWeight: 600,
3044
- color: sentimentInfo.color
3045
- },
3046
- children: [
2957
+ /* @__PURE__ */ jsx(
2958
+ "div",
2959
+ {
2960
+ className: "mt-4 flex flex-1 flex-col gap-3 overflow-hidden",
2961
+ style: !isPurchaseVariant && !isHomeVariant ? { minHeight: `${ITEMS_PER_PAGE * 86}px` } : void 0,
2962
+ children: isPurchaseVariant ? purchaseItems.length > 0 ? purchaseItems.slice(0, 7).map((purchase, index) => {
2963
+ const maxAmount = 6e4;
2964
+ const barPercent = Math.min(85, Math.max(15, purchase.amount / maxAmount * 100));
2965
+ const isAlternate = index % 2 === 1;
2966
+ return /* @__PURE__ */ jsxs(
2967
+ "div",
2968
+ {
2969
+ style: { display: "flex", justifyContent: "space-between", alignItems: "center", padding: "0.625rem 0.75rem", borderBottom: "1px solid rgba(255,255,255,0.05)", position: "relative", overflow: "hidden", backgroundColor: isAlternate ? "rgba(255,255,255,0.03)" : "transparent" },
2970
+ children: [
2971
+ /* @__PURE__ */ jsx("div", { style: { position: "absolute", top: 0, right: 0, bottom: 0, width: `${barPercent}%`, background: "linear-gradient(90deg, transparent 0%, rgba(14,203,129,0.15) 100%)", pointerEvents: "none" } }),
2972
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", minWidth: 0, position: "relative" }, children: [
2973
+ /* @__PURE__ */ jsx("span", { style: { fontWeight: 500, fontSize: "0.875rem", color: "#fff", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: purchase.name }),
2974
+ /* @__PURE__ */ jsx("span", { style: { fontSize: "0.7rem", color: "var(--color-text-secondary, #848e9c)", marginTop: "0.125rem" }, children: formatTimeAgo(purchase.timestamp) })
2975
+ ] }),
2976
+ /* @__PURE__ */ jsxs("span", { style: { fontWeight: 600, fontSize: "0.875rem", color: "#fff", whiteSpace: "nowrap", marginLeft: "1rem", position: "relative" }, children: [
2977
+ "$",
2978
+ purchase.amount >= 1e6 ? `${(purchase.amount / 1e6).toFixed(2)}M` : Math.round(purchase.amount).toLocaleString()
2979
+ ] })
2980
+ ]
2981
+ },
2982
+ purchase.id
2983
+ );
2984
+ }) : /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", padding: "3rem 0", gap: "0.75rem" }, children: [
2985
+ /* @__PURE__ */ jsx("div", { style: { width: "28px", height: "28px", border: "3px solid rgba(255,255,255,0.1)", borderTopColor: "var(--color-accent, #f0b90b)", borderRadius: "50%", animation: "propertyNewsSpin 1s linear infinite" } }),
2986
+ /* @__PURE__ */ jsx("span", { style: { fontSize: "0.8rem", color: "rgba(255,255,255,0.4)" }, children: "Awaiting offering..." })
2987
+ ] }) : isHomeVariant ? hasItems ? homePaginatedItems.map((item, index) => {
2988
+ const key = item.displayId ?? item.id ?? `${item.title}-${index}`;
2989
+ const isProperty = item.type === "property";
2990
+ const sentimentInfo = getSentimentInfo(item.sentimentScore);
2991
+ const isExpanded = expandedId === key;
2992
+ return /* @__PURE__ */ jsxs(
2993
+ "div",
2994
+ {
2995
+ style: { padding: "0.75rem 0", borderBottom: index < homePaginatedItems.length - 1 ? "1px solid rgba(255,255,255,0.05)" : "none" },
2996
+ children: [
2997
+ /* @__PURE__ */ jsxs(
2998
+ "button",
2999
+ {
3000
+ type: "button",
3001
+ onClick: () => toggleExpand(key),
3002
+ style: { width: "100%", textAlign: "left", background: "transparent", border: "none", cursor: "pointer", padding: 0, display: "flex", justifyContent: "space-between", alignItems: "flex-start", gap: "0.5rem", color: "inherit" },
3003
+ children: [
3004
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
3005
+ /* @__PURE__ */ jsx("h3", { style: { fontSize: "0.85rem", fontWeight: 400, marginBottom: "0.25rem", color: "#f8f9fa", lineHeight: 1.4 }, children: item.title }),
3006
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "0.5rem", alignItems: "center", flexWrap: "wrap" }, children: [
3007
+ /* @__PURE__ */ jsx("span", { style: { color: "#848e9c", fontSize: "0.7rem" }, children: typeof item.date === "string" ? item.date : formatDate(item.date) }),
3008
+ item.source && /* @__PURE__ */ jsx("span", { style: { padding: "0.1rem 0.4rem", borderRadius: "3px", fontSize: "0.62rem", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.07)", color: "#848e9c", whiteSpace: "nowrap" }, children: item.source }),
3009
+ /* @__PURE__ */ jsx("span", { style: { padding: "0.15rem 0.4rem", borderRadius: "2px", fontSize: "0.65rem", fontWeight: 500, backgroundColor: isProperty ? "rgba(14,203,129,0.1)" : "rgba(240,185,11,0.1)", color: isProperty ? "#0ecb81" : "#f0b90b" }, children: isProperty ? "Property Update" : "Market News" }),
3010
+ sentimentInfo && /* @__PURE__ */ jsxs("span", { style: { fontSize: "0.65rem", fontWeight: 600, color: sentimentInfo.color }, children: [
3047
3011
  sentimentInfo.arrow,
3048
3012
  " ",
3049
3013
  sentimentInfo.label
3050
- ]
3051
- }
3052
- )
3053
- ] })
3054
- ] }),
3055
- /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", color: "#848e9c", marginLeft: "0.5rem", paddingTop: "2px" }, children: /* @__PURE__ */ jsx(ChevronIcon, { isOpen: isExpanded }) })
3056
- ]
3057
- }
3058
- ),
3059
- isExpanded && item.summary && /* @__PURE__ */ jsx(
3060
- "div",
3061
- {
3062
- style: {
3063
- marginTop: "0.625rem",
3064
- padding: "0.75rem",
3065
- background: "rgba(255,255,255,0.04)",
3066
- borderRadius: "6px",
3067
- borderLeft: `3px solid ${sentimentInfo?.color ?? "rgba(255,255,255,0.15)"}`,
3068
- animation: "propertyNewsSlideIn 0.2s ease-out"
3069
- },
3070
- children: /* @__PURE__ */ jsx("p", { style: { fontSize: "0.8rem", color: "rgba(255,255,255,0.72)", lineHeight: 1.65, margin: 0 }, children: item.summary })
3071
- }
3072
- ),
3073
- isExpanded && !item.summary && /* @__PURE__ */ jsx(
3074
- "div",
3075
- {
3076
- style: {
3077
- marginTop: "0.625rem",
3078
- padding: "0.6rem 0.75rem",
3079
- background: "rgba(255,255,255,0.03)",
3080
- borderRadius: "6px",
3081
- animation: "propertyNewsSlideIn 0.2s ease-out"
3082
- },
3083
- children: /* @__PURE__ */ jsx("p", { style: { fontSize: "0.78rem", color: "rgba(255,255,255,0.35)", fontStyle: "italic", margin: 0 }, children: "Summary not available for this article." })
3084
- }
3085
- )
3086
- ]
3087
- },
3088
- key
3089
- );
3090
- }) : emptyState ?? /* @__PURE__ */ jsx("div", { className: "flex flex-col items-center justify-center py-10 text-center text-sm text-white/60", children: "No property news yet." }) : hasItems ? paginatedItems.map((item, index) => {
3091
- const absoluteIndex = page * ITEMS_PER_PAGE + index;
3092
- const key = item.displayId ?? item.id ?? `${item.title}-${absoluteIndex}`;
3093
- const styles2 = categoryStyles[item.type] ?? categoryStyles.market;
3094
- const dateLabel = item.isNew ?? (highlightFirst && absoluteIndex === 0) ? "Just now" : typeof item.date === "string" && item.date.trim().length > 0 ? item.date : formatDate(item.date);
3095
- const isHighlighted = item.isNew ?? (highlightFirst && absoluteIndex === 0);
3096
- const sentimentInfo = getSentimentInfo(item.sentimentScore);
3097
- const isExpanded = expandedId === key;
3098
- return /* @__PURE__ */ jsxs(
3099
- "div",
3100
- {
3101
- style: {
3102
- borderRadius: "6px",
3103
- backgroundColor: isHighlighted ? "rgba(14, 203, 129, 0.1)" : "transparent",
3104
- border: "1px solid transparent",
3105
- transition: "background-color 0.2s",
3106
- animation: item.isNew ? "propertyNewsSlideIn 0.5s ease-out" : void 0
3107
- },
3108
- children: [
3109
- /* @__PURE__ */ jsxs(
3110
- "button",
3111
- {
3112
- type: "button",
3113
- onClick: () => toggleExpand(key),
3114
- style: {
3115
- width: "100%",
3116
- textAlign: "left",
3117
- background: "transparent",
3118
- border: "none",
3119
- cursor: "pointer",
3120
- padding: "0.75rem",
3121
- display: "block",
3122
- color: "inherit"
3123
- },
3124
- children: [
3125
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "flex-start", gap: "0.5rem", marginBottom: "0.35rem" }, children: [
3126
- /* @__PURE__ */ jsx("p", { style: { fontSize: "0.9375rem", fontWeight: 500, color: "#fff", margin: 0, flex: 1, lineHeight: 1.4 }, children: item.title }),
3127
- /* @__PURE__ */ jsx(ChevronIcon, { isOpen: isExpanded })
3128
- ] }),
3129
- /* @__PURE__ */ jsxs(
3130
- "div",
3131
- {
3132
- style: {
3133
- display: "flex",
3134
- justifyContent: "space-between",
3135
- alignItems: "center",
3136
- fontSize: "0.75rem",
3137
- color: "#b5b8c5",
3138
- gap: "0.5rem"
3139
- },
3140
- children: [
3141
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem", minWidth: 0, flexWrap: "wrap" }, children: [
3142
- /* @__PURE__ */ jsx("span", { style: { color: isHighlighted ? "#0ecb81" : "inherit", whiteSpace: "nowrap" }, children: dateLabel }),
3143
- item.source && /* @__PURE__ */ jsx(
3144
- "span",
3145
- {
3146
- style: {
3147
- padding: "0.15rem 0.45rem",
3148
- borderRadius: "3px",
3149
- fontSize: "0.65rem",
3150
- fontWeight: 500,
3151
- backgroundColor: "rgba(255,255,255,0.07)",
3152
- color: "#848e9c",
3153
- whiteSpace: "nowrap",
3154
- overflow: "hidden",
3155
- textOverflow: "ellipsis",
3156
- maxWidth: "120px"
3157
- },
3158
- children: item.source
3159
- }
3160
- ),
3161
- sentimentInfo && /* @__PURE__ */ jsxs(
3162
- "span",
3163
- {
3164
- style: {
3165
- fontSize: "0.65rem",
3166
- fontWeight: 700,
3167
- color: sentimentInfo.color,
3168
- whiteSpace: "nowrap"
3169
- },
3170
- children: [
3171
- sentimentInfo.arrow,
3172
- " ",
3173
- sentimentInfo.label
3174
- ]
3175
- }
3176
- )
3177
- ] }),
3178
- /* @__PURE__ */ jsx(
3179
- "span",
3180
- {
3181
- style: {
3182
- padding: "0.25rem 0.6rem",
3183
- borderRadius: "4px",
3184
- border: `1px solid ${styles2.borderColor}`,
3185
- backgroundColor: styles2.backgroundColor,
3186
- color: styles2.color,
3187
- fontSize: "0.68rem",
3188
- fontWeight: 600,
3189
- textTransform: "uppercase",
3190
- whiteSpace: "nowrap",
3191
- flexShrink: 0
3192
- },
3193
- children: item.type === "property" ? styles2.label : "Market News"
3194
- }
3195
- )
3196
- ]
3197
- }
3198
- )
3199
- ]
3200
- }
3201
- ),
3202
- isExpanded && /* @__PURE__ */ jsx(
3203
- "div",
3204
- {
3205
- style: {
3206
- padding: "0 0.75rem 0.75rem",
3207
- animation: "propertyNewsSlideIn 0.2s ease-out"
3208
- },
3209
- children: item.summary ? /* @__PURE__ */ jsx(
3210
- "div",
3211
- {
3212
- style: {
3213
- padding: "0.75rem",
3214
- background: "rgba(255,255,255,0.04)",
3215
- borderRadius: "6px",
3216
- borderLeft: `3px solid ${sentimentInfo?.color ?? "rgba(255,255,255,0.15)"}`
3217
- },
3218
- children: /* @__PURE__ */ jsx("p", { style: { fontSize: "0.85rem", color: "rgba(255,255,255,0.78)", lineHeight: 1.65, margin: 0 }, children: item.summary })
3014
+ ] })
3015
+ ] })
3016
+ ] }),
3017
+ /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", color: "#848e9c", marginLeft: "0.5rem", paddingTop: "2px" }, children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", style: { transition: "transform 0.2s", transform: isExpanded ? "rotate(90deg)" : "rotate(0deg)" }, children: /* @__PURE__ */ jsx("path", { d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z" }) }) })
3018
+ ]
3219
3019
  }
3220
- ) : /* @__PURE__ */ jsx("p", { style: { fontSize: "0.78rem", color: "rgba(255,255,255,0.3)", fontStyle: "italic", margin: 0 }, children: "Summary not available for this article." })
3221
- }
3222
- )
3223
- ]
3224
- },
3225
- key
3226
- );
3227
- }) : emptyState ?? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center rounded-2xl border border-dashed border-white/20 px-6 py-10 text-center text-sm text-white/60", children: [
3228
- /* @__PURE__ */ jsx(Newspaper, { className: "mb-3 h-8 w-8 text-white/40" }),
3229
- "No property news yet. Updates will land here as soon as we receive new intelligence."
3230
- ] }) }),
3231
- isHomeVariant && homeTotalPages > 1 ? /* @__PURE__ */ jsxs("div", { className: "mt-3 flex items-center justify-between text-xs text-white/60", children: [
3020
+ ),
3021
+ isExpanded && /* @__PURE__ */ jsx("div", { style: { marginTop: "0.625rem", padding: "0.75rem", background: "rgba(255,255,255,0.04)", borderRadius: "6px", borderLeft: `3px solid ${sentimentInfo?.color ?? "rgba(255,255,255,0.15)"}`, animation: "propertyNewsSlideIn 0.2s ease-out" }, children: item.summary ? /* @__PURE__ */ jsx("p", { style: { fontSize: "0.8rem", color: "rgba(255,255,255,0.72)", lineHeight: 1.65, margin: 0 }, children: item.summary }) : /* @__PURE__ */ jsx("p", { style: { fontSize: "0.78rem", color: "rgba(255,255,255,0.35)", fontStyle: "italic", margin: 0 }, children: "Summary not available." }) })
3022
+ ]
3023
+ },
3024
+ key
3025
+ );
3026
+ }) : emptyState ?? /* @__PURE__ */ jsx("div", { className: "flex flex-col items-center justify-center py-10 text-center text-sm text-white/60", children: "No property news yet." }) : hasItems ? paginatedItems.map((item, index) => {
3027
+ const absoluteIndex = page * ITEMS_PER_PAGE + index;
3028
+ const key = item.displayId ?? item.id ?? `${item.title}-${absoluteIndex}`;
3029
+ const catStyle = categoryStyles[item.type] ?? categoryStyles.market;
3030
+ const dateLabel = item.isNew ?? (highlightFirst && absoluteIndex === 0) ? "Just now" : typeof item.date === "string" && item.date.trim().length > 0 ? item.date : formatDate(item.date);
3031
+ const isHighlighted = item.isNew ?? (highlightFirst && absoluteIndex === 0);
3032
+ const sentimentInfo = getSentimentInfo(item.sentimentScore);
3033
+ return /* @__PURE__ */ jsx(
3034
+ "button",
3035
+ {
3036
+ type: "button",
3037
+ onClick: () => setSelectedItem(item),
3038
+ style: {
3039
+ display: "block",
3040
+ width: "100%",
3041
+ textAlign: "left",
3042
+ background: "transparent",
3043
+ border: "none",
3044
+ cursor: "pointer",
3045
+ padding: 0,
3046
+ color: "inherit"
3047
+ },
3048
+ children: /* @__PURE__ */ jsxs(
3049
+ "div",
3050
+ {
3051
+ style: {
3052
+ padding: "0.75rem",
3053
+ borderRadius: "6px",
3054
+ backgroundColor: isHighlighted ? "rgba(14, 203, 129, 0.1)" : "transparent",
3055
+ transition: "background-color 0.15s",
3056
+ animation: item.isNew ? "propertyNewsSlideIn 0.5s ease-out" : void 0
3057
+ },
3058
+ onMouseEnter: (e) => {
3059
+ if (!isHighlighted) e.currentTarget.style.backgroundColor = "rgba(255,255,255,0.04)";
3060
+ },
3061
+ onMouseLeave: (e) => {
3062
+ if (!isHighlighted) e.currentTarget.style.backgroundColor = "transparent";
3063
+ },
3064
+ children: [
3065
+ /* @__PURE__ */ jsx("p", { style: { fontSize: "0.9375rem", fontWeight: 500, marginBottom: "0.4rem", color: "#fff", lineHeight: 1.4 }, children: item.title }),
3066
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "flex-end", gap: "0.5rem" }, children: [
3067
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem", minWidth: 0, flexWrap: "wrap" }, children: [
3068
+ /* @__PURE__ */ jsx("span", { style: { fontSize: "0.75rem", color: isHighlighted ? "#0ecb81" : "#b5b8c5", whiteSpace: "nowrap" }, children: dateLabel }),
3069
+ item.source && /* @__PURE__ */ jsx("span", { style: { padding: "0.15rem 0.45rem", borderRadius: "3px", fontSize: "0.65rem", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.07)", color: "#848e9c", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", maxWidth: "120px" }, children: item.source })
3070
+ ] }),
3071
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-end", gap: "0.3rem", flexShrink: 0 }, children: [
3072
+ sentimentInfo && /* @__PURE__ */ jsxs("span", { style: { fontSize: "0.65rem", fontWeight: 700, color: sentimentInfo.color, whiteSpace: "nowrap" }, children: [
3073
+ sentimentInfo.arrow,
3074
+ " ",
3075
+ sentimentInfo.label
3076
+ ] }),
3077
+ /* @__PURE__ */ jsx("span", { style: { padding: "0.25rem 0.6rem", borderRadius: "4px", border: `1px solid ${catStyle.borderColor}`, backgroundColor: catStyle.backgroundColor, color: catStyle.color, fontSize: "0.68rem", fontWeight: 600, textTransform: "uppercase", whiteSpace: "nowrap" }, children: item.type === "property" ? catStyle.label : "Market News" })
3078
+ ] })
3079
+ ] })
3080
+ ]
3081
+ }
3082
+ )
3083
+ },
3084
+ key
3085
+ );
3086
+ }) : emptyState ?? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center rounded-2xl border border-dashed border-white/20 px-6 py-10 text-center text-sm text-white/60", children: [
3087
+ /* @__PURE__ */ jsx(Newspaper, { className: "mb-3 h-8 w-8 text-white/40" }),
3088
+ "No property news yet. Updates will land here as soon as we receive new intelligence."
3089
+ ] })
3090
+ }
3091
+ ),
3092
+ isHomeVariant && homeTotalPages > 1 && /* @__PURE__ */ jsxs("div", { className: "mt-3 flex items-center justify-between text-xs text-white/60", children: [
3232
3093
  /* @__PURE__ */ jsx(
3233
3094
  "button",
3234
3095
  {
3235
3096
  type: "button",
3236
- onClick: () => setHomePage((prev) => Math.max(0, prev - 1)),
3097
+ onClick: () => setHomePage((p) => Math.max(0, p - 1)),
3237
3098
  disabled: homePage === 0,
3238
- style: {
3239
- background: "transparent",
3240
- border: "1px solid rgba(255,255,255,0.15)",
3241
- borderRadius: "999px",
3242
- padding: "0.2rem 0.75rem",
3243
- fontSize: "0.7rem",
3244
- textTransform: "uppercase",
3245
- letterSpacing: "0.15em",
3246
- cursor: homePage === 0 ? "not-allowed" : "pointer",
3247
- opacity: homePage === 0 ? 0.4 : 1,
3248
- color: "rgba(255,255,255,0.6)"
3249
- },
3099
+ style: { background: "transparent", border: "1px solid rgba(255,255,255,0.15)", borderRadius: "999px", padding: "0.2rem 0.75rem", fontSize: "0.7rem", textTransform: "uppercase", letterSpacing: "0.15em", cursor: homePage === 0 ? "not-allowed" : "pointer", opacity: homePage === 0 ? 0.4 : 1, color: "rgba(255,255,255,0.6)" },
3250
3100
  children: "Prev"
3251
3101
  }
3252
3102
  ),
@@ -3259,35 +3109,21 @@ var PropertyNewsUpdates = React5.forwardRef(
3259
3109
  "button",
3260
3110
  {
3261
3111
  type: "button",
3262
- onClick: () => setHomePage((prev) => Math.min(homeTotalPages - 1, prev + 1)),
3112
+ onClick: () => setHomePage((p) => Math.min(homeTotalPages - 1, p + 1)),
3263
3113
  disabled: homePage >= homeTotalPages - 1,
3264
- style: {
3265
- background: "transparent",
3266
- border: "1px solid rgba(255,255,255,0.15)",
3267
- borderRadius: "999px",
3268
- padding: "0.2rem 0.75rem",
3269
- fontSize: "0.7rem",
3270
- textTransform: "uppercase",
3271
- letterSpacing: "0.15em",
3272
- cursor: homePage >= homeTotalPages - 1 ? "not-allowed" : "pointer",
3273
- opacity: homePage >= homeTotalPages - 1 ? 0.4 : 1,
3274
- color: "rgba(255,255,255,0.6)"
3275
- },
3114
+ style: { background: "transparent", border: "1px solid rgba(255,255,255,0.15)", borderRadius: "999px", padding: "0.2rem 0.75rem", fontSize: "0.7rem", textTransform: "uppercase", letterSpacing: "0.15em", cursor: homePage >= homeTotalPages - 1 ? "not-allowed" : "pointer", opacity: homePage >= homeTotalPages - 1 ? 0.4 : 1, color: "rgba(255,255,255,0.6)" },
3276
3115
  children: "Next"
3277
3116
  }
3278
3117
  )
3279
- ] }) : null,
3280
- !isPurchaseVariant && !isHomeVariant && hasItems && totalPages > 1 ? /* @__PURE__ */ jsxs("div", { className: "mt-4 flex items-center justify-between text-xs text-white/60", children: [
3118
+ ] }),
3119
+ !isPurchaseVariant && !isHomeVariant && hasItems && totalPages > 1 && /* @__PURE__ */ jsxs("div", { className: "mt-4 flex items-center justify-between text-xs text-white/60", children: [
3281
3120
  /* @__PURE__ */ jsx(
3282
3121
  "button",
3283
3122
  {
3284
3123
  type: "button",
3285
- onClick: () => setPage((prev) => Math.max(0, prev - 1)),
3124
+ onClick: () => setPage((p) => Math.max(0, p - 1)),
3286
3125
  disabled: page === 0,
3287
- className: cn(
3288
- "rounded-full border border-white/15 px-3 py-1 uppercase tracking-[0.2em]",
3289
- page === 0 ? "opacity-40 cursor-not-allowed" : "hover:border-white/40"
3290
- ),
3126
+ className: cn("rounded-full border border-white/15 px-3 py-1 uppercase tracking-[0.2em]", page === 0 ? "opacity-40 cursor-not-allowed" : "hover:border-white/40"),
3291
3127
  children: "Prev"
3292
3128
  }
3293
3129
  ),
@@ -3301,16 +3137,14 @@ var PropertyNewsUpdates = React5.forwardRef(
3301
3137
  "button",
3302
3138
  {
3303
3139
  type: "button",
3304
- onClick: () => setPage((prev) => Math.min(totalPages - 1, prev + 1)),
3140
+ onClick: () => setPage((p) => Math.min(totalPages - 1, p + 1)),
3305
3141
  disabled: page >= totalPages - 1,
3306
- className: cn(
3307
- "rounded-full border border-white/15 px-3 py-1 uppercase tracking-[0.2em]",
3308
- page >= totalPages - 1 ? "opacity-40 cursor-not-allowed" : "hover:border-white/40"
3309
- ),
3142
+ className: cn("rounded-full border border-white/15 px-3 py-1 uppercase tracking-[0.2em]", page >= totalPages - 1 ? "opacity-40 cursor-not-allowed" : "hover:border-white/40"),
3310
3143
  children: "Next"
3311
3144
  }
3312
3145
  )
3313
- ] }) : null
3146
+ ] }),
3147
+ selectedItem && !isHomeVariant && !isPurchaseVariant && /* @__PURE__ */ jsx(NewsArticleModal, { item: selectedItem, onClose: () => setSelectedItem(null) })
3314
3148
  ]
3315
3149
  }
3316
3150
  );