import { statusLabels } from "@/features/host-org/constants.js";

export function HostOrgStatus({ value }) {
  const status = value || "-";
  const tone = getStatusTone(status);

  return (
    <span className={`status-badge status-badge--${tone}`}>
      <span className="status-point" />
      {statusLabels[status] || status}
    </span>
  );
}

function getStatusTone(status) {
  if (status === "active") {
    return "running";
  }
  if (status === "closed" || status === "disabled") {
    return "danger";
  }
  return "stopped";
}
