<?php

use Silvanus\includes\blocks\AcfBlockFields;

try {
    $fields = new AcfBlockFields('Basic Title Link Block Grid', __FILE__);

    // Block Fields
    $fields->addContainerSettings();
    $fields->addChoiceField("text center", 'select', [
        'choices' => [
            'text-center' => 'Yes',
            '' => 'No',
        ],
        'description' => 'Use this to override the global container setting for this field.',
    ]);
    $fields->addGridOptions();
    $fields->addText('Main Header');
    $fields->addRepeater('Blocks', ['layout' => 'block'])
        ->addText('header')
        ->addText('description')
        ->addFile('background_image', ['mime_types' => 'jpeg,jpg,png,gif,webp'])
        ->addLink('button', ['return_format' => 'array'])
        ->addText('custom_grid_class')
        ->endRepeater();
    return $fields->build();

} catch (\StoutLogic\AcfBuilder\FieldNameCollisionException $e) {

}
