backend:
  name: git-gateway
  # branch: master
  commit_messages:
    create: "Création de {{collection}} «{{slug}}»"
    update: "Mise à jour de {{collection}} «{{slug}}»"
    delete: "Suppression de {{collection}} «{{slug}}»"
    uploadMedia: "Téléchargement de «{{path}}»"
    deleteMedia: "Suppression de «{{path}}»"
 
site_url: https://dubabox.netlify.app
display_url: https://dubabox.netlify.app

# Activer le mode local (uniquement pour le développement local avec npx decap-server)
# local_backend: true

publish_mode: editorial_workflow
media_folder: "public/images"
public_folder: "/images"

collections:
  - name: "pages"
    label: "Pages"
    files:
      - name: "home"
        label: "Accueil"
        file: "src/pages/index.astro"
        fields:
          - { name: "layout", widget: "hidden", default: "../layouts/Layout.astro" }
          - { label: "Titre", name: "title", widget: "string" }
          - { label: "Description", name: "description", widget: "text" }
          - label: "Contenu"
            name: "content"
            widget: "markdown"
            buttons: ["bold", "italic", "link", "heading-two", "heading-three", "bulleted-list", "numbered-list"]
  - name: "settings"
    label: "Paramètres Globaux"
    files:
      - name: "hero"
        label: "Section Hero"
        file: "src/content/settings/hero.json"
        fields:
          - { label: "Prix de départ (ex: 49€)", name: "heroPrice", widget: "string" }
      - name: "contact"
        label: "Informations de contact"
        file: "src/content/settings/contact.json"
        fields:
          - { label: "Heure d'ouverture", name: "openTime", widget: "string", default: "6h" }
          - { label: "Heure de fermeture", name: "closeTime", widget: "string", default: "22h" }
          - { label: "URL Facebook", name: "facebookUrl", widget: "string", required: false }
          - { label: "URL Instagram", name: "instagramUrl", widget: "string", required: false }
          - label: "Pré-réservation (CTA)"
            name: "prebook_group"
            widget: "object"
            fields:
              - { label: "Afficher le bloc ?", name: "showPrebook", widget: "boolean", default: true }
              - { label: "Titre du bloc", name: "prebookTitle", widget: "string", default: "Pré-réservation ouverte" }
              - { label: "Description", name: "prebookDesc", widget: "text", default: "Réservez dès maintenant et bénéficiez d'un tarif préférentiel pour les 3 premiers mois !" }
              - { label: "Lien du bouton (URL)", name: "prebookBtnUrl", widget: "string", required: false, hint: "Si vide, le bouton ne s'affichera pas." }
  
  - name: "pricing"
    label: "Tarifs des Box"
    files:
      - name: "plans"
        label: "Offres de stockage"
        file: "src/content/pricing/plans.json"
        fields:
          - label: "Liste des offres"
            name: "plans"
            widget: "list"
            fields:
              - { label: "Taille (chiffre)", name: "size", widget: "string" }
              - { label: "Unité (ex: m²)", name: "unit", widget: "string", default: "m²" }
              - { label: "Dimensions (ex: ~2m x 2m)", name: "dims", widget: "string" }
              - { label: "Description (Idéal pour...)", name: "desc", widget: "string" }
              - { label: "Prix (ex: 49€)", name: "price", widget: "string" }
              - { label: "Option populaire ?", name: "popular", widget: "boolean", default: false }

  - name: "faq"
    label: "Questions Fréquentes"
    files:
      - name: "items"
        label: "Liste FAQ"
        file: "src/content/faq/items.json"
        fields:
          - label: "QA"
            name: "items"
            widget: "list"
            fields:
              - { label: "Question", name: "question", widget: "string" }
              - { label: "Réponse", name: "answer", widget: "text" }

  - name: "blog"
    label: "Articles de blog"
    folder: "src/content/blog"
    create: true
    slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
    fields:
      - { label: "Titre", name: "title", widget: "string" }
      - { label: "Date de publication", name: "pubDate", widget: "datetime" }
      - { label: "Description", name: "description", widget: "text" }
      - { label: "Image de couverture", name: "image", widget: "image", required: false }
      - { label: "Tags", name: "tags", widget: "list", allow_add: true }
      - { label: "Contenu", name: "body", widget: "markdown" }

# Configuration de l'interface utilisateur
locale: "fr"
