import { StatusBadge, type PlatformWebModule } from "@govoplan/core-webui";

export default function InstalledModulesWidget({ modules }: { modules: PlatformWebModule[] }) {
  if (!modules.length) return <p className="muted">No WebUI modules are active.</p>;

  return (
    <dl className="detail-list dashboard-compact-list">
      {modules.map((module) =>
      <div key={module.id}>
          <dt><StatusBadge status="success" label={module.id} /></dt>
          <dd><strong>{module.label}</strong><span className="muted"> v{module.version}</span></dd>
        </div>
      )}
    </dl>);
}

