<?php

namespace EasyLinkAutomations\HTTP\Controllers\Triggers;

if (!defined('ABSPATH')) {
    exit;
}

use EasyLinkAutomations\HTTP\Request\Request;
use EasyLinkAutomations\HTTP\Response;

/**
 * Controller for Beaver Builder trigger endpoints.
 */
final class BeaverBuilderController
{
    /**
     * Return form fields for a Beaver Builder contact/subscribe form.
     *
     * Route: beaver-builder/form-fields
     */
    public function formFields(Request $request): Response
    {
        // Beaver Builder contact/subscribe form fields are standardized.
        $fields = [
            'name'    => 'Name',
            'email'   => 'Email',
            'message' => 'Message',
            'subject' => 'Subject',
        ];

        return Response::success(['fields' => $fields]);
    }
}
