# backend:
#   name: test-repo
backend:
  name: github
  repo: tocash/landing
  branch: main
  base_url: https://tocash-showcase-cmbjacbtfkecdze2.italynorth-01.azurewebsites.net/

# backend:
#   name: git-gateway
# local_backend:
#   url: http://localhost:4321/api/v1
  
collections:
  - name: "home"
    label: "Home"
    folder: "src/data/it/home"
    create: true
    slug: "{{component | slugify}}"  # Usa il nome del file come slug
    extension: "mdx"  # Salva i file in formato MDX
    format: "frontmatter"  # Usa il frontmatter per i metadati
    fields:
      - name: "component"
        label: "Component"
        widget: "select"
        options:
          - { label: "Hero", value: "Hero" }
          - { label: "Customers", value: "Customers" }
          - { label: "Video", value: "Video" }
          - { label: "Highlights", value: "Highlights" }
          - { label: "Key Points", value: "KeyPoints" }
          - { label: "App Showcase", value: "AppShowcase" }
          - { label: "Metrics", value: "Metrics" }
          - { label: "Testimonials", value: "Testimonials" }
          - { label: "Role Features", value: "RoleFeatures" }
          - { label: "Teams", value: "Teams" }
          - { label: "Faq", value: "Faq" }
          - { label: "Contact Form", value: "ContactForm" }
          - { label: "CTA", value: "Cta" }
          - { label: "Careers", value: "Careers" }
        default: "Hero"
      - { name: "title", label: "Titolo", widget: "string",required: false  }
      - { name: "subtitle", label: "Sottotitolo", widget: "string", required: false }
      - { name: "description", label: "Descrizione", widget: "markdown",required: false  }
      - { label: "Ordinamento", name: "sort", widget: "number", required: true }
      - { name: "draft", label: "Bozza", widget: "boolean", default: false, required: true }
      - name: "videoSection"
        label: "Sezione Media"
        widget: "object"
        collapsed: true
        required: false
        fields:
          - { name: "videoFile", label: "Video", widget: "file",required: false }
          - { name: "thumbnail", label: "Immagine", widget: "image",required: false }
  - name: "teams"
    label: "Team"
    folder: "src/data/it/teams"
    create: true # Permetti la creazione di nuovi membri del team
    extension: "mdx" # Nuovi file creati con estensione .mdx
    format: "frontmatter" # Usa frontmatter per il contenuto
    slug: "{{slug}}" # Usa il nome del file basato sul titolo
    fields:
      - { label: "Nome", name: "name", widget: "string", required: true }
      - { label: "Ruolo", name: "role", widget: "string", required: true }
      - { label: "Immagine", name: "image", widget: "image", required: true }
      - { label: "Descrizione", name: "description", widget: "markdown", required: true }
      - { label: "Ordinamento", name: "sort", widget: "number", required: true }
      - { label: "Bozza", name: "draft", widget: "boolean", default: false }
  - name: "faq"
    label: "FAQ"
    folder: "src/data/it/faq"
    create: true
    extension: "mdx"  # Salva i file come .mdx
    format: "frontmatter"  # Usa il frontmatter per i metadati
    slug: "{{slug}}"
    fields:
      - { label: "Domanda", name: "question", widget: "string", required: true }
      - { label: "Risposta", name: "answer", widget: "markdown", required: true }
      - { label: "Ordinamento", name: "sort", widget: "number", required: true }
      - { label: "Bozza", name: "draft", widget: "boolean", default: false }

  - name: "testimonials"
    label: "Testimonials"
    folder: "src/data/it/testimonials"
    create: true
    extension: "mdx"  # Salva i file come .mdx
    format: "frontmatter"  # Usa il frontmatter per i metadati
    slug: "{{fields.name}}"
    fields:
      - { label: "Immagine", name: "image", widget: "image" }
      - { label: "Nome", name: "name", widget: "string" }
      - { label: "Titolo", name: "title", widget: "string" }
      - { label: "Testimonianza", name: "testimonial", widget: "text" }
      - { label: "Ordinamento", name: "sort", widget: "number", required: true }
      - { label: "Bozza", name: "draft", widget: "boolean", default: false }

  - name: "metrics"
    label: "Metriche"
    folder: "src/data/it/metrics"
    create: true
    extension: "mdx"  # Salva i file come .mdx
    format: "frontmatter"  # Usa il frontmatter per i metadati
    slug: "{{fields.title}}"
    fields:
      - { label: "Titolo", name: "title", widget: "string" }
      - { label: "Icona", name: "icon", widget: "string" }
      - { label: "Testo", name: "text", widget: "text" }
      - { label: "Ordinamento", name: "sort", widget: "number" }
      - { label: "Bozza", name: "draft", widget: "boolean", default: false }

  - name: "appShowcase"
    label: "Vetrina App"
    folder: "src/data/it/appShowcase"
    create: true
    extension: "mdx"  # Salva i file come .mdx
    format: "frontmatter"  # Usa il frontmatter per i metadati
    slug: "{{fields.title}}"
    fields:
        - { label: "Titolo", name: "title", widget: "string" }
        - { label: "Sottotitolo", name: "subtitle", widget: "string" }
        - { label: "Immagine", name: "image", widget: "image" }
        - { label: "Icona", name: "icon", widget: "string" }
        - { label: "Ordinamento", name: "sort", widget: "number" }
        - { label: "Bozza", name: "draft", widget: "boolean", default: false }
  - name: "keyPoints"
    label: "Key Points"
    label_singular: "Key Point"
    folder: "src/data/it/keyPoint"
    create: true
    slug: "{{fields.title}}"
    extension: "mdx"  # Salva i file come .mdx
    format: "frontmatter"  # Usa il frontmatter per i metadati
    fields:
      - { label: "Titolo", name: "title", widget: "string" }
      - { label: "Icona", name: "icon", widget: "string" }
      - { label: "Testo", name: "text", widget: "text" }
      - { label: "Ordinamento", name: "sort", widget: "number" }
      - { label: "Bozza", name: "draft", widget: "boolean", default: false }
  - name: "customers"
    label: "Clienti"
    folder: "src/data/it/customers"
    create: true
    slug: "{{name}}"
    extension: "mdx"  # Salva i file come .mdx
    format: "frontmatter"  # Usa il frontmatter per i metadati
    fields:
      - { name: "name", label: "Nome", widget: "string" }
      - { name: "image", label: "Immagine", widget: "image" }
      - { name: "link", label: "Sito", widget: "string" }
      - { name: "sort", label: "Ordinamento", widget: "number",required: true }
      - { name: "draft", label: "Bozza", widget: "boolean", default: false }
  - name: "roleFeatures"
    label: "Ruoli e Features" 
    folder: "src/data/it/roleFeatures"
    create: true
    slug: "{{name}}"  # Permette un ordinamento personalizzato nei file
    extension: "mdx"  # Salva i file come .mdx
    format: "frontmatter"  # Usa il frontmatter per i metadati
    fields:
      - { name: "name", label: "Ruolo", widget: "string" }
      - { label: "icona", name: "icon", widget: "string" }
      - { name: "description", label: "Descrizione", widget: "text" }
      - name: "features"
        label: "Features"
        widget: "list"
        field: { name: "feature", label: "Feature", widget: "string" ,required: true}
      - { name: "sort", label: "Ordinamento", widget: "number", required: true }
      - { name: "draft", label: "Bozza", widget: "boolean", default: false, required: false }
  - name: "Careers"
    label: "Carriere"
    folder: "src/data/it/careers"
    create: true
    slug: "{{name}}"  # Permette un ordinamento personalizzato nei file
    extension: "mdx"  # Salva i file come .mdx
    format: "frontmatter"  # Usa il frontmatter per i metadati
    fields:
      - { name: "title", label: "Titolo", widget: "string" }
      - { name: "department", label: "Dipartimento", widget: "string" }
      - name: "tags"
        label: "Tag"
        widget: "list"
        field: { name: "tag", label: "Tag", widget: "string" }
      - { name: "sort", label: "ordinamento", widget: "number", required: true }
      - { name: "draft", label: "Bozza", widget: "boolean", default: false, required: false }

  
  - name: "otherPages"
    label: "Pages"
    folder: "src/data/otherPages/it"
    create: true
    slug: "{{title}}"  # Permette un ordinamento personalizzato nei file
    extension: "mdx"  # Salva i file come .mdx
    format: "frontmatter"  # Usa il frontmatter per i metadati
    fields:
      - { name: "title", label: "Title", widget: "string" }
      - { name: "description", label: "Description", widget: "text" }
      - { label: "Body", name: "body", widget: "markdown" }
      - { name: "draft", label: "Draft", widget: "boolean", default: false, required: false }
      
      
media_folder: "src/assets/images" # Location where files will be stored in the repo
public_folder: "src/assets/images" # The src attribute for uploaded media