<?php
$items = array(
  'key' => 'mini_carousel', //<---- this is needed so that it shows on the Add Block
  'label' => 'Mini Carousel', //<---- this is needed so that it shows on the Add Block
  'title' => 'Mini Carousel',
  'name' => 'mini-carousel-block', // <---- This line defines the Twig file you're using, in this case '@mini-carousel'
  'type' => 'group',//<---- this is needed so that it shows on the Add Block Correctly
	'sub_fields' => array( //<---- this is initially fields, needs to be renamed as sub_fields
    array(
			'key' => 'field_5bd039f4c2f2d',
			'label' => 'Mini Carousel Title',
			'name' => 'category', // the 'name' value for each field has to match the variable in the Twig file.
			'type' => 'text',
			'instructions' => '',
			'required' => 1,
			'conditional_logic' => 0,
			'wrapper' => array(
				'width' => '',
				'class' => '',
				'id' => '',
			),
			'default_value' => '',
			'placeholder' => '',
			'prepend' => '',
			'append' => '',
			'maxlength' => '',
		),
        array (
          'key' => 'mini_carousel_section_label',
          'label' => 'Section Label',
          'name' => 'blocklabel',
          'type' => 'text',
          'instructions' => __('This label appears in in-page navigation and within the content of some blocks, overriding the title.', 'ipsen-master'),
        ),
		array(
			'key' => 'field_5bd02da0c2f2a',
			'label' => 'Mini Carousel Items',
			'name' => 'items', // the 'name' value has to match the variable passed to the twig file
			'type' => 'repeater',
			'instructions' => '',
			'required' => 0,
			'conditional_logic' => 0,
			'wrapper' => array(
				'width' => '',
				'class' => '',
				'id' => '',
			),
			'collapsed' => '',
			'min' => 0,
			'max' => 0,
			'layout' => 'table',
			'button_label' => '',
			'sub_fields' => array(
				array(
					'key' => 'field_5bd02dbac2f2b',
					'label' => 'Item Title',
					'name' => 'title', // the 'name' value for each field has to match the variable in the Twig file.
					'type' => 'text',
					'instructions' => '',
					'required' => 0,
					'conditional_logic' => 0,
					'wrapper' => array(
						'width' => '',
						'class' => '',
						'id' => '',
					),
					'default_value' => '',
					'placeholder' => '',
					'prepend' => '',
					'append' => '',
					'maxlength' => '',
				),
				array(
					'key' => 'field_5bd03910c2f2c',
					'label' => 'Item Content',
					'name' => 'content', // the 'name' value for each field has to match the variable in the Twig file.
					'type' => 'textarea',
					'instructions' => '',
					'required' => 0,
					'conditional_logic' => 0,
					'wrapper' => array(
						'width' => '',
						'class' => '',
						'id' => '',
					),
					'default_value' => '',
					'placeholder' => '',
					'maxlength' => '',
					'rows' => '',
					'new_lines' => '',
				),
			),
		)
	)
);

array_push($_SESSION["blocks"], $items); //<---- this is needed so that it shows on the Add Block
