name: productSlider
type: object
meta:
    label:
        de: Produktslider
        en: Product Slider
    dependsOn:
        eval: $parent.type === 'productSlider'
subFields:
    - name: productSource
      type: string
      meta:
          label:
              de: Produktdatenquelle
              en: Product Data Source
          widget: select
          choices:
              - name:
                    de: Manuelle Auswahl
                    en: Manual Selection
                id: manual

              - name:
                    de: Kategorie Id
                    en: Category id
                id: category

              - name:
                    de: Bestseller
                    en: Bestseller
                id: bestseller

              - name:
                    de: Neue Produkte
                    en: New Products
                id: newProducts

              - name:
                    de: Hervorgehoben
                    en: Featured
                id: featured

              - name:
                    de: Angebote
                    en: Discounted
                id: discounted

    - name: productIds
      type: number[]
      meta:
          label:
              de: Produkt IDs
              en: Product IDs
          dependsOn:
              eval: $parent.productSource === 'manual' || $parent.productSource === "discounted"
          widget: foreignKey
          foreign:
              collection: bigCommerceProduct
              id: bigCommerceId
              subNavigation: 0
              render:
                  defaultCollectionViews: true

    - name: categoryId
      type: string
      meta:
          label:
              de: Kategorie
              en: Category
          dependsOn:
              eval: $parent.productSource === 'category'

    - !include ../callToActionButton.yml
    - name: headline
      type: string
      meta:
          label:
              de: Überschrift
              en: Headline
    - name: topLine
      type: string
      meta:
          label:
              de: Top Line
              en: Top Line
