'use client'; import { useTranslations } from 'next-intl'; import { useEffect } from 'react'; export function Ecosystem() { const t = useTranslations(); useEffect(() => { const grid = document.getElementById('bentoGrid'); let obs: IntersectionObserver; if (grid) { const bars = grid.querySelectorAll('.report-bar'); const ring = grid.querySelector('.ring-progress'); let done = false; obs = new IntersectionObserver( (entries) => { entries.forEach((entry) => { if (entry.isIntersecting && !done) { done = true; bars.forEach((bar, i) => { setTimeout(() => { if (bar.dataset.w) bar.style.width = bar.dataset.w; }, i * 150); }); if (ring && ring.dataset.dash) { setTimeout(() => { ring.style.strokeDasharray = ring.dataset.dash!; }, 200); } obs.disconnect(); } }); }, { threshold: 0.35 }, ); obs.observe(grid); } return () => { if (obs) obs.disconnect(); }; }, []); return (

{t('Ecosystem.title')}

{t('Ecosystem.desc')}

{/* Ticketing */}

{t('Ecosystem.ticketing.title')}

{t('Ecosystem.ticketing.desc')}

TX24409198-8798 TX24409198-8797 TX24409198-8798 TX24409198-8901 TX24409198-8811
TX24409198-8801 TX24409198-8787 TX24409198-8786 TX24409198-8901 TX24409198-8881
TX24409198-8902 TX24409198-8788 TX24409198-8790 TX24409198-8905 TX24409198-8812
{/* Access Management */}
{t('Ecosystem.stats.qr')}
{t('Ecosystem.stats.gate')}
{t('Ecosystem.stats.rfid')}
0.4s {t('Ecosystem.stats.avg')}

{t('Ecosystem.access.title')}

{t('Ecosystem.access.desc')}

{/* Visitor Operations */}
{t('Ecosystem.stats.queue')}

{t('Ecosystem.visitor.title')}

{t('Ecosystem.visitor.desc')}

{/* Report */}

{t('Ecosystem.report.title')}

{t('Ecosystem.report.desc')}

{[ { w: '150px', bg: '#b9f001', val: 'Rp32.5M', key: 'Ecosystem.stats.revenue' }, { w: '220px', bg: '#f66b0e', val: '1,284', key: 'Ecosystem.stats.visitors' }, { w: '300px', bg: '#112b3c', val: '1,120,240', key: 'Ecosystem.stats.checkin' }, ].map((item, idx) => (
{item.val} {(t as any)(item.key)}
))}
); }