<?php
/**
* Menu options
*
* @package GridRead WordPress Theme
* @copyright Copyright (C) 2025 ThemesDNA
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
* @author ThemesDNA <themesdna@gmail.com>
*/

function gridread_menu_options($wp_customize) {

    $wp_customize->add_section( 'gridread_section_menu_options', array( 'title' => esc_html__( 'Menu Options', 'gridread' ), 'panel' => 'gridread_main_options_panel', 'priority' => 100 ) );

    $wp_customize->add_setting( 'gridread_options[primary_menu_text]', array( 'default' => esc_html__( 'Menu', 'gridread' ), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) );

    $wp_customize->add_control( 'gridread_primary_menu_text_control', array( 'label' => esc_html__( 'Primary Menu Mobile Text', 'gridread' ), 'section' => 'gridread_section_menu_options', 'settings' => 'gridread_options[primary_menu_text]', 'type' => 'text', ) );

    $wp_customize->add_setting( 'gridread_options[disable_primary_menu]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridread_sanitize_checkbox', ) );

    $wp_customize->add_control( 'gridread_disable_primary_menu_control', array( 'label' => esc_html__( 'Disable Primary Menu', 'gridread' ), 'section' => 'gridread_section_menu_options', 'settings' => 'gridread_options[disable_primary_menu]', 'type' => 'checkbox', ) );

    $wp_customize->add_setting( 'gridread_options[center_primary_menu]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridread_sanitize_checkbox', ) );

    $wp_customize->add_control( 'gridread_center_primary_menu_control', array( 'label' => esc_html__( 'Center Primary Menu', 'gridread' ), 'description' => '<br/><hr/>', 'section' => 'gridread_section_menu_options', 'settings' => 'gridread_options[center_primary_menu]', 'type' => 'checkbox', ) );


    $wp_customize->add_setting( 'gridread_options[secondary_menu_text]', array( 'default' => esc_html__( 'Menu', 'gridread' ), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) );

    $wp_customize->add_control( 'gridread_secondary_menu_text_control', array( 'label' => esc_html__( 'Secondary Menu Mobile Text', 'gridread' ), 'section' => 'gridread_section_menu_options', 'settings' => 'gridread_options[secondary_menu_text]', 'type' => 'text', ) );

    $wp_customize->add_setting( 'gridread_options[disable_secondary_menu]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridread_sanitize_checkbox', ) );

    $wp_customize->add_control( 'gridread_disable_secondary_menu_control', array( 'label' => esc_html__( 'Disable Secondary Menu', 'gridread' ), 'section' => 'gridread_section_menu_options', 'settings' => 'gridread_options[disable_secondary_menu]', 'type' => 'checkbox', ) );

    $wp_customize->add_setting( 'gridread_options[center_secondary_menu]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridread_sanitize_checkbox', ) );

    $wp_customize->add_control( 'gridread_center_secondary_menu_control', array( 'label' => esc_html__( 'Center Secondary Menu', 'gridread' ), 'section' => 'gridread_section_menu_options', 'settings' => 'gridread_options[center_secondary_menu]', 'type' => 'checkbox', ) );

}