<?php

namespace Reach\App\Fields\Options;

/**
 * Class SiteOptionsForms
 *
 * registerFields()
 *
 * @package Reach\App\Fields\Options
 */

class SiteOptionsForms {

    /**
     * Register Branding Tab fields into our Site Options parent group
     *
     * @return array
     *
     * @since 1.0.0
     */
    public function registerFields() {
        $fields = [
            [
                'key'       => 'field_af659804g6813d',
                'label'     => __( 'Forms', 'reach' ),
                'type'      => 'tab',
                'placement' => 'left'
            ],
            [
                'key'               => 'field_8235804g6813d',
                'label'             => __( 'Theme Forms', 'reach' ),
                'name'              => '',
                'type'              => 'message',
                'instructions'      => '',
                'required'          => 0,
                'conditional_logic' => 0,
                'wrapper'           => [
                    'width' => '',
                    'class' => 'acf-group-heading',
                    'id'    => '',
                ],
                'message'           => __( 'Select global form styles for this site.', 'reach' ),
                'new_lines'         => 'wpautop',
                'esc_html'          => 0,
            ],
            [
                'key'           => 'field_8235804g6812a',
                'label'         => __( 'Form Style', 'reach' ),
                'name'          => 'form_style',
                'type'          => 'select',
                'choices'       => [
                    'disabled'    => __( 'Disabled', 'reach' ),
                    'default'     => __( 'Default', 'reach' ),
                    'transparent' => __( 'Transparent', 'reach' ),
                ],
                'default_value' => 'default'
            ],
            [
                'key'           => 'field_8235804g6897b',
                'label'         => __( 'Label Visibility', 'reach' ),
                'name'          => 'form_label_visibility',
                'type'          => 'button_group',
                'instructions'  => __( 'Choose to show or hide field labels withing your forms.', 'reach' ),
                'choices'       => [
                    'visible' => '<span class="dashicons dashicons-visibility"></span>',
                    'hidden'  => '<span class="dashicons dashicons-hidden"></span>',
                ],
                'default_value' => 'left',
                'layout'        => 'horizontal',
                'return_format' => 'value',
            ],
            [
                'key'           => 'field_8235804g6813b',
                'label'         => __( 'Field Alignment', 'reach' ),
                'name'          => 'form_input_align',
                'type'          => 'button_group',
                'instructions'  => __( 'Select the text alignment for form inputs and fields.', 'reach' ),
                'choices'       => [
                    'left'   => '<span class="dashicons dashicons-editor-alignleft"></span>',
                    'center' => '<span class="dashicons dashicons-editor-aligncenter"></span>',
                    'right'  => '<span class="dashicons dashicons-editor-alignright"></span>',
                ],
                'wrapper'       => [
                    'width' => 50,
                ],
                'default_value' => 'left',
                'layout'        => 'horizontal',
                'return_format' => 'value',
            ],
            [
                'key'           => 'field_8235804g6813c',
                'label'         => __( 'Button Alignment', 'reach' ),
                'name'          => 'form_button_align',
                'type'          => 'button_group',
                'instructions'  => __( 'Select the position of the submission button in your form footer.', 'reach' ),
                'choices'       => [
                    'left'   => '<span class="dashicons dashicons-editor-alignleft"></span>',
                    'center' => '<span class="dashicons dashicons-editor-aligncenter"></span>',
                    'right'  => '<span class="dashicons dashicons-editor-alignright"></span>',
                ],
                'wrapper'       => [
                    'width' => 50,
                ],
                'default_value' => 'left',
                'layout'        => 'horizontal',
                'return_format' => 'value',
            ],
        ];

        return $fields;
    }
}