<?php

namespace Reach\App\Fields\Options;

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

class SiteOptionsCompany {

    /**
     * Register Company Tab fields into our Site Options parent group
     *
     * @return array
     *
     * @since 1.0.0
     */
    public function registerFields() {
        $fields = [
            [
                'key'       => 'field_591b25234j46c',
                'label'     => __( 'Company', 'reach' ),
                'type'      => 'tab',
                'placement' => 'left'
            ],
            [
                'key'               => 'field_9714546490408',
                'label'             => __( 'Company Information', 'reach' ),
                'name'              => '',
                'type'              => 'message',
                'instructions'      => '',
                'required'          => 0,
                'conditional_logic' => 0,
                'wrapper'           => [
                    'width' => '',
                    'class' => 'acf-group-heading',
                    'id'    => '',
                ],
                'message'           => __( 'Up to three company phone numbers can be added to display in the header.', 'reach' ),
                'new_lines'         => 'wpautop',
                'esc_html'          => 0,
            ],
            [
                'key'     => 'field_591b25234jf12',
                'label'   => __( 'Email Address', 'reach' ),
                'name'    => 'email_address',
                'type'    => 'text',
                'wrapper' => [
                    'width' => '50'
                ]
            ],
            [
                'key'          => 'field_7071572235422',
                'label'        => __( 'Phone Numbers', 'reach' ),
                'name'         => 'phone_numbers',
                'type'         => 'repeater',
                'layout'       => 'block',
                'required'     => 0,
                'collapsed'    => 'field_4546093213674',
                'button_label' => __( 'Add Phone Number', 'reach' ),
                'max'          => 3,
                'instructions' => __( 'Use prefix values to label phone numbers (i.e. mobile, office).', 'reach' ),
                'sub_fields'   => [
                    [
                        'key'      => 'field_13845672092031',
                        'label'    => __( 'Prefix', 'reach' ),
                        'name'     => 'phone_number_prefix',
                        '_name'    => 'name',
                        'type'     => 'text',
                        'wrapper'  => [
                            'width' => 15,
                        ],
                        'required' => 0
                    ],
                    [
                        'key'      => 'field_1384567209203',
                        'label'    => __( 'Phone Number', 'reach' ),
                        'name'     => 'phone_number',
                        '_name'    => 'name',
                        'type'     => 'text',
                        'wrapper'  => [
                            'width' => 85,
                        ],
                        'required' => 0
                    ],
                ]
            ],
            [
                'key'               => 'field_3594005476520',
                'label'             => __( 'Social Links', 'reach' ),
                'name'              => '',
                'type'              => 'message',
                'instructions'      => '',
                'required'          => 0,
                'conditional_logic' => 0,
                'wrapper'           => [
                    'width' => '',
                    'class' => 'acf-group-heading',
                    'id'    => '',
                ],
                'message'           => __( 'Adding a link to any of the social channels below will add the related icon to the footer. URL example: https://www.facebook.com/CompanyName', 'reach' ),
                'new_lines'         => 'wpautop',
                'esc_html'          => 0,
            ],
            [
                'key'     => 'field_591b6da7e9b85',
                'label'   => __( 'Facebook URL', 'reach' ),
                'name'    => 'facebook_url',
                'type'    => 'text',
                'wrapper' => [
                    'width' => '50'
                ]
            ],
            [
                'key'     => 'field_591b6da7e9b86',
                'label'   => __( 'Twitter URL', 'reach' ),
                'name'    => 'twitter_url',
                'type'    => 'text',
                'wrapper' => [
                    'width' => '50'
                ]
            ],
            [
                'key'     => 'field_591b6da7e9b87',
                'label'   => __( 'Instagram URL', 'reach' ),
                'name'    => 'instagram_url',
                'type'    => 'text',
                'wrapper' => [
                    'width' => '50'
                ]
            ],
            [
                'key'     => 'field_591b6da7e9b88',
                'label'   => __( 'YouTube URL', 'reach' ),
                'name'    => 'youtube_url',
                'type'    => 'text',
                'wrapper' => [
                    'width' => '50'
                ]
            ],
            [
                'key'     => 'field_591b6da7e9b92',
                'label'   => __( 'Yelp URL', 'reach' ),
                'name'    => 'yelp_url',
                'type'    => 'text',
                'wrapper' => [
                    'width' => '50'
                ]
            ],
            [
                'key'     => 'field_591b6da7e9b90',
                'label'   => __( 'Google URL', 'reach' ),
                'name'    => 'google_url',
                'type'    => 'text',
                'wrapper' => [
                    'width' => '50'
                ]
            ],
            [
                'key'     => 'field_0293968446946',
                'label'   => __( 'LinkedIn URL', 'reach' ),
                'name'    => 'linkedin_url',
                'type'    => 'text',
                'wrapper' => [
                    'width' => '50'
                ]
            ],
            [
                'key'     => 'field_591b6da7e9b91',
                'label'   => __( 'Better Business Bureau URL', 'reach' ),
                'name'    => 'bbb_url',
                'type'    => 'text',
                'wrapper' => [
                    'width' => '50'
                ]
            ],
            [
                'key'     => 'field_48943hre5e984eh',
                'label'   => __( 'Pinterest URL', 'reach' ),
                'name'    => 'pinterest_url',
                'type'    => 'text',
                'wrapper' => [
                    'width' => '50'
                ]
            ],
            [
                'key'     => 'field_98jdsis893he03f',
                'label'   => __( 'Angie\'s List URL', 'reach' ),
                'name'    => 'angies_url',
                'type'    => 'text',
                'wrapper' => [
                    'width' => '50'
                ]
            ],
            [
                'key'     => 'field_309njdsi390383o3',
                'label'   => __( 'HomeAdvisor URL', 'reach' ),
                'name'    => 'homeadvisor_url',
                'type'    => 'text',
                'wrapper' => [
                    'width' => '50'
                ]
            ],
            [
                'key'          => 'field_923b239823b9023s',
                'label'        => __( 'Custom Social Icons', 'reach' ),
                'name'         => 'custom_social_icons',
                'type'         => 'repeater',
                'layout'       => 'block',
                'required'     => false,
                'collapsed'    => 'field_lknsdo9032br903b',
                'button_label' => __( 'Add Social Icon', 'reach' ),
                'instructions' => __( '', 'reach' ),
                'sub_fields'   => [
                    [
                        'key'           => 'field_903b38923b3983e',
                        'label'         => __( 'Icon', 'reach' ),
                        'name'          => 'icon',
                        '_name'         => 'name',
                        'type'          => 'image',
                        'return_format' => 'id',
                        'required'      => false,
                        'preview_size'  => 'medium',
                        'instructions'  => __( 'Recommend using a .svg vector graphic when possible. Accepted file formats: .svg .png .jpg', 'reach' ),
                        'wrapper'       => [
                            'width' => 33,
                        ]
                    ],
                    [
                        'key'      => 'field_nd3b982398b3209',
                        'label'    => __( 'Title', 'reach' ),
                        'name'     => 'title',
                        '_name'    => 'name',
                        'required' => false,
                        'type'     => 'text',
                        'wrapper'  => [
                            'width' => 33,
                        ],
                        'required' => 0
                    ],
                    [
                        'key'      => 'field_bdsuisd3903b3093',
                        'label'    => __( 'URL', 'reach' ),
                        'name'     => 'url',
                        '_name'    => 'name',
                        'required' => false,
                        'type'     => 'url',
                        'wrapper'  => [
                            'width' => 33,
                        ],
                        'required' => 0
                    ]
                ]
            ],
            [
                'key'               => 'field_59fc97ca6abc0',
                'label'             => __( 'Privacy Policy', 'reach' ),
                'name'              => '',
                'type'              => 'message',
                'instructions'      => '',
                'required'          => 0,
                'conditional_logic' => 0,
                'wrapper'           => [
                    'width' => '',
                    'class' => 'acf-group-heading',
                    'id'    => '',
                ],
                'message'           => __( 'Entering the values below will dynamically populate placeholders in an auto-generated privacy policy page. ', 'reach' ),
                'new_lines'         => 'wpautop',
                'esc_html'          => 0,
            ],
            [
                'key'   => 'field_0459798717916',
                'label' => __( 'Company Name', 'reach' ),
                'name'  => 'privacy_company_name',
                'type'  => 'text'
            ],
            [
                'key'   => 'field_5831905576181',
                'label' => __( 'Company Address', 'reach' ),
                'name'  => 'privacy_company_address',
                'type'  => 'text'
            ],
            [
                'key'   => 'field_0948648919592',
                'label' => __( 'Company Phone Number', 'reach' ),
                'name'  => 'privacy_company_number',
                'type'  => 'text'
            ],
            [
                'key'   => 'field_2919378847483',
                'label' => __( 'Company State', 'reach' ),
                'name'  => 'privacy_company_state',
                'type'  => 'text'
            ]
        ];

        return $fields;
    }
}