"use client"; import React from "react"; import { t } from "@/content/locales"; interface HUDProps { credits: number; hp: number; maxHp: number; location: string; targetCredits: number; } export default function HUD({ credits, hp, maxHp, location, targetCredits, }: HUDProps) { const progress = Math.min((credits / targetCredits) * 100, 100); return (
{/* LORE & LOCATION */}
{t.HUD.SECTOR_LABEL} {location.toUpperCase()}
{/* SHIP STATUS (HEALTH) */}
{t.HUD.HULL_LABEL} {hp} / {maxHp}
{/* ECONOMY (CREDITS) */}
{t.HUD.GOAL_LABEL}
{credits.toLocaleString()} / {targetCredits.toLocaleString()}
{/* Progress Bar for the Goal */}
); }