# 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/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 Type"
        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: "Title", widget: "string",required: false  }
      - { name: "subtitle", label: "Subtitle", widget: "string", required: false }
      - { name: "description", label: "Description", widget: "markdown",required: false  }
      - { label: "Sort Order", name: "sort", widget: "number", required: true }
      - { name: "draft", label: "Draft", widget: "boolean", default: false, required: true }
      - name: "videoSection"
        label: "Media Section"
        widget: "object"
        collapsed: true
        required: false
        fields:
          - { name: "videoFile", label: "Video", widget: "file",required: false }
          - { name: "thumbnail", label: "Image", widget: "image",required: false }
  - name: "teams"
    label: "Teams"
    folder: "src/data/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: "Name", name: "name", widget: "string", required: true }
      - { label: "Role", name: "role", widget: "string", required: true }
      - { label: "Image", name: "image", widget: "image", required: true }
      - { label: "Description", name: "description", widget: "markdown", required: true }
      - { label: "Sort Order", name: "sort", widget: "number", required: true }
      - { label: "Draft", name: "draft", widget: "boolean", default: false }
  - name: "faq"
    label: "FAQ"
    folder: "src/data/faq"
    create: true
    extension: "mdx"  # Salva i file come .mdx
    format: "frontmatter"  # Usa il frontmatter per i metadati
    slug: "{{slug}}"
    fields:
      - { label: "Question", name: "question", widget: "string", required: true }
      - { label: "Answer", name: "answer", widget: "markdown", required: true }
      - { label: "Sort Order", name: "sort", widget: "number", required: true }
      - { label: "Draft", name: "draft", widget: "boolean", default: false }

  - name: "testimonials"
    label: "Testimonials"
    folder: "src/data/testimonials"
    create: true
    extension: "mdx"  # Salva i file come .mdx
    format: "frontmatter"  # Usa il frontmatter per i metadati
    slug: "{{fields.name}}"
    fields:
      - { label: "Image", name: "image", widget: "image" }
      - { label: "Name", name: "name", widget: "string" }
      - { label: "Title", name: "title", widget: "string" }
      - { label: "Testimonial", name: "testimonial", widget: "text" }
      - { label: "Sort Order", name: "sort", widget: "number" , required: true }
      - { label: "Draft", name: "draft", widget: "boolean", default: false }

  - name: "metrics"
    label: "Metrics"
    folder: "src/data/metrics"
    create: true
    extension: "mdx"  # Salva i file come .mdx
    format: "frontmatter"  # Usa il frontmatter per i metadati
    slug: "{{fields.title}}"
    fields:
      - { label: "Title", name: "title", widget: "string" }
      - { label: "Icon", name: "icon", widget: "string" }
      - { label: "Text", name: "text", widget: "text" }
      - { label: "Sort Order", name: "sort", widget: "number", required: true }
      - { label: "Draft", name: "draft", widget: "boolean", default: false }

  - name: "appShowcase"
    label: "App Showcase"
    folder: "src/data/appShowcase"
    create: true
    extension: "mdx"  # Salva i file come .mdx
    format: "frontmatter"  # Usa il frontmatter per i metadati
    slug: "{{fields.title}}"
    fields:
        - { label: "Title", name: "title", widget: "string" }
        - { label: "Subtitle", name: "subtitle", widget: "string" }
        - { label: "Image", name: "image", widget: "image" }
        - { label: "Icon", name: "icon", widget: "string" }
        - { label: "Sort Order", name: "sort", widget: "number" , required: true }
        - { label: "Draft", name: "draft", widget: "boolean", default: false }
  - name: "keyPoints"
    label: "Key Points"
    label_singular: "Key Point"
    folder: "src/data/keyPoint"
    create: true
    slug: "{{fields.title}}"
    extension: "mdx"  # Salva i file come .mdx
    format: "frontmatter"  # Usa il frontmatter per i metadati
    fields:
      - { label: "Title", name: "title", widget: "string" }
      - { label: "Icon", name: "icon", widget: "string" }
      - { label: "Text", name: "text", widget: "text" }
      - { label: "Sort Order", name: "sort", widget: "number" , required: true }
      - { label: "Dradt", name: "draft", widget: "boolean", default: false }
  - name: "customers"
    label: "Customers"
    folder: "src/data/customers"
    create: true
    slug: "{{name}}"
    extension: "mdx"  # Salva i file come .mdx
    format: "frontmatter"  # Usa il frontmatter per i metadati
    fields:
      - { name: "name", label: "Name", widget: "string" }
      - { name: "image", label: "Image", widget: "image" }
      - { name: "link", label: "Website", widget: "string" }
      - { name: "sort", label: "Sort Order", widget: "number" , required: true }
      - { name: "draft", label: "Draft", widget: "boolean", default: false }
  - name: "roleFeatures"
    label: "Role Features"
    folder: "src/data/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: "Role Name", widget: "string" }
      - { label: "Icon", name: "icon", widget: "string" }
      - { name: "description", label: "Description", widget: "text" }
      - name: "features"
        label: "Features"
        widget: "list"
        field: { name: "feature", label: "Feature", widget: "string" }
      - { name: "sort", label: "Sort Order", widget: "number", required: true }
      - { name: "draft", label: "Draft", widget: "boolean", default: false, required: false }
  - name: "Careers"
    label: "Careers"
    folder: "src/data/careers"
    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: "department", label: "Department", widget: "string" }
      - name: "tags"
        label: "Tag"
        widget: "list"
        field: { name: "tag", label: "Tag", widget: "string" }
      - { name: "sort", label: "Sort Order", widget: "number", required: true }
      - { name: "draft", label: "Draft", widget: "boolean", default: false, required: false }

  - name: "otherPages"
    label: "Pages"
    folder: "src/data/otherPages/en"
    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: "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