// Amber banner when the region's pricing.json is incomplete — cost columns
// are $0 placeholders, so the reader must know before trusting any number.

import type { PricingCoverageResult } from "@/engine/pricing";

export function PricingCoverageBanner({ coverage }: { coverage: PricingCoverageResult }) {
  if (coverage.allCovered !== false) return null;
  const missing = [
    ...coverage.missingCompute.map((t) => `compute: ${t}`),
    ...(coverage.missingStorageRate ? [`storage rate: ${coverage.missingStorageRate}`] : []),
  ];
  return (
    <div className="rounded-lg border border-warning/30 bg-warning-muted px-4 py-3 text-sm">
      <span className="font-medium text-warning">Pricing incomplete — </span>
      <span className="text-text-secondary">
        cost figures below are placeholders.{" "}
        <span title={missing.join(", ")}>{missing.length} missing rate(s)</span>
      </span>
    </div>
  );
}
