<?php

namespace Elex\MultiVendor\Model;

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

class HelpAndSupport { 

	public static function get_help_and_support_menu() {

		$menus = array(
			array(
				'title' => __( 'FAQs' , 'elex-multi-vendor-for-woocommerce' ),
				'slug'  => 'frequent_questions',
			),
			array(
				'title' => __( 'Raise a Ticket' , 'elex-multi-vendor-for-woocommerce' ),
				'slug'  => 'tickets',
			),
			
		
		);

		/** 
		 * Fire a filter hook for admin settings menu
		 *
		 * @since 2.0.0
		 * @param $menus
		 */
		$menus = apply_filters( 'elex_mv_admin_support_menu', $menus );

		return $menus;
	}

	public static function get_param( $param, $default = null ) {
		// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only to get current active tab.
		$value = isset( $_GET[ $param ] ) ? sanitize_text_field( wp_unslash( $_GET[ $param ] ) ) : '';
		return $value ? $value : $default;
	}

	public static function include_file( $path, $args = array() ) {
		extract( $args );
		$file = ELEX_MULTI_VENDOR_PLUGIN_PATH . $path;
		include_once $file;
	}
}
