"use client";
import clsx from "clsx";
import Link from "next/link";
import type { Dispatch, SetStateAction } from "react";
import { LogIn, UserRound } from "lucide-react";
import { ProFeaturePaywall } from "@/components/dashboard/ProFeaturePaywall";
import { LoadingSignal } from "@/components/dashboard/scan-terminal/LoadingSignal";
import type { Locale } from "@/lib/i18n";
export type ScanTerminalContentView = "city-list" | "analysis";
type ThemeMode = "dark" | "light";
export function ScanTerminalLoadingScreen({
isEn,
rootClassName,
themeMode,
userLocalTime,
}: {
isEn: boolean;
rootClassName: string;
themeMode: ThemeMode;
userLocalTime: string;
}) {
return (
{isEn ? "AI Weather Decision Terminal" : "AI 天气交易决策台"}
{isEn
? "Loading paid decision cards, city evidence, and market signals"
: "正在加载付费决策卡、城市证据和市场信号"}
{userLocalTime}
);
}
export function ScanTerminalTopBar({
accountHref,
isAuthenticated,
isEn,
isPro,
locale,
onOpenScanPaywall,
setThemeMode,
themeMode,
toggleLocale,
userLocalTime,
}: {
accountHref: string;
isAuthenticated: boolean;
isEn: boolean;
isPro: boolean;
locale: Locale;
onOpenScanPaywall: () => void;
setThemeMode: Dispatch>;
themeMode: ThemeMode;
toggleLocale: () => void;
userLocalTime: string;
}) {
return (
{isEn ? "AI Weather Decision Terminal" : "AI 天气交易决策台"}
{isEn
? "Paid workspace for city evidence, model signals, and weather-market decisions"
: "面向付费用户的城市证据、模型信号与天气市场决策工作区"}
{userLocalTime}
{isPro ? null : isAuthenticated ? (
) : (
{isEn ? "Sign in" : "登录"}
)}
{isAuthenticated ? (
) : null}
);
}
export function ScanPaywallModal({
isEn,
onClose,
}: {
isEn: boolean;
onClose: () => void;
}) {
return (
{
if (event.target === event.currentTarget) {
onClose();
}
}}
>
);
}