# yaml-language-server: $schema=https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json
# Café Yon content panel (Sveltia CMS)
backend:
  name: github
  repo: dennis78il-dotcom/cafe-yon
  branch: main

# Photos are built into the site for now; image uploading is added in a later step.
media_folder: "images"
public_folder: "/images"

# Three languages; Hebrew is the default. Each entry shows HE / EN / RU tabs.
i18n:
  structure: single_file
  locales: [he, en, ru]
  default_locale: he

collections:
  - name: menu
    label: "Menu - drinks, food, beans"
    i18n: true
    files:
      - name: menu
        label: "Menu items & prices"
        file: "menu.json"
        i18n: true
        fields:
          - label: "Coffee"
            name: coffee
            widget: list
            i18n: true
            summary: "{{fields.n}}  —  {{fields.p}}"
            fields:
              - { label: "Name", name: n, widget: string, i18n: true }
              - { label: "Description", name: d, widget: string, i18n: true }
              - { label: "Price", name: p, widget: string, i18n: true }
              - { label: "Tag (optional)", name: t, widget: string, i18n: true, required: false }
          - label: "Sandwiches"
            name: sandwiches
            widget: list
            i18n: true
            summary: "{{fields.n}}  —  {{fields.p}}"
            fields:
              - { label: "Name", name: n, widget: string, i18n: true }
              - { label: "Description", name: d, widget: string, i18n: true }
              - { label: "Price", name: p, widget: string, i18n: true }
          - label: "Desserts"
            name: desserts
            widget: list
            i18n: true
            summary: "{{fields.n}}  —  {{fields.p}}"
            fields:
              - { label: "Name", name: n, widget: string, i18n: true }
              - { label: "Description", name: d, widget: string, i18n: true }
              - { label: "Price", name: p, widget: string, i18n: true }
          - label: "Beans (ROOSTER)"
            name: beans
            widget: list
            i18n: true
            summary: "{{fields.n}}  —  {{fields.p}}"
            fields:
              - { label: "Name", name: n, widget: string, i18n: true }
              - { label: "Weight", name: w, widget: string, i18n: true }
              - { label: "Price", name: p, widget: string, i18n: true }
              - { label: "Description", name: d, widget: string, i18n: true }

  - name: events
    label: "Events"
    i18n: true
    files:
      - name: events
        label: "Upcoming events"
        file: "events.json"
        i18n: true
        fields:
          - label: "Events"
            name: list
            widget: list
            i18n: true
            summary: "{{fields.day}} {{fields.mon}}  ·  {{fields.name}}"
            fields:
              - { label: "Day (number)", name: day, widget: string, i18n: true }
              - { label: "Month", name: mon, widget: string, i18n: true }
              - { label: "Title", name: name, widget: string, i18n: true }
              - { label: "Short line", name: desc, widget: string, i18n: true }
              - { label: "Full details", name: detail, widget: text, i18n: true }

  - name: specials
    label: "Specials (Coffee Setup)"
    i18n: true
    files:
      - name: specials
        label: "The deal"
        file: "specials.json"
        i18n: true
        fields:
          - { label: "Title", name: h2, widget: string, i18n: true }
          - { label: "Intro text", name: lead, widget: text, i18n: true }
          - { label: "Price", name: price, widget: string, i18n: true }
          - { label: "Includes (header)", name: incl, widget: string, i18n: true }
          - { label: "Items in the deal", name: items, widget: list, i18n: true }

  - name: hours
    label: "Opening hours"
    files:
      - name: hours
        label: "Weekly hours"
        file: "hours.json"
        fields:
          - label: "Sunday — ראשון"
            name: sun
            widget: object
            fields:
              - { label: "Closed all day?", name: closed, widget: boolean, default: false }
              - { label: "Opens (e.g. 09:00)", name: open, widget: string, required: false }
              - { label: "Closes (e.g. 17:00)", name: close, widget: string, required: false }
          - label: "Monday — שני"
            name: mon
            widget: object
            fields:
              - { label: "Closed all day?", name: closed, widget: boolean, default: false }
              - { label: "Opens (e.g. 09:00)", name: open, widget: string, required: false }
              - { label: "Closes (e.g. 17:00)", name: close, widget: string, required: false }
          - label: "Tuesday — שלישי"
            name: tue
            widget: object
            fields:
              - { label: "Closed all day?", name: closed, widget: boolean, default: false }
              - { label: "Opens (e.g. 09:00)", name: open, widget: string, required: false }
              - { label: "Closes (e.g. 17:00)", name: close, widget: string, required: false }
          - label: "Wednesday — רביעי"
            name: wed
            widget: object
            fields:
              - { label: "Closed all day?", name: closed, widget: boolean, default: false }
              - { label: "Opens (e.g. 09:00)", name: open, widget: string, required: false }
              - { label: "Closes (e.g. 17:00)", name: close, widget: string, required: false }
          - label: "Thursday — חמישי"
            name: thu
            widget: object
            fields:
              - { label: "Closed all day?", name: closed, widget: boolean, default: false }
              - { label: "Opens (e.g. 09:00)", name: open, widget: string, required: false }
              - { label: "Closes (e.g. 17:00)", name: close, widget: string, required: false }
          - label: "Friday — שישי"
            name: fri
            widget: object
            fields:
              - { label: "Closed all day?", name: closed, widget: boolean, default: false }
              - { label: "Opens (e.g. 09:00)", name: open, widget: string, required: false }
              - { label: "Closes (e.g. 16:00)", name: close, widget: string, required: false }
          - label: "Saturday — שבת"
            name: sat
            widget: object
            fields:
              - { label: "Closed all day?", name: closed, widget: boolean, default: false }
              - { label: "Opens (e.g. 09:00)", name: open, widget: string, required: false }
              - { label: "Closes (e.g. 17:00)", name: close, widget: string, required: false }

  - name: special
    label: "Special days"
    files:
      - name: special
        label: "Special / holiday hours"
        file: "special.json"
        fields:
          - label: "Special days (by date)"
            name: days
            widget: list
            required: false
            summary: "{{fields.date}}  —  {{fields.open}}–{{fields.close}}"
            fields:
              - { label: "Date", name: date, widget: datetime, date_format: "YYYY-MM-DD", time_format: false, picker_utc: true }
              - { label: "Closed this day?", name: closed, widget: boolean, default: false }
              - { label: "Opens (e.g. 09:00)", name: open, widget: string, required: false }
              - { label: "Closes (e.g. 20:30)", name: close, widget: string, required: false }
              - { label: "Note (optional)", name: note, widget: string, required: false }

  - name: sections
    label: "Section titles"
    i18n: true
    files:
      - name: sections
        label: "Section titles"
        file: "sections.json"
        i18n: true
        fields:
          - { label: "About — section label", name: about, widget: string, i18n: true }
          - { label: "Coffee menu — section label", name: menu, widget: string, i18n: true }
          - { label: "Beans — section label", name: beans, widget: string, i18n: true }
          - { label: "Kitchen menu — section label", name: kitchen, widget: string, i18n: true }
          - { label: "Specials — section label", name: specials, widget: string, i18n: true }
          - { label: "Gallery — section label", name: place, widget: string, i18n: true }
          - { label: "Events — section label", name: events, widget: string, i18n: true }
          - { label: "Venue rental — section label", name: booking, widget: string, i18n: true }
          - { label: "Opening hours — title", name: hours, widget: string, i18n: true }
