import { useState } from "react"; import type { EngineStats, PublicConfig } from "../types"; import { Card } from "./Card"; import { control } from "../api"; import { clsx, pct } from "../format"; interface Props { stats: EngineStats; config: PublicConfig; } function Toggle({ label, on, onChange, }: { label: string; on: boolean; onChange: (v: boolean) => void; }): JSX.Element { return ( ); } export function Controls({ stats, config }: Props): JSX.Element { const [threshold, setThreshold] = useState(config.minNetProfitPct); const paused = stats.circuit === "paused"; return (
{paused ? ( ) : ( )}
control.setDemo(v)} />
Min net edge {pct(threshold)}
{ const v = Number(e.target.value); setThreshold(v); control.setThreshold(v); }} className="w-full accent-accent" />
Taker fees K {pct(config.takerFees.kraken, 2)} · By{" "} {pct(config.takerFees.bybit, 2)} · O{" "} {pct(config.takerFees.okx, 2)} · Bn{" "} {pct(config.takerFees.binance, 2)}
Stale / confirm {config.staleMs}ms / {config.flickerConfirmMs}ms
); }