<?php
namespace Fab\Metabox\Setting;

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

/**
 * FAB Metabox Setting Tab.
 *
 * @package    Fab
 * @subpackage Fab/Helper/Metabox/Setting
 */
trait Tab_Setting {

    /**
     * Get setting tab data
     *
     * @return array Setting tab data
     */
    public function get_tab_setting() {
        $types = apply_filters( 'fab_setting_types', array(), array() );
        ksort( $types );
        return array(
            'setting' => array(
                'label'  => __( 'Setting', 'floating-awesome-button' ),
                'fields' => array(
                    'type' => array(
                        'type'    => 'select',
                        'name'    => 'fab_setting_type',
                        'label'   => __( 'Type', 'floating-awesome-button' ),
                        'tooltip' => __( 'Select the type of floating button you want to create.', 'floating-awesome-button' ),
                        'info'    => __( 'Choose from range of types like Link, Modal, Toast, Widget, and more to instantly boost your site\'s engagement', 'floating-awesome-button' ),
                        'value'   => isset( $this->fab['type'] ) ? $this->fab['type'] : '',
                        'options' => array_values( $types ),
                    ),
                ),
            ),
        );
    }
}
