<?php

namespace Reach\App\Fields\Options;

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

class SiteOptionsBranding {

    /**
     * Register Branding Tab fields into our Site Options parent group
     *
     * @return array
     *
     * @since 1.0.0
     */
    public function registerFields() {
        $fields = [
            [
                'key'       => 'field_591b25a60946c',
                'label'     => __( 'Branding', 'reach' ),
                'type'      => 'tab',
                'placement' => 'left'
            ],
            [
                'key'               => 'field_5277042873727',
                'label'             => __( 'Theme Styles', 'reach' ),
                'name'              => '',
                'type'              => 'message',
                'instructions'      => '',
                'required'          => 0,
                'conditional_logic' => 0,
                'wrapper'           => [
                    'width' => '',
                    'class' => 'acf-group-heading',
                    'id'    => '',
                ],
                'message'           => __( 'Select theme style treatment.', 'reach' ),
                'new_lines'         => 'wpautop',
                'esc_html'          => 0,
            ],
            [
                'key'           => 'field_591b563c5ad51',
                'label'         => __( 'Design Style', 'reach' ),
                'name'          => 'design_style',
                'type'          => 'radio_image',
                'choices'       => [
                    'flat'     => [
                        'label' => __( 'Flat', 'reach' ),
                        'image' => get_template_directory_uri() . '/assets/images/fields/flat-option.jpg'
                    ],
                    'material' => [
                        'label' => __( 'Material', 'reach' ),
                        'image' => get_template_directory_uri() . '/assets/images/fields/material-option.jpg'
                    ],
                ],
                'layout'        => 'horizontal',
                'default_value' => 'flat'
            ],
            [
                'key'               => 'field_8321315941481',
                'label'             => __( 'Theme Logo', 'reach' ),
                'name'              => '',
                'type'              => 'message',
                'instructions'      => '',
                'required'          => 0,
                'conditional_logic' => 0,
                'wrapper'           => [
                    'width' => '',
                    'class' => 'acf-group-heading',
                    'id'    => '',
                ],
                'message'           => __( 'Upload theme logo to display in the header.', 'reach' ),
                'new_lines'         => 'wpautop',
                'esc_html'          => 0,
            ],
            [
                'key'           => 'field_591b563c5ad56',
                'label'         => __( 'Logo', 'reach' ),
                'name'          => 'logo',
                'type'          => 'image',
                'return_format' => 'id',
                'preview_size'  => 'medium',
                'instructions'  => __( 'Recommend using a .svg vector graphic when possible. Optimal image dimensions 56px high by less than 150px wide. Accepted file formats: .svg .png .jpg', 'reach' )
            ],
            [
                'key'          => 'field_591b563c50356',
                'name'         => '',
                'type'         => 'message',
                'instructions' => '',
                'message'      => __( 'Logo size restrictions can be enabled and set below. If disabled, sizing will default to theme settings.', 'reach' )
            ],
            [
                'key'           => 'field_591b563c50456',
                'label'         => __( 'Logo Sizing', 'reach' ),
                'name'          => 'logo_size',
                'type'          => 'true_false',
                'wrapper'       => [
                    'width' => '20'
                ],
                'default_value' => 0,
                'ui'            => 1,
                'ui_on_text'    => __( 'On', 'reach' ),
                'ui_off_text'   => __( 'Off', 'reach' ),
                'instructions'  => __( 'Toggle sizing limits.', 'reach' ),
            ],
            [
                'key'          => 'field_591b563c50556',
                'label'        => __( 'Mobile Size', 'reach' ),
                'name'         => 'logo_size_mobile',
                'type'         => 'range',
                'wrapper'      => [
                    'width' => '40'
                ],
                'min'          => 15,
                'max'          => 100,
                'step'         => 5,
                'append'       => 'px',
                'instructions' => __( 'Enter a size between 15px - 100px.', 'reach' ),
            ],
            [
                'key'          => 'field_591b563c50656',
                'label'        => __( 'Desktop Size', 'reach' ),
                'name'         => 'logo_size_desktop',
                'type'         => 'range',
                'wrapper'      => [
                    'width' => '40'
                ],
                'min'          => 15,
                'max'          => 150,
                'step'         => 5,
                'append'       => 'px',
                'instructions' => __( 'Enter a size between 15px - 150px.', 'reach' ),
            ],
            [
                'key'               => 'field_92870404442901',
                'label'             => __( 'Theme Colors', 'reach' ),
                'name'              => '',
                'type'              => 'message',
                'instructions'      => '',
                'required'          => 0,
                'conditional_logic' => 0,
                'wrapper'           => [
                    'width' => '',
                    'class' => 'acf-group-heading',
                    'id'    => '',
                ],
                'message'           => __( 'Select colors to be inherited by the theme.', 'reach' ),
                'new_lines'         => 'wpautop',
                'esc_html'          => 0,
            ],
            [
                'key'          => 'field_591b6d8fe9a98',
                'label'        => __( 'Primary Color', 'reach' ),
                'instructions' => apply_filters('reach/colors/primary/description', ''),
                'name'         => 'primary_color',
                'type'         => 'color_picker',
                'wrapper'      => [
                    'width' => '33'
                ]
            ],
            [
                'key'          => 'field_591b6da7e9a99',
                'label'        => __( 'Secondary Color', 'reach' ),
                'instructions' => apply_filters('reach/colors/secondary/description', ''),
                'name'         => 'secondary_color',
                'type'         => 'color_picker',
                'wrapper'      => [
                    'width' => '34'
                ]
            ],
            [
                'key'          => 'field_591b6dbce9a9a',
                'label'        => __( 'Tertiary Color', 'reach' ),
                'instructions' => apply_filters('reach/colors/tertiary/description', ''),
                'name'         => 'tertiary_color',
                'type'         => 'color_picker',
                'wrapper'      => [
                    'width' => '33'
                ]
            ],
            [
                'key'               => 'field_9717923868293',
                'label'             => __( 'Theme Link Colors', 'reach' ),
                'name'              => '',
                'type'              => 'message',
                'instructions'      => '',
                'required'          => 0,
                'conditional_logic' => 0,
                'wrapper'           => [
                    'width' => '',
                    'class' => 'acf-group-heading',
                    'id'    => '',
                ],
                'message'           => __( 'Select light and dark options for link colors. Light options will be applied over dark backgrounds and vice versa.', 'reach' ),
                'new_lines'         => 'wpautop',
                'esc_html'          => 0,
            ],
            [
                'key'     => 'field_8373386839578',
                'label'   => __( 'Link Color Light', 'reach' ),
                'name'    => 'link_color_light',
                'type'    => 'color_picker',
                'wrapper' => [
                    'width' => '50'
                ]
            ],
            [
                'key'     => 'field_8354013351018',
                'label'   => __( 'Link Color Dark', 'reach' ),
                'name'    => 'link_color_dark',
                'type'    => 'color_picker',
                'wrapper' => [
                    'width' => '50'
                ]
            ],
            [
                'key'     => 'field_8373386834539',
                'label'   => __( 'Link Color Light Hover', 'reach' ),
                'name'    => 'link_color_light_hover',
                'type'    => 'color_picker',
                'wrapper' => [
                    'width' => '50'
                ]
            ],
            [
                'key'     => 'field_8354013371811',
                'label'   => __( 'Link Color Dark Hover', 'reach' ),
                'name'    => 'link_color_dark_hover',
                'type'    => 'color_picker',
                'wrapper' => [
                    'width' => '50'
                ]
            ],
            [
                'key'               => 'field_4600243663049',
                'label'             => __( 'Theme Button Colors', 'reach' ),
                'name'              => '',
                'type'              => 'message',
                'instructions'      => '',
                'required'          => 0,
                'conditional_logic' => 0,
                'wrapper'           => [
                    'width' => '',
                    'class' => 'acf-group-heading',
                    'id'    => '',
                ],
                'message'           => __( 'Select light and dark options for button colors. Light options will be applied over dark backgrounds and vice versa.', 'reach' ),
                'new_lines'         => 'wpautop',
                'esc_html'          => 0,
            ],
            [
                'key'   => 'field_4600243663044',
                'label' => __( 'Light Colors', 'reach' ),
                'name'  => 'button_light_colors',
                '_name' => 'button_light_colors',
                'type'  => 'button_colors'
            ],
            [
                'key'   => 'field_7791851747102',
                'label' => __( 'Dark Colors', 'reach' ),
                'name'  => 'button_dark_colors',
                '_name' => 'button_dark_colors',
                'type'  => 'button_colors',
            ],
            [
                'key'               => 'field_8235808872913',
                'label'             => __( 'Theme Fonts', 'reach' ),
                'name'              => '',
                'type'              => 'message',
                'instructions'      => '',
                'required'          => 0,
                'conditional_logic' => 0,
                'wrapper'           => [
                    'width' => '',
                    'class' => 'acf-group-heading',
                    'id'    => '',
                ],
                'message'           => __( 'Select primary and secondary theme fonts.', 'reach' ),
                'new_lines'         => 'wpautop',
                'esc_html'          => 0,
            ],
            [
                'key'          => 'field_591b7175dc7e9',
                'label'        => __( 'Primary Font', 'reach' ),
                'name'         => 'primary_font',
                'type'         => 'google_font_select',
                'wrapper'      => [
                    'width' => '50'
                ],
                'enqueue_font' => 1,
                'default_font' => 'Lato',
            ],
            [
                'key'          => 'field_591b7175dc7e8',
                'label'        => __( 'Secondary Font', 'reach' ),
                'name'         => 'secondary_font',
                'type'         => 'google_font_select',
                'wrapper'      => [
                    'width' => '50'
                ],
                'enqueue_font' => 1,
                'default_font' => 'Roboto',
            ],
            [
                'key'           => 'field_89b3289b3289bgs9823h',
                'label'         => __( 'Adobe Fonts', 'reach' ),
                'name'          => 'adobe_fonts',
                'type'          => 'true_false',
                'wrapper'       => [
                    'width' => '50'
                ],
                'default_value' => 0,
                'ui'            => 1,
                'ui_on_text'    => __( 'On', 'reach' ),
                'ui_off_text'   => __( 'Off', 'reach' ),
                'instructions'  => __( 'Enable/Disable Adobe Fonts.', 'reach' ),
            ],
            [
                'key'   => 'field_3h9b3289b398b39s',
                'label' => __( 'Web Project ID', 'reach' ),
                'name'  => 'adobe_fonts_id',
                'type'  => 'text',
                'wrapper'       => [
                    'width' => '50'
                ],
                'instructions'  => __( 'Enter your Adobe Fonts Web Project ID to activate your Web Project fonts.', 'reach' ),
            ],
            [
                'key'   => 'field_903b893v8v3w98b',
                'label' => __( 'Adobe Primary Font', 'reach' ),
                'name'  => 'adobe_primary_font',
                'type'  => 'text',
                'wrapper'       => [
                    'width' => '50'
                ],
                'placeholder' => 'mr-eaves-xl-modern, sans-serif',
                'instructions'  => __( 'This will override the above Primary Font. Leave this field blank to keep using the above font. <br>It\'s recommended that you add comma separated font fallbacks. Font names can be found in the "How to Use" section on the adobe font page.', 'reach' ),
            ],
            [
                'key'   => 'field_98h398b98fdb2obn30osfs',
                'label' => __( 'Adobe Secondary Font', 'reach' ),
                'name'  => 'adobe_secondary_font',
                'type'  => 'text',
                'wrapper'       => [
                    'width' => '50'
                ],
                'placeholder' => 'relation-two, cursive',
                'instructions'  => __( 'This will override the above Secondary Font. Leave this field blank to keep using the above font. <br>It\'s recommended that you add comma separated font fallbacks. Font names can be found in the "How to Use" section on the adobe font page.', 'reach' ),
            ],
            [
                'key'               => 'field_1357665605753',
                'label'             => __( 'Theme Background', 'reach' ),
                'name'              => '',
                'type'              => 'message',
                'instructions'      => '',
                'required'          => 0,
                'conditional_logic' => 0,
                'wrapper'           => [
                    'width' => '',
                    'class' => 'acf-group-heading',
                    'id'    => '',
                ],
                'message'           => __( 'Select theme background options', 'reach' ),
                'new_lines'         => 'wpautop',
                'esc_html'          => 0,
            ],
            [
                'key'   => 'field_591b7175dc7e1',
                'label' => __( 'Body Background', 'reach' ),
                'name'  => 'body_background',
                '_name' => 'body_background',
                'type'  => 'background_attributes'
            ],
            [
                'key'               => 'field_9991435130098',
                'label'             => __( 'Theme Maps', 'reach' ),
                'name'              => '',
                'type'              => 'message',
                'instructions'      => '',
                'required'          => 0,
                'conditional_logic' => 0,
                'wrapper'           => [
                    'width' => '',
                    'class' => 'acf-group-heading',
                    'id'    => '',
                ],
                'message'           => __( 'Select theme map style', 'reach' ),
                'new_lines'         => 'wpautop',
                'esc_html'          => 0,
            ],
            [
                'key'           => 'field_4877725680458',
                'label'         => __( 'Map Style', 'reach' ),
                'name'          => 'map_style',
                'type'          => 'radio_image',
                'choices'       => [
                    'standard'  => [
                        'label' => __( 'Standard', 'reach' ),
                        'image' => get_template_directory_uri() . '/assets/images/fields/map-standard.png'
                    ],
                    'silver'    => [
                        'label' => __( 'Silver', 'reach' ),
                        'image' => get_template_directory_uri() . '/assets/images/fields/map-silver.png'
                    ],
                    'retro'     => [
                        'label' => __( 'retro', 'reach' ),
                        'image' => get_template_directory_uri() . '/assets/images/fields/map-retro.png'
                    ],
                    'dark'      => [
                        'label' => __( 'Dark', 'reach' ),
                        'image' => get_template_directory_uri() . '/assets/images/fields/map-dark.png'
                    ],
                    'night'     => [
                        'label' => __( 'Night', 'reach' ),
                        'image' => get_template_directory_uri() . '/assets/images/fields/map-night.png'
                    ],
                    'aubergine' => [
                        'label' => __( 'Aubergine', 'reach' ),
                        'image' => get_template_directory_uri() . '/assets/images/fields/map-aubergine.png'
                    ]
                ],
                'layout'        => 'horizontal',
                'default_value' => 'standard'
            ],
        ];

        return $fields;
    }

}