# Decap CMS config: the /admin editing panel for officers.
# Field names here must match src/content.config.ts and src/data/settings.json.

# Live site (Cloudflare Pages): officers sign in with GitHub. The sign-in runs on the site itself, in
# functions/api/auth.js and functions/api/callback.js (see CLOUDFLARE-PAGES.md).
backend:
  name: github
  repo: umssbc-website/umssbcwebsite
  branch: main
  base_url: https://umssbcwebsite.pages.dev   # the live address of this site (change it if the address changes)
  auth_endpoint: api/auth

# Local testing: `npm run cms` + `npm run dev`, then open http://localhost:4321/admin/
# Edits are written straight to the files on this computer. No login needed.
local_backend: true

site_url: http://localhost:4321
display_url: http://localhost:4321
logo_url: /favicon.png

# The preview pane only shows plain text, not the real page, so hide it and use the whole width for the form.
# (The site tab refreshes by itself after each save.)
editor:
  preview: false

# Default upload folder (each collection below overrides it).
media_folder: src/assets/uploads
public_folder: ../../assets/uploads

collections:
  # ---------- Site settings (one file) ----------
  - name: settings
    label: This Weekend & Settings
    description: "Update this every week: the car pool trip, sign-up status and seats. Links, dues and socials are lower down."
    files:
      - name: general
        label: This Weekend & Club Settings
        file: src/data/settings.json
        fields:
          - name: thisWeekend
            label: This Weekend's Car Pool
            widget: object
            collapsed: false
            fields:
              - { name: date, label: Trip date, widget: datetime, time_format: false, date_format: "YYYY-MM-DD", format: "YYYY-MM-DD", picker_utc: true }
              - { name: mountain, label: Mountain, widget: string }
              - name: status
                label: Sign-up status
                widget: select
                options:
                  - { label: "Open", value: open }
                  - { label: "Full: waitlist open", value: waitlist }
                  - { label: "Closed", value: closed }
              - { name: seatsLeft, label: Seats left (shown when open), widget: number, value_type: int, min: 0, required: false }
              - { name: note, label: Meeting note, widget: string, hint: "e.g. Meet at the Memorial Union lot at 6:30am." }
          - name: homeHighlights
            label: Home Page Highlight
            label_singular: Highlight
            widget: list
            required: false
            max: 3
            typeKey: type
            hint: "The card under the home page banner. Add up to 3 things; they rotate every 15 seconds in this order. Drag to rearrange. Leave empty to show just the car pool."
            types:
              - name: carpool
                label: This weekend's car pool
                widget: object
                summary: "This weekend's car pool"
                fields:
                  - { name: note, label: "Shows the car pool from above. Nothing to fill in here.", widget: hidden, default: "" }
              - name: event
                label: An event
                widget: object
                summary: "Event: {{fields.event}}"
                fields:
                  - { name: event, label: Event, widget: relation, collection: events, search_fields: [title], value_field: "{{slug}}", display_fields: [title], hint: "Only shows on the home page until the event is over." }
              - name: merch
                label: A merch item
                widget: object
                summary: "Merch: {{fields.item}}"
                fields:
                  - { name: item, label: Merch item, widget: relation, collection: pages, file: merch, search_fields: ["items.*.name"], value_field: "items.*.name", display_fields: ["items.*.name"], hint: "Shows while the item is at the Gauging interest, Pre-order or Available stage (set on the Merch page)." }
          - name: links
            label: Sign-up & Form Links
            widget: object
            collapsed: true
            fields:
              - { name: riderSignup, label: Rider sign-up form, widget: string, hint: "Paste the Google Form link. A full docs.google.com/forms link shows right on the Car Pools page; a short forms.gle link shows as a button." }
              - { name: driverSignup, label: Driver sign-up form, widget: string, hint: "Paste the Google Form link. A full docs.google.com/forms link shows right on the Car Pools page; a short forms.gle link shows as a button." }
              - { name: waitlist, label: Waitlist form, widget: string, hint: "Paste the Google Form link. A full docs.google.com/forms link shows right on the Car Pools page; a short forms.gle link shows as a button." }
              - { name: waiver, label: Waiver form, widget: string }
              - { name: merchOrder, label: Merch order form, widget: string }
              - { name: photoLibrary, label: Photo library (Google Drive folder), widget: string, hint: "The shared folder with all club photos. Share it as 'Anyone with the link: Viewer'." }
              - { name: photoUpload, label: Photo upload link (optional), widget: string, required: false, hint: "Where members add their photos, e.g. a Drive folder shared as Editor, or a Google Form with file upload. Leave blank to hide the button." }
          - { name: dues, label: Dues (as shown on the Join page), widget: string, hint: "e.g. $40 per season" }
          - { name: showAdminLink, label: "Show 'Admin' link in the top bar (for testing)", widget: boolean, default: true, required: false, hint: "Turn off before the site launches." }
          - { name: venmoUsername, label: Club Venmo username, widget: string, hint: "The club's business Venmo, without the @. Used for the merch deposit buttons." }
          - name: socials
            label: Socials & Contact
            widget: object
            collapsed: true
            fields:
              - { name: instagram, label: Instagram URL, widget: string }
              - { name: tiktok, label: TikTok URL, widget: string }
              - { name: email, label: Club email, widget: string }
          - { name: meeting, label: Meeting info (footer & FAQ), widget: string }
          - { name: clubName, label: Club name, widget: string }
          - { name: shortName, label: Short name, widget: string }
          - { name: tagline, label: Tagline, widget: string }

  # ---------- Events ----------
  - name: events
    label: Events
    label_singular: Event
    folder: src/content/events
    create: true
    slug: "{{slug}}"
    identifier_field: title
    summary: "{{title}}: {{date | date('MMM D, YYYY')}}"
    sortable_fields: [date, title]
    media_folder: /src/assets/uploads/events
    public_folder: ../../assets/uploads/events
    fields:
      - { name: title, label: Title, widget: string }
      - { name: date, label: Starts, widget: datetime, format: "YYYY-MM-DDTHH:mm:ssZ", hint: "Maine time." }
      - { name: endDate, label: Ends (optional), widget: datetime, format: "YYYY-MM-DDTHH:mm:ssZ", required: false }
      - { name: location, label: Location, widget: string }
      - { name: summary, label: Short summary (shown on cards), widget: text }
      - { name: image, label: Image (optional), widget: image, required: false }
      - { name: signupUrl, label: Sign-up link (optional), widget: string, required: false, pattern: ['^https?://', "Must start with http:// or https://"] }
      - { name: featured, label: Featured, widget: boolean, default: false, required: false }
      - { name: body, label: Details, widget: markdown, required: false }

  # ---------- Officers ----------
  - name: officers
    label: Officers
    label_singular: Officer
    folder: src/content/officers
    create: true
    slug: "{{role}}"
    identifier_field: name
    summary: "{{role}}: {{name}}"
    sortable_fields: [order, name]
    media_folder: /src/assets/uploads/officers
    public_folder: ../../assets/uploads/officers
    fields:
      - { name: name, label: Name, widget: string }
      - { name: role, label: Role, widget: string }
      - { name: year, label: Class year (optional), widget: string, required: false }
      - { name: major, label: Major (optional), widget: string, required: false }
      - { name: photo, label: Headshot (optional), widget: image, required: false }
      - { name: email, label: Email (optional), widget: string, required: false }
      - { name: order, label: Sort order (1 = first), widget: number, value_type: int, default: 99 }

  # ---------- Mountains ----------
  - name: mountains
    label: Mountains
    label_singular: Mountain
    folder: src/content/mountains
    create: true
    slug: "{{slug}}"
    identifier_field: name
    sortable_fields: [order, name]
    media_folder: /src/assets/uploads/mountains
    public_folder: ../../assets/uploads/mountains
    fields:
      - { name: name, label: Name, widget: string }
      - { name: photo, label: Photo of the mountain (optional), widget: image, required: false, choose_url: false, hint: "Shows at the top of the mountain's card. A wide (landscape) photo works best. Leave blank to keep the ridge-line drawing." }
      - { name: state, label: State, widget: select, options: [ME, NH, VT] }
      - { name: driveFromOrono, label: Drive from Orono, widget: string, hint: "e.g. About 2h 45m" }
      - { name: verticalFt, label: Vertical (ft), widget: number, value_type: int, required: false }
      - { name: website, label: Website, widget: string, pattern: ['^https?://', "Must start with http:// or https://"] }
      - { name: trailMap, label: Trail map link (optional), widget: string, required: false, pattern: ['^https?://', "Must start with http:// or https://"] }
      - { name: reportUrl, label: Mountain report link (optional), widget: string, required: false, pattern: ['^https?://', "Must start with http:// or https://"], hint: "The mountain's live conditions page (open lifts and trails, snow). When filled in, the card links here instead of the trail map." }
      - { name: dealNote, label: Deal / discount note (optional), widget: string, required: false }
      - { name: lat, label: Latitude (for weather), widget: number, value_type: float, required: false, hint: "For the live weather on the Mountains page. In Google Maps, right-click the base lodge and click the numbers to copy them. The first number is latitude, e.g. 45.0315." }
      - { name: lon, label: Longitude (for weather), widget: number, value_type: float, required: false, hint: "The second number, e.g. -70.3134 (negative in Maine). Leave both blank to hide the weather box." }
      - { name: order, label: Sort order (1 = first), widget: number, value_type: int, default: 99 }
      - { name: body, label: Description, widget: markdown, required: false }

  # ---------- Sponsors ----------
  - name: sponsors
    label: Sponsors
    label_singular: Sponsor
    folder: src/content/sponsors
    create: true
    slug: "{{slug}}"
    identifier_field: name
    sortable_fields: [order, name]
    media_folder: /src/assets/uploads/sponsors
    public_folder: ../../assets/uploads/sponsors
    fields:
      - { name: name, label: Name, widget: string }
      - { name: url, label: Website, widget: string, pattern: ['^https?://', "Must start with http:// or https://"] }
      - { name: logo, label: Logo (optional), widget: image, required: false }
      - { name: promoCode, label: Promo code (optional), widget: string, required: false }
      - { name: promoDetails, label: Promo details (optional), widget: string, required: false }
      - { name: order, label: Sort order (1 = first), widget: number, value_type: int, default: 99 }

  # ---------- Gallery albums ----------
  - name: albums
    label: Photo Albums
    label_singular: Album
    description: A few preview photos per album. The full set of photos lives in Google Drive.
    folder: src/content/albums
    create: true
    slug: "{{slug}}"
    identifier_field: title
    summary: "{{title}}: {{date | date('MMM D, YYYY')}}"
    sortable_fields: [date, title]
    media_folder: /src/assets/uploads/gallery
    public_folder: ../../assets/uploads/gallery
    fields:
      - { name: title, label: Album title, widget: string, hint: "e.g. Sugarloaf Day Trip" }
      - { name: date, label: Date, widget: datetime, time_format: false, date_format: "YYYY-MM-DD", format: "YYYY-MM-DD", picker_utc: true, hint: "Newest albums show first." }
      - { name: blurb, label: Short description (optional), widget: string, required: false }
      - { name: driveUrl, label: Google Drive folder for this album (optional), widget: string, required: false, pattern: ['^https?://', "Must start with http:// or https://"], hint: "Paste the folder's share link. Leave blank to link to the main photo library instead." }
      - name: photos
        label: Preview photos
        label_singular: Photo
        widget: list
        required: false
        hint: "Pick 4 to 8 of the best shots. Everything else goes in the Drive folder."
        fields:
          - { name: image, label: Photo, widget: image }
          - { name: alt, label: What's in the photo, widget: string, hint: "Short description for screen readers, e.g. 'Two riders on the summit lift'." }

  # ---------- Pages & Backgrounds (one JSON file per page in src/data/pages/) ----------
  # Every background uses the same fields: copy `- { name: background, label: ..., widget: object, fields: *bg_fields }`.
  # Read by src/lib/backgrounds.ts + src/components/Panel.astro. Image fields store "/src/assets/uploads/backgrounds/x.jpg".
  - name: pages
    label: Page Photos & Colors
    label_singular: Page
    description: Optional. Change the photos and background colors on each page. Not needed for weekly updates.
    media_folder: /src/assets/uploads/backgrounds
    public_folder: /src/assets/uploads/backgrounds
    files:
      - name: footer
        label: Footer (every page)
        file: src/data/pages/footer.json
        fields:
          - name: background
            label: Footer background
            widget: object
            collapsed: false
            fields: &bg_fields
              - name: style
                label: Background
                widget: select
                default: white
                options:
                  - { label: "White", value: white }
                  - { label: "Light grey", value: snow }
                  - { label: "Light blue", value: frost }
                  - { label: "Sky blue (UMaine light blue)", value: sky }
                  - { label: "Navy", value: navy }
                  - { label: "Custom color (pick below)", value: custom }
                  - { label: "Photo (upload below)", value: photo }
              - { name: customColor, label: Custom color (only used when "Custom color" is picked), widget: color, required: false, allowInput: true }
              - { name: photo, label: Photo (only used when "Photo" is picked), widget: image, required: false, choose_url: false, hint: "Wide landscape photos work best. Text is placed on top, so avoid busy shots." }
              - name: shade
                label: Photo shade (only used with a photo)
                widget: select
                required: false
                default: dark
                options:
                  - { label: "Darken photo (white text)", value: dark }
                  - { label: "Lighten photo (dark text)", value: light }

      # ===== BEGIN AGENT A PAGES (home, join, 404) — only Agent A edits between these markers =====
      - name: home
        label: Home page
        file: src/data/pages/home.json
        fields:
          - { name: hero, label: Top banner (photo and headline), widget: object, collapsed: false, fields: [{ name: background, label: "Top banner background", widget: object, collapsed: false, fields: *bg_fields }] }
          - { name: whatWeDo, label: "'What we do' section", widget: object, collapsed: false, fields: [{ name: background, label: "'What we do' background", widget: object, collapsed: false, fields: *bg_fields }] }
          - name: playlists
            label: "Club playlists section"
            widget: object
            collapsed: true
            fields:
              - { name: heading, label: Heading, widget: string, default: "Club playlists" }
              - { name: intro, label: Short intro (optional), widget: string, required: false, hint: "The playlists themselves are edited in the Music page entry (tick 'Show on home page')." }
              - { name: background, label: "Club playlists background", widget: object, collapsed: false, fields: *bg_fields }
          - { name: mountains, label: "'The mountains' section", widget: object, collapsed: false, fields: [{ name: background, label: "'The mountains' background", widget: object, collapsed: false, fields: *bg_fields }] }
          - { name: events, label: "'Upcoming events' section", widget: object, collapsed: false, fields: [{ name: background, label: "'Upcoming events' background", widget: object, collapsed: false, fields: *bg_fields }] }
          - { name: gallery, label: "'From the hill' photo strip", widget: object, collapsed: false, fields: [{ name: background, label: "'From the hill' photo strip background", widget: object, collapsed: false, fields: *bg_fields }] }
          - { name: sponsors, label: "'Our sponsors' section", widget: object, collapsed: false, fields: [{ name: background, label: "'Our sponsors' background", widget: object, collapsed: false, fields: *bg_fields }] }
          - { name: joinBand, label: "'Ready to ride with us?' band", widget: object, collapsed: false, fields: [{ name: background, label: "'Ready to ride with us?' band background", widget: object, collapsed: false, fields: *bg_fields }] }

      - name: join
        label: Join page
        file: src/data/pages/join.json
        fields:
          - name: joinButton
            label: "'Join now' button"
            widget: object
            collapsed: false
            summary: "{{fields.label}}"
            fields:
              - { name: label, label: Button text, widget: string, default: "Join now" }
              - { name: url, label: "Link (Google Form or payment page)", widget: string, pattern: ['^https?://', "Must start with https://"], hint: "Where the Join now button goes. Paste the full address, starting with https://" }
          - name: header
            label: Top of the page (headline and picture)
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "Join page top background", widget: object, collapsed: false, fields: *bg_fields }
              - { name: image, label: "Picture next to the headline", widget: image, required: false, choose_url: false, hint: "Leave blank to keep the goggles sticker." }
              - { name: imageAlt, label: "What the picture shows (for screen readers)", widget: string, required: false }
          - { name: steps, label: "'How to join' steps section", widget: object, collapsed: false, fields: [{ name: background, label: "'How to join' steps background", widget: object, collapsed: false, fields: *bg_fields }] }
          - { name: perks, label: "'Member perks' section", widget: object, collapsed: false, fields: [{ name: background, label: "'Member perks' background", widget: object, collapsed: false, fields: *bg_fields }] }
          - { name: questions, label: "'Questions before you join?' section", widget: object, collapsed: false, fields: [{ name: background, label: "'Questions before you join?' background", widget: object, collapsed: false, fields: *bg_fields }] }

      - name: not-found
        label: Page not found (404)
        file: src/data/pages/not-found.json
        fields:
          - name: main
            label: Whole page
            widget: object
            collapsed: false
            fields:
              - { name: background, label: "'Page not found' background", widget: object, collapsed: false, fields: *bg_fields }
              - { name: image, label: "Picture above the headline", widget: image, required: false, choose_url: false, hint: "Leave blank to keep the bear sticker." }
              - { name: imageAlt, label: "What the picture shows (for screen readers)", widget: string, required: false }
      # ===== END AGENT A PAGES =====

      # ===== BEGIN AGENT B PAGES (car pools, mountains, events, gallery, officers, sponsors, merch, faq) — only Agent B edits between these markers =====
      - name: carpools
        label: Car Pools page
        file: src/data/pages/carpools.json
        fields:
          - name: header
            label: "Top of page (title and sign-up buttons) background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "Top of page (title and sign-up buttons) background", widget: object, collapsed: false, fields: *bg_fields }
          - name: howItWorks
            label: "'Riders and drivers' section background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "'Riders and drivers' section background", widget: object, collapsed: false, fields: *bg_fields }
          - name: timeline
            label: "'Weekly sign-up timeline' section background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "'Weekly sign-up timeline' section background", widget: object, collapsed: false, fields: *bg_fields }
          - name: checkIn
            label: "'Day-of check-in' section background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "'Day-of check-in' section background", widget: object, collapsed: false, fields: *bg_fields }
          - name: drivers
            label: "'Driver info' section background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "'Driver info' section background", widget: object, collapsed: false, fields: *bg_fields }
          - name: waitlist
            label: "'Join the waitlist' section background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "'Join the waitlist' section background", widget: object, collapsed: false, fields: *bg_fields }
          - name: faq
            label: "'Car pool FAQ' section background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "'Car pool FAQ' section background", widget: object, collapsed: false, fields: *bg_fields }
          - name: cta
            label: "'Ready for the next trip?' section background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "'Ready for the next trip?' section background", widget: object, collapsed: false, fields: *bg_fields }
      - name: faq
        label: FAQ page
        file: src/data/pages/faq.json
        fields:
          - name: header
            label: "Top of page (title) background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "Top of page (title) background", widget: object, collapsed: false, fields: *bg_fields }
          - name: questions
            label: "Questions list section background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "Questions list section background", widget: object, collapsed: false, fields: *bg_fields }
          - name: contact
            label: "'Still have a question?' section background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "'Still have a question?' section background", widget: object, collapsed: false, fields: *bg_fields }
      - name: gallery
        label: Gallery page
        file: src/data/pages/gallery.json
        fields:
          - name: header
            label: "Top of page (title) background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "Top of page (title) background", widget: object, collapsed: false, fields: *bg_fields }
          - name: albums
            label: "Photo albums section background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "Photo albums section background", widget: object, collapsed: false, fields: *bg_fields }
      - name: merch
        label: Merch page
        file: src/data/pages/merch.json
        fields:
          - name: header
            label: "Top of page (title) background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "Top of page (title) background", widget: object, collapsed: false, fields: *bg_fields }
          - name: products
            label: "Merch products section background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "Merch products section background", widget: object, collapsed: false, fields: *bg_fields }
          - name: pickup
            label: Pickup info (top of the Merch page)
            widget: object
            collapsed: false
            fields:
              - { name: headline, label: Headline, widget: string, default: "Order online, pick up at a meeting" }
              - { name: when, label: Next pickup, widget: string, hint: "e.g. Next pickup: Tue, Nov 18, 7 PM, Memorial Union 101" }
              - { name: details, label: Details, widget: string, required: false, hint: "e.g. Bring your name and pay any balance by Venmo or cash." }
          - { name: shopUrl, label: "'Shop all merch' link (optional)", widget: string, required: false, pattern: ['^https?://', "Must start with https://"], hint: "For later: a whole online store (e.g. Square). Leave blank to hide the button." }
          - name: items
            label: Merch items
            label_singular: Item
            widget: list
            summary: "{{fields.name}} ({{fields.status}})"
            hint: "Each item shown on the Merch page. Set each item's Stage; only the fields for that stage are used."
            fields:
              - { name: name, label: Item name, widget: string }
              - { name: description, label: Short description, widget: string }
              - { name: price, label: Price, widget: string, hint: "e.g. $40, About $20, or TBD" }
              - { name: sizes, label: Sizes (optional), widget: string, required: false, hint: "e.g. S–XXL" }
              - { name: photo, label: Product photo, widget: image, required: false, choose_url: false, hint: "Leave blank to show the club logo art." }
              - { name: photoAlt, label: What's in the photo, widget: string, required: false, hint: "Short description for screen readers, e.g. 'Navy hoodie with the bear badge'." }
              - name: status
                label: Stage
                widget: select
                default: coming
                options:
                  - { label: "Coming soon (no buttons)", value: coming }
                  - { label: "Gauging interest (interest form, no payment)", value: interest }
                  - { label: "Pre-order open (form + Venmo deposit)", value: preorder }
                  - { label: "Available (order now, pick up at a meeting)", value: available }
                  - { label: "Sold out", value: soldout }
              - { name: interestFormUrl, label: "'I'm interested' button link (Gauging interest stage)", widget: string, required: false, pattern: ['^https?://', "Must start with https://"], hint: "A Google Form asking for name, size and quantity." }
              - { name: preorderFormUrl, label: "'Fill out the pre-order form' button link (Pre-order stage)", widget: string, required: false, pattern: ['^https?://', "Must start with https://"], hint: "A Google Form for name, email, size and quantity." }
              - { name: depositAmount, label: "Deposit in dollars (Pre-order)", widget: number, value_type: int, min: 0, required: false, hint: "The Venmo button asks for this amount. The note asks for the item name and the buyer's name, so you can match payments to the form." }
              - { name: preorderGoal, label: "Pre-orders needed to place the order (Pre-order)", widget: number, value_type: int, min: 0, required: false, hint: "e.g. 25. Shown as a progress bar. Leave blank to hide it." }
              - { name: preorderCount, label: "Pre-orders so far (Pre-order)", widget: number, value_type: int, min: 0, required: false, hint: "Update this from the form responses every few days." }
              - { name: preorderDeadline, label: "Pre-order deadline (Pre-order)", widget: datetime, time_format: false, date_format: "YYYY-MM-DD", format: "YYYY-MM-DD", picker_utc: true, required: false, hint: "After this date the card shows 'Pre-orders closed' (once the site rebuilds)." }
              - { name: depositUrl, label: "'Pay deposit' button link (Pre-order stage, optional)", widget: string, required: false, pattern: ['^https?://', "Must start with https://"], hint: "Leave blank to use the club Venmo (amount and note filled in). Paste a link here (e.g. Square) to use that instead." }
              - { name: buyUrl, label: "'Order' button link (Available stage)", widget: string, required: false, pattern: ['^https?://', "Must start with https://"], hint: "An order form today, or a Square item link later. If blank, the Merch order form from Site Settings is used." }
          - name: ideas
            label: "'What merch do you want?' section (below the items)"
            widget: object
            collapsed: true
            fields:
              - { name: heading, label: Heading, widget: string, default: "What merch do you want?" }
              - { name: text, label: Text, widget: text }
              - { name: formUrl, label: Merch ideas form link, widget: string, required: false, pattern: ['^https?://', "Must start with https://"], hint: "A Google Form, e.g. 'What would you like to see?', 'Would you buy it? About how much?', 'Your name / email (optional)'. Leave blank to show an 'Email us your idea' button instead." }
              - { name: buttonLabel, label: Button text, widget: string, required: false, default: "Share a merch idea" }
      - name: rail-jam
        label: Rail Jam page
        file: src/data/pages/rail-jam.json
        fields:
          - { name: title, label: Page title, widget: string, default: "Rail Jam" }
          - { name: eyebrow, label: Small label above the title (optional), widget: string, required: false }
          - { name: intro, label: Intro under the title (optional), widget: text, required: false }
          - name: sections
            label: Sections
            label_singular: Section
            widget: list
            required: false
            summary: "{{fields.heading}}"
            hint: "Add sections top to bottom (e.g. Date & location, How it works, Sign up, Prizes, Sponsors). With no sections, the 'coming soon' message shows."
            fields:
              - { name: heading, label: Heading, widget: string }
              - { name: text, label: Text, widget: text, required: false, hint: "Leave a blank line between paragraphs." }
              - { name: buttonLabel, label: Button text (optional), widget: string, required: false, hint: "e.g. Sign up to ride" }
              - { name: buttonUrl, label: Button link (optional), widget: string, required: false, hint: "A full link (https://…) or a page on this site (e.g. /events)." }
              - { name: background, label: Section background, widget: object, collapsed: true, fields: *bg_fields }
          - { name: emptyMessage, label: "'Coming soon' message (shown when there are no sections)", widget: string, required: false }
          - name: header
            label: "Top of page (title) background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "Top of page (title) background", widget: object, collapsed: false, fields: *bg_fields }
          - name: content
            label: "'Coming soon' section background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "'Coming soon' section background", widget: object, collapsed: false, fields: *bg_fields }
      - name: music
        label: Music page
        file: src/data/pages/music.json
        fields:
          - name: playlists
            label: Playlists
            label_singular: Playlist
            widget: list
            required: false
            summary: "{{fields.name}} ({{fields.service}})"
            hint: "Shown on the Music page (Spotify and Apple Music links get a built-in player). Tick 'Show on home page' for up to 3 to feature on the home page."
            fields:
              - { name: name, label: Playlist name, widget: string }
              - name: service
                label: Service
                widget: select
                default: spotify
                options:
                  - { label: "Spotify", value: spotify }
                  - { label: "Apple Music", value: apple }
                  - { label: "YouTube Music", value: youtube }
                  - { label: "Other", value: other }
              - { name: url, label: Playlist link, widget: string, pattern: ['^https?://', "Must start with https://"], hint: "In Spotify or Apple Music: Share → Copy link, then paste it here." }
              - { name: note, label: Short note (optional), widget: string, required: false, hint: "e.g. For the drive to the mountain" }
              - { name: showOnHome, label: Show on home page, widget: boolean, default: false, required: false }
              - { name: showDetails, label: Show the name, picture and note above the player, widget: boolean, default: false, required: false, hint: "Spotify and Apple Music players already show the cover and name, so this is off by default. Playlists without a player always show them." }
          - { name: suggestUrl, label: "'Suggest a song' link (optional)", widget: string, required: false, pattern: ['^https?://', "Must start with https://"], hint: "e.g. a Google Form. Leave blank and the page says to bring picks to a meeting." }
          - name: header
            label: "Top of page (title) background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "Top of page (title) background", widget: object, collapsed: false, fields: *bg_fields }
          - name: list
            label: "Playlists section background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "Playlists section background", widget: object, collapsed: false, fields: *bg_fields }
      - name: mountains
        label: Mountains page
        file: src/data/pages/mountains.json
        fields:
          - name: header
            label: "Top of page (title) background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "Top of page (title) background", widget: object, collapsed: false, fields: *bg_fields }
          - name: list
            label: "Mountain list section background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "Mountain list section background", widget: object, collapsed: false, fields: *bg_fields }
      - name: officers
        label: Officers page
        file: src/data/pages/officers.json
        fields:
          - name: header
            label: "Top of page (title) background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "Top of page (title) background", widget: object, collapsed: false, fields: *bg_fields }
          - name: list
            label: "Officer list section background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "Officer list section background", widget: object, collapsed: false, fields: *bg_fields }
      - name: sponsors
        label: Sponsors page
        file: src/data/pages/sponsors.json
        fields:
          - name: header
            label: "Top of page (title) background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "Top of page (title) background", widget: object, collapsed: false, fields: *bg_fields }
          - name: list
            label: "Sponsor list section background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "Sponsor list section background", widget: object, collapsed: false, fields: *bg_fields }
      - name: events
        label: Events (list page and every event page)
        file: src/data/pages/events.json
        fields:
          - name: header
            label: "Events page: top of page (title) background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "Events page: top of page (title) background", widget: object, collapsed: false, fields: *bg_fields }
          - name: upcoming
            label: "Events page: Upcoming section background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "Events page: Upcoming section background", widget: object, collapsed: false, fields: *bg_fields }
          - name: past
            label: "Events page: Past events section background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "Events page: Past events section background", widget: object, collapsed: false, fields: *bg_fields }
          - name: detail
            label: "Single event pages: page background"
            widget: object
            collapsed: true
            fields:
              - { name: background, label: "Single event pages: page background", widget: object, collapsed: false, fields: *bg_fields }
      # ===== END AGENT B PAGES =====

  # ---------- Testing Feedback (written by the on-page Feedback button via feedback-plugin.mjs) ----------
  - name: feedback
    label: Tester Feedback
    label_singular: Feedback note
    description: Notes testers left with the Feedback button. Open one to read it, set its status, and add notes.
    folder: feedback
    extension: json
    format: json
    # Screenshots are saved next to each note (feedback/<id>.jpg).
    media_folder: ""
    public_folder: ""
    create: false
    delete: true
    identifier_field: comment
    summary: "{{status}} · {{type}} · {{page}}: {{comment | truncate(70)}}"
    sortable_fields: [created, status, page, type]
    view_filters:
      - { label: "New", field: status, pattern: "^new$" }
      - { label: "In progress", field: status, pattern: "^in-progress$" }
      - { label: "Fixed", field: status, pattern: "^fixed$" }
      - { label: "Won't fix", field: status, pattern: "^wont-fix$" }
      - { label: "Bugs", field: type, pattern: "^bug$" }
      - { label: "Suggestions", field: type, pattern: "^suggestion$" }
    view_groups:
      - { label: "Status", field: status }
      - { label: "Page", field: page }
      - { label: "Type", field: type }
    fields:
      - name: status
        label: Status
        widget: select
        default: new
        options:
          - { label: "New", value: new }
          - { label: "In progress", value: in-progress }
          - { label: "Fixed", value: fixed }
          - { label: "Won't fix", value: wont-fix }
      - { name: notes, label: Officer notes, widget: text, required: false, hint: "What was done about it, or why not." }
      - name: type
        label: Type
        widget: select
        options:
          - { label: "Bug", value: bug }
          - { label: "Suggestion", value: suggestion }
          - { label: "Question", value: question }
          - { label: "Looks good", value: looks-good }
      - { name: comment, label: Comment, widget: text }
      - { name: screenshot, label: Screenshot, widget: image, required: false, choose_url: false, hint: "What the tester saw when they sent this. A part they picked is outlined in red." }
      - { name: page, label: Page, widget: string, hint: "Open it at yoursite.org + this path." }
      - { name: element, label: Part of the page, widget: string, required: false }
      - { name: tester, label: Tester, widget: string, required: false }
      - { name: created, label: Sent, widget: string, required: false }
      - { name: device, label: Device (screen size · system · browser), widget: string, required: false }
      - { name: pageTitle, label: Page title, widget: string, required: false }
      - { name: selector, label: Technical location (for the web officer), widget: string, required: false }
