"use client";

/**
 * PticaBottomGrid — the prototype's `.bottom-grid` row, rendered below the lower
 * grid: Investment Clearance · Buy Signal · Legal Status · Site Verdict. Each
 * card wires to REAL /analyze + §22 data with honest placeholders.
 */

import styles from "@/app/site-finder/analysis/[cad]/ptica/ptica.module.css";
import type { ParcelAnalysis } from "@/types/site-finder";
import type { ForecastReport } from "@/types/forecast";
import type { DrawerKey } from "@/components/site-finder/ptica/drawers/drawer-keys";
import { InvestmentClearance } from "./InvestmentClearance";
import { BuySignalCard } from "./BuySignalCard";
import { LegalStatus } from "./LegalStatus";
import { SiteVerdictCard } from "./SiteVerdictCard";

interface Props {
  analysis: ParcelAnalysis;
  forecastReport?: ForecastReport;
  onOpenDrawer: (key: DrawerKey) => void;
}

export function PticaBottomGrid({
  analysis,
  forecastReport,
  onOpenDrawer,
}: Props) {
  return (
    <section id="ptica-economy" className={styles.bottomGrid}>
      <InvestmentClearance analysis={analysis} onOpenDrawer={onOpenDrawer} />
      <BuySignalCard forecastReport={forecastReport} />
      <LegalStatus analysis={analysis} onOpenDrawer={onOpenDrawer} />
      <SiteVerdictCard analysis={analysis} forecastReport={forecastReport} />
    </section>
  );
}
