backend:
  name: git-gateway
  branch: master

# Where uploaded images are stored in the repo
media_folder: public/images/cakes
public_folder: /images/cakes

# No draft workflow — publish immediately on save
publish_mode: simple

collections:

  # ── CAKES ──
  - name: cakes
    label: Cakes
    label_singular: Cake
    folder: src/content/cakes
    create: true
    delete: true
    slug: "{{slug}}"
    extension: json
    format: json
    fields:
      - { label: "Name", name: "name", widget: "string" }
      - { label: "Description", name: "desc", widget: "text" }
      - { label: "Price", name: "price", widget: "number", value_type: "float", min: 0 }
      - { label: "Currency / Unit", name: "unit", widget: "string", default: "৳",
          hint: "Currency shown before the price e.g. ৳, RM, $" }
      - label: "Badge"
        name: "badge"
        widget: "select"
        required: false
        default: ""
        options: ["", "New", "Best Seller", "Popular", "Limited", "Sold Out"]
      - { label: "Emoji (shown if no image)", name: "emoji", widget: "string", default: "🍰" }
      - { label: "Image", name: "image", widget: "image", required: false,
          hint: "Upload a photo or leave blank to show the emoji instead" }
      - { label: "Available", name: "available", widget: "boolean", default: true,
          hint: "Uncheck to hide this cake from the storefront" }

  # ── SITE SETTINGS ──
  - name: settings
    label: Site Settings
    files:

      # ── Shop Info ──
      - label: "Shop Info"
        name: "shop"
        file: src/content/settings/shop.json
        fields:
          - { label: "Shop Name", name: "name", widget: "string" }
          - { label: "Tagline / Description", name: "desc", widget: "text",
              hint: "Shown in the footer" }
          - { label: "Facebook Page URL", name: "facebook", widget: "string",
              required: false, hint: "Full URL e.g. https://facebook.com/yourpage" }
          - { label: "Instagram URL", name: "instagram", widget: "string",
              required: false, hint: "Full URL e.g. https://instagram.com/yourshop" }
          - { label: "Address / Area", name: "address", widget: "string",
              required: false, hint: "Shown in the footer e.g. Kuala Lumpur, Malaysia" }

      # ── Hero Section ──
      - label: "Hero Section"
        name: "hero"
        file: src/content/settings/hero.json
        fields:
          - { label: "Heading Line 1", name: "heading1", widget: "string", default: "Beautifully",
              hint: "First line of the main heading" }
          - { label: "Heading Line 2 (pink)", name: "heading2", widget: "string", default: "crafted cakes",
              hint: "Second line — shown in pink" }
          - { label: "Heading Line 3", name: "heading3", widget: "string", default: "for every occasion" }
          - { label: "Subheading", name: "subheading", widget: "string",
              hint: "Smaller text below the heading" }
          - { label: "Button Text", name: "buttonText", widget: "string", default: "Explore Our Cakes" }

      # ── About Section ──
      - label: "About Section"
        name: "about"
        file: src/content/settings/about.json
        fields:
          - { label: "Heading", name: "heading", widget: "string", default: "About Us" }
          - { label: "Paragraph 1", name: "paragraph1", widget: "text" }
          - { label: "Paragraph 2", name: "paragraph2", widget: "text" }
          - { label: "Stat 1 Number", name: "stat1Number", widget: "string", default: "500+",
              hint: "e.g. 500+, 1000+" }
          - { label: "Stat 1 Label", name: "stat1Label", widget: "string", default: "Happy Customers" }
          - { label: "Stat 2 Number", name: "stat2Number", widget: "string", default: "50+" }
          - { label: "Stat 2 Label", name: "stat2Label", widget: "string", default: "Cake Varieties" }
          - { label: "Stat 3 Number", name: "stat3Number", widget: "string", default: "5" }
          - { label: "Stat 3 Label", name: "stat3Label", widget: "string", default: "Years Experience" }
          - { label: "Button Text", name: "buttonText", widget: "string", default: "Learn More About Our Story" }

      # ── Contact Section ──
      - label: "Contact Section"
        name: "contact"
        file: src/content/settings/contact.json
        fields:
          - { label: "Heading", name: "heading", widget: "string", default: "Get In Touch" }
          - { label: "Subheading", name: "subheading", widget: "text",
              hint: "Text shown below the heading" }
          - { label: "Location", name: "location", widget: "string" }
          - { label: "Phone Number", name: "phone", widget: "string",
              hint: "Display format e.g. +88 01722525525" }
          - { label: "Phone Link", name: "phoneLink", widget: "string",
              hint: "tel: link e.g. tel:+8801722525525" }
          - { label: "WhatsApp Number", name: "whatsapp", widget: "string",
              hint: "Display format e.g. +88 01722525525" }
          - { label: "WhatsApp Link", name: "whatsappLink", widget: "string",
              hint: "e.g. https://wa.me/8801722525525" }
          - { label: "Email", name: "email", widget: "string" }
          - { label: "Business Hours", name: "hours", widget: "string" }
          - { label: "Special Orders Title", name: "specialOrdersTitle", widget: "string",
              default: "Special Orders" }
          - { label: "Special Orders Text", name: "specialOrdersText", widget: "text" }
