import type { ProposalContent } from "@/lib/proposal/schema";
import { CheckCircle2 } from "lucide-react";

type Props = { scope: ProposalContent["scope"] };

export function ScopeSection({ scope }: Props) {
  return (
    <div className="h-full flex items-center px-16 py-24">
      <div className="grid grid-cols-2 gap-12 w-full">
        {/* Scope */}
        <div className="border border-primary/20 bg-primary/5 rounded-xl p-8 space-y-4">
          <div className="w-10 h-10 rounded-full border border-primary flex items-center justify-center">
            <div className="w-5 h-5 rounded-full bg-primary/30" />
          </div>
          <p className="text-xs font-mono tracking-widest text-primary uppercase">Scope · Capitolo del lavoro</p>
          <h3 className="text-xl font-medium text-foreground">{scope.scopeTitle}</h3>
          <p className="text-sm text-muted-foreground leading-relaxed">{scope.scopeBody}</p>
        </div>

        {/* Obiettivi */}
        <div className="border border-border bg-muted/30 rounded-xl p-8 space-y-4">
          <div className="w-10 h-10 rounded-full border border-border flex items-center justify-center">
            <div className="w-0 h-0 border-l-[6px] border-l-transparent border-r-[6px] border-r-transparent border-b-[10px] border-b-foreground" />
          </div>
          <p className="text-xs font-mono tracking-widest text-muted-foreground uppercase">Obiettivi · Punti d&apos;arrivo</p>
          <h3 className="text-xl font-medium text-foreground">Quattro risultati concreti, misurabili al termine.</h3>
          <ul className="space-y-2">
            {scope.objectives.map((obj, i) => (
              <li key={i} className="flex items-start gap-2 text-sm text-foreground">
                <CheckCircle2 size={14} className="text-primary mt-0.5 shrink-0" />
                <span dangerouslySetInnerHTML={{ __html: obj }} />
              </li>
            ))}
          </ul>
        </div>
      </div>
    </div>
  );
}
