import type { ProposalContent } from "@/lib/proposal/schema";

type Props = { synthesis: ProposalContent["solutionSynthesis"] };

export function SolutionSynthesisSection({ synthesis }: Props) {
  return (
    <div className="h-full flex flex-col justify-center px-16 py-24 space-y-10">
      <div>
        <p className="text-xs font-mono tracking-widest text-muted-foreground uppercase">Sintesi della soluzione</p>
        <h2 className="text-5xl font-light text-foreground mt-4">
          Una direzione, <span className="text-success">cinque elevazioni.</span>
        </h2>
        <p className="text-base text-muted-foreground mt-4 max-w-2xl">
          Da un&apos;unica decisione strategica a monte si declinano cinque movimenti specifici. Il sistema operativo che resta al team interno.
        </p>
      </div>

      <div className="space-y-6">
        {/* Direzione */}
        <div className="border border-primary/20 bg-primary/5 rounded-xl p-6 text-center mx-auto max-w-lg">
          <p className="text-xs font-mono tracking-widest text-primary uppercase mb-2">La direzione</p>
          <p className="text-sm font-medium text-foreground">{synthesis.direction}</p>
        </div>

        {/* Connettori */}
        <div className="flex justify-center">
          <div className="w-px h-8 bg-primary/30" />
        </div>

        {/* Elevazioni */}
        <div className="flex items-center justify-between gap-4">
          {synthesis.elevations.map((e, i) => (
            <div key={e.id} className="flex-1 border border-border rounded-lg px-4 py-3 text-center">
              <p className="text-xs font-mono text-muted-foreground mb-1">0{i + 1} →</p>
              <p className="text-sm font-medium text-foreground">{e.label}</p>
            </div>
          ))}
        </div>
      </div>
    </div>
  );
}
