import { type LibrarySlug } from "./libraries";

export type Medium = "archival-print" | "original" | "study";

export type Product = {
  id: string;
  title: string;
  artist: string;
  library: LibrarySlug;
  priceCents: number;
  medium: Medium;
  edition: string;
  size: string;
  year: string;
  image: string;
  description: string;
};

export const PRODUCTS: Product[] = [
  {
    id: "rim-at-dusk",
    title: "Rim at Dusk",
    artist: "Sera Quill",
    library: "2d-animation",
    priceCents: 18000,
    medium: "archival-print",
    edition: "Edition of 40",
    size: "16 × 16 in",
    year: "2026",
    image: "/art/anim2d-traveler.jpg",
    description:
      "A painted frame from the short The Long Rim. The traveler is held one extra beat while the cloak catches — the hold is the whole sentence.",
  },
  {
    id: "two-across",
    title: "Two Across the Gorge",
    artist: "Sera Quill",
    library: "2d-animation",
    priceCents: 16000,
    medium: "archival-print",
    edition: "Edition of 40",
    size: "16 × 16 in",
    year: "2025",
    image: "/art/anim2d-foxes.jpg",
    description:
      "Spirit-foxes clearing a gap of floating stone. Graphic color, a clean leap, and mist where the next platform has not been drawn yet.",
  },
  {
    id: "waking",
    title: "Waking",
    artist: "Hadrian Moss",
    library: "3d-animation",
    priceCents: 24000,
    medium: "archival-print",
    edition: "Edition of 25",
    size: "20 × 20 in",
    year: "2026",
    image: "/art/anim3d-colossus.jpg",
    description:
      "Still from the opening of Cairn. The colossus does not stand so much as remember how. Dust is doing half the acting.",
  },
  {
    id: "brass-tern",
    title: "Brass Tern",
    artist: "Hadrian Moss",
    library: "3d-animation",
    priceCents: 22000,
    medium: "archival-print",
    edition: "Edition of 25",
    size: "16 × 16 in",
    year: "2026",
    image: "/art/anim3d-bird.jpg",
    description:
      "A mechanical shorebird, slate and brass, pausing on a basalt needle. The feathers are shim stock. The patience is not.",
  },
  {
    id: "hanging-quarter",
    title: "Hanging Quarter",
    artist: "Ione Voss",
    library: "concepting",
    priceCents: 19000,
    medium: "archival-print",
    edition: "Edition of 30",
    size: "18 × 18 in",
    year: "2025",
    image: "/art/concept-city.jpg",
    description:
      "Concept for a city sawn into a red wall. Rope bridges, timber, and the kind of dusk that makes a producer ask about scale.",
  },
  {
    id: "cistern-light",
    title: "Cistern Light",
    artist: "Ione Voss",
    library: "concepting",
    priceCents: 19000,
    medium: "archival-print",
    edition: "Edition of 30",
    size: "18 × 18 in",
    year: "2026",
    image: "/art/concept-cistern.jpg",
    description:
      "An underground cistern under the old quarter. The pillars are load-bearing and also a reminder to be quiet.",
  },
  {
    id: "ione-cartographer",
    title: "Ione, Cartographer",
    artist: "Anouk Feld",
    library: "character-design",
    priceCents: 32000,
    medium: "archival-print",
    edition: "Edition of 20",
    size: "16 × 16 in",
    year: "2026",
    image: "/art/character-ione.jpg",
    description:
      "Finished portrait for the cartographer who will not fold a map the same way twice. Goggles up. The scarf is a legend of its own.",
  },
  {
    id: "wrap-plate",
    title: "Wrap & Plate Studies",
    artist: "Anouk Feld",
    library: "character-design",
    priceCents: 9000,
    medium: "study",
    edition: "Open study print",
    size: "11 × 11 in",
    year: "2026",
    image: "/art/character-studies.jpg",
    description:
      "Costume notes: linen wrap, mason's apron, and the brass goggles. Three mannequins, four swatches, no faces — on purpose.",
  },
  {
    id: "cliff-keep",
    title: "Cliff Keep, Plan 04",
    artist: "Rio Navarre",
    library: "level-design",
    priceCents: 14000,
    medium: "archival-print",
    edition: "Edition of 50",
    size: "16 × 16 in",
    year: "2025",
    image: "/art/level-keep.jpg",
    description:
      "Isometric plan of the cliff keep: switchback, cistern, and gate. Drawn so a body could run it, and a builder could argue with it.",
  },
  {
    id: "slot-arena",
    title: "Slot Arena, Section",
    artist: "Rio Navarre",
    library: "level-design",
    priceCents: 14000,
    medium: "archival-print",
    edition: "Edition of 50",
    size: "16 × 16 in",
    year: "2026",
    image: "/art/level-slot.jpg",
    description:
      "A narrow arena cut by sunbeams and high stone bridges. The playable space is the shadow as much as the floor.",
  },
  {
    id: "pressed-basin",
    title: "Pressed Basin",
    artist: "L. Pettigrew",
    library: "diy",
    priceCents: 8500,
    medium: "study",
    edition: "Open edition",
    size: "10 × 10 in",
    year: "2026",
    image: "/art/diy-pressed.jpg",
    description:
      "Handmade paper, sand, and wire. A basin of pressed desert botanicals from the bench by the north window. Instructions live in the D.I.Y. library.",
  },
  {
    id: "layer-box",
    title: "Layer Box",
    artist: "L. Pettigrew",
    library: "diy",
    priceCents: 12000,
    medium: "archival-print",
    edition: "Edition of 35",
    size: "12 × 12 in",
    year: "2025",
    image: "/art/diy-box.jpg",
    description:
      "A pine shadow box of stacked canyon layers in plaster and sand. The photograph is the edition; the box in the studio is not for sale.",
  },
  {
    id: "ochre-vein",
    title: "Ochre Vein",
    artist: "E. Finch",
    library: "traditional-art",
    priceCents: 64000,
    medium: "original",
    edition: "Unique",
    size: "24 × 24 in",
    year: "2026",
    image: "/art/trad-ochre.jpg",
    description:
      "Oil and mineral on linen. A vein of ochre working through dark ground — geology, not metaphor, though it will be read as both.",
  },
  {
    id: "ink-canyon",
    title: "West Wall",
    artist: "E. Finch",
    library: "traditional-art",
    priceCents: 48000,
    medium: "original",
    edition: "Unique",
    size: "22 × 22 in",
    year: "2025",
    image: "/art/trad-ink.jpg",
    description:
      "Ink on cotton. Ridges laid in from the back of the paper, then the cliff strokes. The west wall as seen after a wind that took the names off things.",
  },
  {
    id: "standing-late",
    title: "Standing, Late Light",
    artist: "M. Calder",
    library: "life-drawing",
    priceCents: 7000,
    medium: "study",
    edition: "Study print",
    size: "11 × 11 in",
    year: "2026",
    image: "/art/life-stand.jpg",
    description:
      "Charcoal on warm paper from a Tuesday session. Weight on the right leg, the raised hand not yet a gesture — just tired.",
  },
  {
    id: "seated-turn",
    title: "Seated Turn",
    artist: "M. Calder",
    library: "life-drawing",
    priceCents: 7000,
    medium: "study",
    edition: "Study print",
    size: "11 × 11 in",
    year: "2026",
    image: "/art/life-sit.jpg",
    description:
      "A seated turn, twenty-five minutes. The chair is implied. The smudge on the ribs is not a mistake.",
  },
];

export const MEDIUM_LABEL: Record<Medium, string> = {
  "archival-print": "Archival pigment print",
  original: "Original work",
  study: "Study print",
};

export function productById(id: string | undefined): Product | undefined {
  return PRODUCTS.find((p) => p.id === id);
}

export function productsByLibrary(slug: LibrarySlug): Product[] {
  return PRODUCTS.filter((p) => p.library === slug);
}
