"use client";

/**
 * PticaLowerGrid — the prototype's `.lower-grid` row, rendered below the
 * Development Scan: ОКС · Development Potential · Recommended Product ·
 * Инсоляционная матрица. Each card wires to REAL /analyze + §22 data with honest
 * placeholders and opens its detail drawer via `onOpenDrawer`.
 */

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 { OksCard } from "./OksCard";
import { DevelopmentPotentialCard } from "./DevelopmentPotentialCard";
import { RecommendedProductCard } from "./RecommendedProductCard";
import { InsolationCard } from "./InsolationCard";

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

export function PticaLowerGrid({
  analysis,
  forecastReport,
  onOpenDrawer,
}: Props) {
  return (
    <section id="ptica-potential" className={styles.lowerGrid}>
      <OksCard onOpenDrawer={onOpenDrawer} />
      <DevelopmentPotentialCard
        analysis={analysis}
        onOpenDrawer={onOpenDrawer}
      />
      <RecommendedProductCard
        forecastReport={forecastReport}
        onOpenDrawer={onOpenDrawer}
      />
      <InsolationCard analysis={analysis} onOpenDrawer={onOpenDrawer} />
    </section>
  );
}
