# Add the "Venue Rental" block to this P1 project

Add a Puck component from P1 Blocks (https://p1-blocks.prolificdigital.io/blocks/venue-rental) to this Pantheon Content Publisher (P1) Next.js project. Rentable spaces with large standing and seated capacities, catering and AV notes, and a no-JS inquiry form.

## Steps

1. Create `components/puck/venue-rental-block.tsx` with the exact file contents below. If `components/puck/` doesn't exist, find the folder where this project keeps its Puck components (look at the imports in `puck.config.tsx`) and put it there.
2. In `puck.config.tsx`, import it: `import { venueRentalBlock } from "./components/puck/venue-rental-block";`
3. Register it under `components` as `VenueRentalBlock: venueRentalBlock`.
4. Add `"VenueRentalBlock"` to the best-fitting entry in `categories` (this block's library category is "Arts & culture"). Create a category only if none fits.
5. Run the project's type check (usually `pnpm typecheck`) and resolve anything project-specific.
6. If `package.json` has a `sync:registry` script, tell the user it must run (or that CI will run it) before the new component appears in the P1 editor.

## Rules

- Do not add dependencies. The block is self-contained by design: one type-only import from `@puckeditor/core`, Tailwind v4 classes, no client JavaScript.
- Keep the files as-is unless the user asks for changes. The accent color is `indigo-*`; if the project has brand colors, offer to swap them with a find-and-replace on `indigo-`.
- Images are plain `imageUrl` + `imageAlt` text fields. If this project defines a P1 media-library field (search for `"p1-media"`), offer to switch to it.
- Don't change prop names in `defaultProps`. Content editors' saved pages depend on them.

## File: `components/puck/venue-rental-block.tsx`

```tsx
import type { ComponentConfig } from "@puckeditor/core";

/**
 * Venue Rental — "host your event" for a museum or performing arts center: rentable spaces as
 * alternating photo spreads with standing and seated capacity set large, catering and AV notes,
 * and an inquiry form (name, email, date, guests, event type) that posts to your handler.
 * Register: `VenueRentalBlock: venueRentalBlock` in puck.config.tsx.
 */

type Heading = "h1" | "h2" | "h3" | "h4";

type Space = {
  name: string;
  imageUrl: string;
  imageAlt: string;
  standing: string;
  seated: string;
  size: string;
  description: string;
  features: string;
};

export type VenueRentalProps = {
  eyebrow: string;
  heading: string;
  headingLevel: Heading;
  intro: string;
  spaces: Space[];
  cateringHeading: string;
  cateringNote: string;
  avHeading: string;
  avNote: string;
  formHeading: string;
  formIntro: string;
  formAction: string;
  eventTypes: string;
  submitLabel: string;
  privacyNote: string;
  contact: string;
};

const SUB = { h1: "h2", h2: "h3", h3: "h4", h4: "h5" } as const;
const ring = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600";
const input =
  "block min-h-12 w-full rounded-none border-0 border-b border-neutral-950 bg-white px-3 py-2 text-base text-neutral-950 placeholder:text-neutral-500 focus:border-indigo-600 focus:outline-2 focus:outline-offset-0 focus:outline-indigo-600";
const fieldLabel = "block text-xs font-semibold tracking-widest text-neutral-950 uppercase";

export const venueRentalBlock: ComponentConfig<VenueRentalProps> = {
  label: "Venue Rental",
  fields: {
    eyebrow: { type: "text", label: "Eyebrow", metadata: { help: "Leave blank to hide it." } },
    heading: { type: "text", label: "Heading" },
    headingLevel: {
      type: "select",
      label: "Heading level",
      options: [
        { label: "H1", value: "h1" },
        { label: "H2", value: "h2" },
        { label: "H3", value: "h3" },
        { label: "H4", value: "h4" },
      ],
      metadata: { help: "Sets the page outline for screen readers and search. The look doesn't change." },
    },
    intro: { type: "textarea", label: "Intro", metadata: { help: "Leave blank to hide it." } },
    spaces: {
      type: "array",
      label: "Spaces",
      min: 1,
      max: 6,
      getItemSummary: (item) => item?.name || "Space",
      defaultItemProps: { name: "New space", imageUrl: "https://picsum.photos/seed/eventspace/1400/1000", imageAlt: "", standing: "100", seated: "60", size: "", description: "", features: "" },
      arrayFields: {
        name: { type: "text", label: "Space name" },
        imageUrl: { type: "text", label: "Image URL" },
        imageAlt: { type: "text", label: "Image alt text", metadata: { help: "Describe the room for screen reader users." } },
        standing: { type: "text", label: "Standing capacity", metadata: { help: "A number, like 400. Leave blank to hide it." } },
        seated: { type: "text", label: "Seated capacity", metadata: { help: "A number, like 220. Leave blank to hide it." } },
        size: { type: "text", label: "Size", metadata: { help: "Like 4,800 sq. ft. Leave blank to hide it." } },
        description: { type: "textarea", label: "Description" },
        features: { type: "text", label: "Features", metadata: { help: "Separate with commas, like River views, Dance floor, Built-in bar." } },
      },
    },
    cateringHeading: { type: "text", label: "Catering heading" },
    cateringNote: { type: "textarea", label: "Catering note", metadata: { help: "Leave blank to hide it." } },
    avHeading: { type: "text", label: "AV heading" },
    avNote: { type: "textarea", label: "AV note", metadata: { help: "Leave blank to hide it." } },
    formHeading: { type: "text", label: "Form heading" },
    formIntro: { type: "textarea", label: "Form intro", metadata: { help: "Leave blank to hide it." } },
    formAction: { type: "text", label: "Form action URL", metadata: { help: "Where the form posts, like your form service or /api/rental-inquiry." } },
    eventTypes: { type: "textarea", label: "Event types", metadata: { help: "One per line. Shown as the Event type dropdown." } },
    submitLabel: { type: "text", label: "Submit button text" },
    privacyNote: { type: "text", label: "Privacy note", metadata: { help: "Small print under the button. Leave blank to hide it." } },
    contact: { type: "text", label: "Contact line", metadata: { help: "Like Prefer to talk? Call 555-0186. Leave blank to hide it." } },
  },
  defaultProps: {
    eyebrow: "Private events",
    heading: "Host your evening among the art",
    headingLevel: "h2",
    intro: "Weddings, galas, dinners and company retreats in three spaces at the Halvorsen. Every rental supports free admission for students and families.",
    spaces: [
      {
        name: "The Sculpture Court",
        imageUrl: "https://picsum.photos/seed/sculpturecourt/1400/1000",
        imageAlt: "A glass-roofed courtyard with bronze sculptures and round dinner tables set with candles",
        standing: "400",
        seated: "240",
        size: "6,200 sq. ft.",
        description: "Our glass-roofed atrium, lit by daylight until sunset and by 300 programmable fixtures after. The museum's most-requested space for weddings and galas.",
        features: "Glass roof, Dance floor, Stage risers, Accessible entrance",
      },
      {
        name: "Riverview Terrace",
        imageUrl: "https://picsum.photos/seed/riverterrace/1400/1000",
        imageAlt: "A stone terrace overlooking a wide river at dusk, with string lights and lounge seating",
        standing: "180",
        seated: "120",
        size: "3,100 sq. ft.",
        description: "An open-air terrace over the Mississippi with a heated pavilion for cooler nights. May through October.",
        features: "River views, Heated pavilion, Built-in bar",
      },
      {
        name: "Lindgren Auditorium",
        imageUrl: "https://picsum.photos/seed/lindgrenaud/1400/1000",
        imageAlt: "A wood-paneled auditorium with tiered red seats facing a small stage and screen",
        standing: "",
        seated: "280",
        size: "",
        description: "Tiered seating for talks, screenings and annual meetings, with a green room and recording booth.",
        features: "4K projection, Induction loop, Green room, Recording booth",
      },
    ],
    cateringHeading: "Catering",
    cateringNote: "Choose from four approved caterers, all local and all able to handle dietary needs. Bar service is through the museum.",
    avHeading: "Audio & visual",
    avNote: "House sound, wireless microphones and projection are included. A museum technician staffs every event.",
    formHeading: "Start an inquiry",
    formIntro: "Tell us a little about your event. Our events team replies within two business days with availability and pricing.",
    formAction: "/api/rental-inquiry",
    eventTypes: "Wedding or reception\nGala or fundraiser\nCorporate event\nPrivate dinner\nMeeting or lecture\nSomething else",
    submitLabel: "Send inquiry",
    privacyNote: "We only use your details to reply to this inquiry.",
    contact: "Prefer to talk? Call 555-0186 or email events@halvorsen.example.org",
  },
  render: ({ id, eyebrow, heading, headingLevel, intro, spaces, cateringHeading, cateringNote, avHeading, avNote, formHeading, formIntro, formAction, eventTypes, submitLabel, privacyNote, contact }) => {
    const H = headingLevel || "h2";
    const Sub = SUB[H] ?? "h3";
    const uid = `p1-rental-${id}`;
    const list = (spaces ?? []).filter((s) => s?.name);
    const types = (eventTypes || "").split("\n").map((t) => t.trim()).filter(Boolean);

    return (
      <section className="bg-white px-4 py-16 sm:px-6 sm:py-20 lg:px-8 lg:py-24">
        <div className="mx-auto max-w-7xl">
          {eyebrow || heading || intro ? (
            <header className="mx-auto max-w-4xl text-center">
              {eyebrow ? <p className="text-xs font-semibold tracking-widest text-indigo-700 uppercase">{eyebrow}</p> : null}
              {heading ? <H className={`${eyebrow ? "mt-4" : ""} font-serif text-5xl leading-none font-normal tracking-tight text-balance text-neutral-950 sm:text-7xl`}>{heading}</H> : null}
              {intro ? <p className="mx-auto mt-6 max-w-2xl text-lg leading-8 text-pretty text-neutral-600">{intro}</p> : null}
            </header>
          ) : null}

          {list.length ? (
            <ul role="list" className="mt-14 space-y-16 lg:mt-20 lg:space-y-24">
              {list.map((s, i) => {
                const feats = (s.features || "").split(",").map((f) => f.trim()).filter(Boolean);
                const flip = i % 2 === 1;
                return (
                  <li key={`${s.name}-${i}`}>
                    <article className="grid grid-cols-1 gap-8 lg:grid-cols-12 lg:items-center lg:gap-12">
                      {s.imageUrl ? (
                        <div className={`lg:col-span-7 ${flip ? "lg:order-2" : ""}`}>
                          <img src={s.imageUrl} alt={s.imageAlt || ""} loading="lazy" className="aspect-4/3 w-full bg-neutral-100 object-cover" />
                        </div>
                      ) : null}
                      <div className={`${s.imageUrl ? "lg:col-span-5" : "lg:col-span-12"} ${flip ? "lg:order-1" : ""}`}>
                        <p aria-hidden="true" className="font-serif text-sm text-neutral-500 italic tabular-nums">
                          {String(i + 1).padStart(2, "0")} / {String(list.length).padStart(2, "0")}
                        </p>
                        <Sub className="mt-2 font-serif text-3xl leading-tight font-normal tracking-tight text-balance text-neutral-950 sm:text-4xl">{s.name}</Sub>
                        {s.standing || s.seated || s.size ? (
                          <dl className="mt-6 grid grid-cols-2 gap-px border-y border-neutral-950 sm:grid-cols-3">
                            {s.standing ? (
                              <div className="py-4 pr-4">
                                <dt className="text-xs font-semibold tracking-widest text-neutral-600 uppercase">Standing</dt>
                                <dd className="mt-1 font-serif text-4xl leading-none text-neutral-950 tabular-nums">{s.standing}</dd>
                              </div>
                            ) : null}
                            {s.seated ? (
                              <div className="py-4 pr-4">
                                <dt className="text-xs font-semibold tracking-widest text-neutral-600 uppercase">Seated</dt>
                                <dd className="mt-1 font-serif text-4xl leading-none text-indigo-700 tabular-nums">{s.seated}</dd>
                              </div>
                            ) : null}
                            {s.size ? (
                              <div className="col-span-2 py-4 sm:col-span-1">
                                <dt className="text-xs font-semibold tracking-widest text-neutral-600 uppercase">Size</dt>
                                <dd className="mt-2 text-base font-medium text-neutral-950 tabular-nums">{s.size}</dd>
                              </div>
                            ) : null}
                          </dl>
                        ) : null}
                        {s.description ? <p className="mt-6 text-base leading-7 text-pretty text-neutral-600">{s.description}</p> : null}
                        {feats.length ? (
                          <ul role="list" className="mt-6 flex flex-wrap gap-x-5 gap-y-2 text-sm text-neutral-950">
                            {feats.map((f) => (
                              <li key={f} className="flex items-center gap-2">
                                <span aria-hidden="true" className="size-1.5 rotate-45 bg-indigo-600" />
                                {f}
                              </li>
                            ))}
                          </ul>
                        ) : null}
                      </div>
                    </article>
                  </li>
                );
              })}
            </ul>
          ) : null}

          <div className="mt-20 grid grid-cols-1 gap-12 border-t border-neutral-950 pt-12 lg:mt-28 lg:grid-cols-12 lg:gap-16 lg:pt-16">
            {cateringNote || avNote || contact ? (
              <div className="space-y-10 lg:col-span-4">
                <dl className="space-y-10">
                {cateringNote ? (
                  <div>
                    <dt className="flex items-center gap-2 text-xs font-semibold tracking-widest text-neutral-950 uppercase">
                      <svg aria-hidden="true" viewBox="0 0 20 20" fill="currentColor" className="size-5 text-indigo-600">
                        <path d="M10 3a1 1 0 0 1 1 1v.55A7 7 0 0 1 17 11.5v.5H3v-.5a7 7 0 0 1 6-6.95V4a1 1 0 0 1 1-1ZM2 14.25a.75.75 0 0 1 .75-.75h14.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Z" />
                      </svg>
                      {cateringHeading || "Catering"}
                    </dt>
                    <dd className="mt-3 font-serif text-lg leading-snug text-pretty text-neutral-950">{cateringNote}</dd>
                  </div>
                ) : null}
                {avNote ? (
                  <div>
                    <dt className="flex items-center gap-2 text-xs font-semibold tracking-widest text-neutral-950 uppercase">
                      <svg aria-hidden="true" viewBox="0 0 20 20" fill="currentColor" className="size-5 text-indigo-600">
                        <path d="M7 4a3 3 0 0 1 6 0v6a3 3 0 1 1-6 0V4Z" />
                        <path d="M5.5 9.643a.75.75 0 0 0-1.5 0V10c0 3.06 2.29 5.585 5.25 5.954V17.5h-1.5a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-1.5v-1.546A6.001 6.001 0 0 0 16 10v-.357a.75.75 0 0 0-1.5 0V10a4.5 4.5 0 0 1-9 0v-.357Z" />
                      </svg>
                      {avHeading || "Audio & visual"}
                    </dt>
                    <dd className="mt-3 font-serif text-lg leading-snug text-pretty text-neutral-950">{avNote}</dd>
                  </div>
                ) : null}
                </dl>
                {contact ? <p className="text-sm leading-6 break-words text-neutral-600">{contact}</p> : null}
              </div>
            ) : null}

            <div className={`bg-neutral-100 p-6 sm:p-10 ${cateringNote || avNote || contact ? "lg:col-span-8" : "lg:col-span-12"}`}>
              {formHeading ? <Sub className="font-serif text-3xl leading-tight font-normal text-neutral-950 sm:text-4xl">{formHeading}</Sub> : null}
              {formIntro ? <p className="mt-3 max-w-xl text-base leading-7 text-pretty text-neutral-700">{formIntro}</p> : null}
              <form action={formAction || "#"} method="post" className="mt-8 grid grid-cols-1 gap-x-6 gap-y-6 sm:grid-cols-2">
                <div>
                  <label htmlFor={`${uid}-name`} className={fieldLabel}>
                    Name
                  </label>
                  <input id={`${uid}-name`} name="name" type="text" autoComplete="name" required className={`mt-2 ${input}`} />
                </div>
                <div>
                  <label htmlFor={`${uid}-email`} className={fieldLabel}>
                    Email
                  </label>
                  <input id={`${uid}-email`} name="email" type="email" autoComplete="email" required className={`mt-2 ${input}`} />
                </div>
                <div>
                  <label htmlFor={`${uid}-date`} className={fieldLabel}>
                    Preferred date
                  </label>
                  <input id={`${uid}-date`} name="date" type="date" className={`mt-2 ${input}`} />
                </div>
                <div>
                  <label htmlFor={`${uid}-guests`} className={fieldLabel}>
                    Number of guests
                  </label>
                  <input id={`${uid}-guests`} name="guests" type="number" min="1" inputMode="numeric" className={`mt-2 ${input}`} />
                </div>
                {types.length ? (
                  <div className="sm:col-span-2">
                    <label htmlFor={`${uid}-type`} className={fieldLabel}>
                      Event type
                    </label>
                    <select id={`${uid}-type`} name="eventType" defaultValue="" className={`mt-2 ${input}`}>
                      <option value="" disabled>
                        Choose one
                      </option>
                      {types.map((t) => (
                        <option key={t} value={t}>
                          {t}
                        </option>
                      ))}
                    </select>
                  </div>
                ) : null}
                {list.length > 1 ? (
                  <fieldset className="sm:col-span-2">
                    <legend className={fieldLabel}>Spaces you&rsquo;re interested in</legend>
                    <div className="mt-3 flex flex-wrap gap-x-6 gap-y-1">
                      {list.map((s, i) => (
                        <label key={`${s.name}-${i}`} htmlFor={`${uid}-space-${i}`} className="flex min-h-11 cursor-pointer items-center gap-3 text-base text-neutral-950">
                          <input id={`${uid}-space-${i}`} type="checkbox" name="spaces" value={s.name} className="size-5 accent-indigo-600" />
                          {s.name}
                        </label>
                      ))}
                    </div>
                  </fieldset>
                ) : null}
                <div className="sm:col-span-2">
                  <label htmlFor={`${uid}-details`} className={fieldLabel}>
                    Anything else? <span className="font-normal tracking-normal text-neutral-600 normal-case">(optional)</span>
                  </label>
                  <textarea id={`${uid}-details`} name="details" rows={3} className={`mt-2 ${input}`} />
                </div>
                <div className="flex flex-col gap-3 sm:col-span-2 sm:flex-row sm:items-center sm:gap-6">
                  <button type="submit" className={`inline-flex min-h-12 items-center justify-center bg-neutral-950 px-8 text-base font-semibold text-white transition hover:bg-indigo-700 motion-reduce:transition-none ${ring}`}>
                    {submitLabel || "Send inquiry"}
                  </button>
                  {privacyNote ? <p className="text-sm leading-6 text-neutral-600">{privacyNote}</p> : null}
                </div>
              </form>
            </div>
          </div>
        </div>
      </section>
    );
  },
};
```
