// components.jsx — theme-aware homepage sections for saraslot // Loaded after React + Babel. Exports components on window. const { useState, useEffect, useRef, useCallback } = React; /* ───────────────────────────────────────────────────────────── ICONS — minimal inline SVG/text for reliability ──────────────────────────────────────────────────────────── */ const Icon = ({ name, size = 18, color = "currentColor" }) => { const s = size, c = color; switch (name) { case "soccer": return ; case "trophy": return ; case "crown": return ; case "ticket": return ; case "home": return ; case "history": return ; case "chat": return ; case "settings": return ; case "slot": return ; case "live": return ; case "esport": return ; case "lightning": return ; case "menu": return ; case "invite": return ; case "link": return ; case "downline": return ; case "gift": return ; case "female": return ; default: return null; } }; window.Icon = Icon; /* ───────────────────────────────────────────────────────────── Logo — theme-specific ──────────────────────────────────────────────────────────── */ function Logo({ theme }) { if (theme === "jade") { return (
saraslot
); } if (theme === "neon") { return (
saraslot
); } return (
saraslot
); } window.Logo = Logo; /* ───────────────────────────────────────────────────────────── AppDownloadBanner ──────────────────────────────────────────────────────────── */ function AppDownloadBanner({ onDismiss }) { return (
App · Download And Play Now!
★★★★★ 4.9 · 50K+ players
); } window.AppDownloadBanner = AppDownloadBanner; /* ───────────────────────────────────────────────────────────── Header ──────────────────────────────────────────────────────────── */ function Header({ theme, navigate }) { const goHome = () => { if (navigate) navigate("/"); else window.location.hash = "/"; }; return (
); } window.Header = Header; /* ───────────────────────────────────────────────────────────── HeroCarousel ──────────────────────────────────────────────────────────── */ const HERO_SLIDES = [ { eyebrow: "Hari Rebate", title: "2 HARI REBATE", big: "GAO GAO 6%", body: "Get Win or Lose — NO TURNOVER! NO ROLLOVER!", cta: "Claim Now", art: "medal", }, { eyebrow: "Welcome Bonus", title: "BONUS DAFTAR", big: "RM 88 FREE", body: "New members only. Instant credit, no deposit needed to start.", cta: "Daftar Now", art: "coins", }, { eyebrow: "Sports Reload", title: "EURO 2026", big: "150% BOOST", body: "Live every match. Bigger odds, faster payouts, zero fees.", cta: "Bet Now", art: "ball", }, ]; function MedalArt({ theme }) { if (theme === "neon") { return ( REBATE 6% ); } if (theme === "jade") { return ( REBATE 6% ); } return ( {/* Outer 8-point star */} REBATE 6% ); } function CoinsArt({ theme }) { const coinColors = theme === "neon" ? ["#39FF14", "#00F0FF", "#FF00C8"] : theme === "jade" ? ["#D4AF37", "#C8102E", "#D4AF37"] : ["#FFD24A", "#FFB800", "#E60012"]; return ( {[[24, 22], [80, 18], [44, 50], [86, 60], [18, 78], [70, 92]].map((p, i) => ( $ ))} ); } function BallArt({ theme }) { if (theme === "neon") { return ( ); } return ( ); } function HeroArtBySlide({ slide, theme }) { if (slide.art === "coins") return ; if (slide.art === "ball") return ; return ; } function HeroCarousel({ theme }) { const [idx, setIdx] = useState(0); const pausedRef = useRef(false); const total = HERO_SLIDES.length; useEffect(() => { const t = setInterval(() => { if (!pausedRef.current) setIdx((i) => (i + 1) % total); }, 5000); return () => clearInterval(t); }, [total]); const slide = HERO_SLIDES[idx]; return (
{ pausedRef.current = true; }} onTouchEnd={() => { pausedRef.current = false; }} onMouseEnter={() => { pausedRef.current = true; }} onMouseLeave={() => { pausedRef.current = false; }} >
{slide.eyebrow}

{slide.title}

{slide.big}

{slide.body}

{HERO_SLIDES.map((_, i) => ( setIdx(i)} /> ))}
Malaysia's Trusted Online Gaming Platform
); } window.HeroCarousel = HeroCarousel; /* ───────────────────────────────────────────────────────────── Marquee ──────────────────────────────────────────────────────────── */ const MARQUEE_ITEMS = [ "Trusted Across Asia", "10+ Years of Operation", "Stable System", "Smooth Transactions", "24/7 Live Support", "Instant Payout", "Licensed & Audited", ]; function MarqueeStrip() { const content = ( {MARQUEE_ITEMS.map((t, i) => ( {t} · ))} ); return (
{content} {content}
); } window.MarqueeStrip = MarqueeStrip; /* ───────────────────────────────────────────────────────────── FeatureCardRow ──────────────────────────────────────────────────────────── */ const FEATURE_CARDS = [ { key: "soccer", title: "Soccer", sub: "Make Your Predictions Now", icon: "⚽" }, { key: "leader", title: "Leaderboard", sub: "Mega Win, Are You In?", icon: "📣" }, { key: "rank", title: "Ranking", sub: "Become Top 30 Hero List!", icon: "👑" }, { key: "tourney", title: "Tournament", sub: "Compete Weekly Prizes", icon: "🏆" }, ]; function FeatureCardRow({ theme }) { return (
{FEATURE_CARDS.map((c) => (
{c.title}
{c.sub}
{c.icon}
))}
); } window.FeatureCardRow = FeatureCardRow; /* ───────────────────────────────────────────────────────────── ReferralBar ──────────────────────────────────────────────────────────── */ function ReferralBar({ theme }) { return (
Referral
Share to Earn More!
); } window.ReferralBar = ReferralBar; Object.assign(window, { Icon, Logo, AppDownloadBanner, Header, HeroCarousel, MarqueeStrip, FeatureCardRow, ReferralBar });