import { Anchor } from "lucide-react";
import { Code } from "@mantine/core";

import { SectionCard } from "./SectionCard";

export interface BookingContractSummaryCardProps {
  summary: string;
}

/** Generated contract terms, shown verbatim. */
export function BookingContractSummaryCard({ summary }: BookingContractSummaryCardProps) {
  return (
    <SectionCard icon={Anchor} title="Contract summary" accent="teal">
      <Code
        block
        style={{
          maxHeight: 256,
          overflow: "auto",
          whiteSpace: "pre-wrap",
          background: "var(--mantine-color-gray-0)",
        }}
      >
        {summary}
      </Code>
    </SectionCard>
  );
}
