<?php

use Silvanus\includes\blocks\AcfBlockFields;

try {
    $fields = new AcfBlockFields('General CTA', __FILE__);
    $fields->addContainerSettings();

    $fields->addSelect('CTA', [
        'label' => 'CTA to display',
        'choices' => [],
        'ui' => 1,
        'allow_null' => 1,
        'return_format' => 'value',
        'instructions' => 'Select a CTA from Theme Settings → Global CTAs.',
    ]);

    return $fields->build();
} catch (\StoutLogic\AcfBuilder\FieldNameCollisionException $e) {
    // Intentionally ignore collisions to avoid fatal errors in production.
}