import { useLang } from "../LanguageContext"; // Four product interfaces drawn at 720x460. Each moves through three states: // 0 drawing (dashed blueprint + dimensions), 1 object (filled), 2 running (live + measured callout). const Bar = ({ w, h = 6, c = "rgba(18,20,19,.14)", className = "", style }) => (
); const Win = ({ children, title, crumb, right }) => (
{title} / {crumb}
{right}
{children}
); const Dim = ({ children, style }) => {children}; const Callout = ({ children, style, side = "left" }) => (
{side === "right" && }
{children}
{side === "left" && }
); const Live = ({ label = "Live" }) => ( {label} ); /* ---------------- Ledgerline : treasury ---------------- */ export function LedgerUI({ step }) { const { isRtl } = useLang(); const pts = [62, 58, 64, 60, 70, 66, 74, 71, 80, 77, 86, 83, 92, 96]; const path = pts.map((v, i) => `${i ? "L" : "M"}${(i / (pts.length - 1)) * 420} ${140 - v * 1.25}`).join(" "); const rows = isRtl ? [ ["شرکت نورث‌ویند", "€ ۱,۲۰۴,۰۰۰.۰۰"], ["آکیرو کی‌کی", "¥ ۸۸,۴۰۰,۰۰۰"], ["هالورسن آ‌اس", "kr ۳,۹۰۰,۵۰۰"], ["اورتیز و واله", "$ ۶۴۰,۲۱۰.۰۰"], ["بانکا لومه", "€ ۹۲,۰۰۰.۰۰"], ] : [ ["Northwind GmbH", "€ 1,204,000.00"], ["Akiro KK", "¥ 88,400,000"], ["Halvorsen AS", "kr 3,900,500"], ["Ortiz & Vale", "$ 640,210.00"], ["Banca Lume", "€ 92,000.00"], ]; return (
EUR · } >
{isRtl ? "تراز تجمیعی · ۲۳ حساب · ۹ ارز بین‌الملل" : "Consolidated · 23 accounts · 9 currencies"}
€48,213,940.12
h 100
{isRtl ? "وضعیت ۹۰ روزه" : "90 DAY POSITION"} +12.8%
{[0, 1, 2, 3].map((g) => ( ))}
{isRtl ? "تیر" : "JUL"} {isRtl ? "مرداد" : "AUG"} {isRtl ? "شهریور" : "SEP"}
w 440 · chart 90d
{isRtl ? "تسویه‌ها" : "SETTLEMENTS"} {isRtl ? "امروز ۲۱۴" : "today 214"}
{rows.map(([n, a], i) => (
{n}
{a} {step === 2 && i === 2 ? isRtl ? "تسویه ۱۴۰ms" : "settled 138ms" : i < 2 ? isRtl ? "در انتظار" : "pending" : isRtl ? "تسویه شد" : "settled"}
))} w 232 · list ×n
{isRtl ? "تاخیر p99 تسویه" : "p99 settlement"}
140 ms
); } /* ---------------- Tidewater : berth planning ---------------- */ export function TideUI({ step }) { const { isRtl } = useLang(); const ships = [ { b: 0, x: 30, w: 170, n: "MSC Aurelia", t: "ETA 02:10" }, { b: 0, x: 240, w: 210, n: "Kobe Express", t: "ETA 09:40" }, { b: 1, x: 90, w: 150, n: "Nordlys", t: "ETA 04:00" }, { b: 1, x: 260, w: 140, n: "Cap Ferro", t: "ETA 11:20", conflict: true }, { b: 2, x: 20, w: 260, n: "Ever Lumen", t: "ETA 00:30" }, { b: 3, x: 300, w: 180, n: "Saga Viking", t: "ETA 13:00" }, { b: 4, x: 60, w: 200, n: "Atlantic Wren", t: "ETA 03:15" }, { b: 4, x: 300, w: 120, n: "Hanse 7", t: "ETA 12:30" }, ]; const tabs = isRtl ? ["اسکله‌ها", "جرثقیل‌ها", "محوطه کانتینر", "گیت‌ها"] : ["Berths", "Cranes", "Yard", "Gates"]; return (
{isRtl ? "۳۲ شناور" : "32 calls"} · } >
{tabs.map((t, i) => (
{t}
))}
{isRtl ? `بهره‌وری ${step === 2 ? "۹۱٪" : "۷۴٪"}` : `utilisation ${step === 2 ? "91%" : "74%"}`}
{["00", "04", "08", "12", "16", "20", "24"].map((h) => ( {h}:00 ))}
{[0, 1, 2, 3, 4].map((b) => (
{isRtl ? `اسکله ${b + 1}` : `Berth ${b + 1}`}
))}
{isRtl ? "اکنون" : "NOW"}
{ships.map((s, i) => { const moved = step === 2 && s.conflict; return (
{s.n} {moved ? isRtl ? "تغییر اسکله · بدون توقف" : "re-berthed · 0 wait" : s.conflict && step === 1 ? isRtl ? "تداخل ۲س ۱۰د" : "overlap 2h 10m" : s.t}
); })} {isRtl ? "ارتفاع ۶۲ · ۵ اسکله · محور ۲۴ ساعته" : "row h 62 · 5 berths · 24h axis"}
{isRtl ? "معطلی اسکله" : "berth idle time"}
−31%
); } /* ---------------- Quire : contract review ---------------- */ export function QuireUI({ step }) { const { isRtl } = useLang(); const para = (ws, key, hl) => (
{ws.map((w, i) => ( ))}
); return (
{isRtl ? "۴۸ ص" : "48 pp"} · {isRtl ? "شیوه‌نامه: استاندارد" : "Playbook: Standard"} } >
{isRtl ? "بند ۱۴ · مسئولیت طرفین" : "§ 14 · LIABILITY"}
{isRtl ? "۱۴.۲ سقف مسئولیت مدنی" : "14.2 Limitation of liability"}
{para([360, 340, 352, 210], "a")}
{isRtl ? ( <> مجموع مسئولیت تامین‌کننده نباید از{" "} کارمزدهای پرداخت‌شده در سه (۳) ماه گذشته {step === 2 && ( {" "}دو برابر (۲×) مجموع کارمزدهای پرداخت‌شده در دوازده (۱۲) ماه گذشته فراتر رود. )} ) : ( <> Supplier’s aggregate liability shall not exceed{" "} fees paid in the preceding three (3) months {step === 2 && ( {" "}two times (2×) the fees paid in the preceding twelve (12) months )} . )}
{para([350, 362, 300], "b")} {para([340, 356, 120], "c")} page w 420 · measure 62ch
{isRtl ? "بازبینی خودکار" : "REVIEW"}
{step === 2 ? "0" : "3"} {step === 2 ? isRtl ? "انحراف باز" : "open deviations" : isRtl ? "انحراف از شیوه‌نامه" : "deviations from playbook"}
{[ [ "14.2", isRtl ? "سقف مسئولیت کمتر از ۱۲ ماه" : "Liability cap below 12-month fees", true, ], [ "9.1", isRtl ? "تمدید خودکار بدون اعلام قبلی" : "Auto-renewal without notice", false, ], [ "21.4", isRtl ? "قانون حاکم: نامشخص" : "Governing law: unlisted", false, ], ].map(([c, t, main], i) => (
= 1 ? "!border-[var(--blaze)]" : ""}`} style={{ "--i": 3 + i }} >
§ {c} {step === 2 ? isRtl ? "حل شد" : "resolved" : main ? isRtl ? "ریسک بالا" : "high" : isRtl ? "عادی" : "low"}
{t}
))} panel w 244
{isRtl ? "میانگین زمان بازبینی" : "median review"}
{isRtl ? "۶ ساعت ← ۴۰ دقیقه" : "6 h → 40 min"}
); } /* ---------------- Halden : clinical trial ops ---------------- */ export function HaldenUI({ step }) { const { isRtl } = useLang(); const sites = [ [60, 70, 9], [120, 50, 6], [170, 110, 12], [90, 160, 7], [230, 80, 5], [280, 140, 10], [210, 200, 8], [330, 60, 4], [350, 190, 9], [140, 230, 6], [300, 250, 11], [390, 120, 5], [60, 250, 4], [250, 30, 6], ]; const flagged = 5; return (
{isRtl ? "۱۴ مرکز" : "14 sites"} · } >
{Array.from({ length: 12 }).map((_, i) => ( ))} {Array.from({ length: 10 }).map((_, i) => ( ))} {sites.map(([x, y, r], i) => ( ))}
{isRtl ? "پذیرش به تفکیک مرکز بالینی · نقطه = بیماران" : "ENROLMENT BY SITE · DOT = PATIENTS"}
{isRtl ? "۴۱۲ پذیرش‌شده" : "412 enrolled"} {isRtl ? "هدف ۶۰۰" : "target 600"} {isRtl ? "روز ۲۱۴" : "day 214"}
map 440 × 390
{isRtl ? "سیگنال‌ها و هشدارها" : "SIGNALS"}
{[ [ isRtl ? "مرکز ۰۶ · لیدن" : "Site 06 · Leiden", isRtl ? "ریسک انحراف از پروتکل" : "Visit window drift", 0.72, true, ], [isRtl ? "مرکز ۰۳ · پورتو" : "Site 03 · Porto", isRtl ? "مطابق برنامه" : "On track", 0.9], [isRtl ? "مرکز ۱۱ · لیون" : "Site 11 · Lyon", isRtl ? "مطابق برنامه" : "On track", 0.64], [isRtl ? "مرکز ۰۹ · گراتس" : "Site 09 · Graz", isRtl ? "مطابق برنامه" : "On track", 0.58], [isRtl ? "مرکز ۰۱ · تورکو" : "Site 01 · Turku", isRtl ? "مطابق برنامه" : "On track", 0.81], ].map(([n, s, v, f], i) => (
{n}
{step === 2 && f ? (isRtl ? "ریسک انحراف · ۳ بیمار" : "Deviation risk · 3 pts") : s}
))} w 232 · signal ×n
{isRtl ? "کشف انحرافات" : "deviations caught"}
{isRtl ? "۹ روز زودتر" : "9 days earlier"}
); }