<?php
namespace Fab\Metabox\Setting;

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

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

    /**
     * Get cookie tab data
     *
     * @return array Cookie tab data
     */
    public function get_tab_cookie() {
        return array(
            'cookie' => array(
                'label'  => __( 'Cookie', 'floating-awesome-button' ),
                'fields' => array(
                    'expiration' => array(
                        'type'        => 'number',
                        'name'        => 'fab_trigger[cookie][expiration]',
                        'label'       => __( 'Expiration (Days)', 'floating-awesome-button' ),
                        'tooltip'     => __( 'Specify the number of days before the cookie expires.', 'floating-awesome-button' ),
                        'info'        => __( 'This determines how long the user’s interaction with the button or modal is remembered.', 'floating-awesome-button' ),
                        'placeholder' => '30',
                        'value'       => isset( $this->fab['trigger']['cookie']['expiration'] ) ? $this->fab['trigger']['cookie']['expiration'] : 30,
                    ),
                ),
            ),
        );
    }
}
