const BUILD_SHA = process.env.NEXT_PUBLIC_BUILD_SHA ?? "dev";
const BUILD_REV = process.env.NEXT_PUBLIC_BUILD_REV ?? "local";

interface StatusTerminalProps {
  location?: string;
  status?: string;
  className?: string;
}

export function StatusTerminal({
  location = "39.0997° N, 94.5786° W",
  status = "ONLINE",
  className = "",
}: StatusTerminalProps) {
  const sha = BUILD_SHA.length > 8 ? `sha-${BUILD_SHA.slice(0, 8)}` : `sha-${BUILD_SHA}`;
  return (
    <div className={`flex items-center gap-3 ${className}`}>
      <span className="flex h-2 w-2 rounded-full bg-tertiary shadow-[0_0_8px_#8eff71]" />
      <span className="font-label text-[10px] uppercase tracking-[0.2em] text-tertiary">
        LOC: {location} | STATUS: {status} | REV: {BUILD_REV} | {sha}
      </span>
    </div>
  );
}
