<?php

class ST_ProQyz_Post_Result_Message {
    /**
	 * Ielts_Lms_Post_Result_Message version.
	 *
	 * @var string
	 */
    public $version = '1.0.0';

    protected static $_instance = null;

    /**
	 * Main Ielts_Lms Instance.
	 *
	 * Ensures only one instance of Ielts_Lms_Post_Types is loaded or can be loaded.
	 *
	 * @since 1.0
	 * @static
	 * @see IELTS_LMS_POST_TYPES()
	 * @return Ielts_Lms_Post_Types - Main instance.
	 */
    public static function instance() {
        if ( is_null( self::$_instance ) ) {
            self::$_instance = new self();
        }
        return self::$_instance;
    }

    public function __construct() {
        
        add_action( 'init', [ $this, 'proqyz_register_result_message_post_type' ], 0 );
        
        
    }

    // Register Custom Post Type
    public function proqyz_register_result_message_post_type() {
        $labels = array(
            'name'                  => _x( 'Result Messages', 'Post Type General Name', 'proqyz' ),
            'singular_name'         => _x( 'Result Message', 'Post Type Singular Name', 'proqyz' ),
            'menu_name'             => __( 'Result Messages', 'proqyz' ),
            'all_items'             => __( 'All Result Messages', 'proqyz' ),
            'add_new'               => __( 'Add New', 'proqyz' ),
            'add_new_item'          => __( 'Add New Quiz', 'proqyz' ),
            'edit_item'             => __( 'Edit Quiz', 'proqyz' ),
            'new_item'              => __( 'New Quiz', 'proqyz' ),
            'view_item'             => __( 'View Quiz', 'proqyz' ),
            'search_items'          => __( 'Search Result Messages', 'proqyz' ),
            'not_found'             => __( 'No Result Messages found', 'proqyz' ),
            'not_found_in_trash'    => __( 'No Result Messages found in Trash', 'proqyz' ),
            'parent_item_colon'     => __( 'Parent Quiz:', 'proqyz' ),
            'menu_icon'             => 'dashicons-welcome-learn-more', // You can change the icon
        );
    
        $args = array(
            'labels'                => $labels,
            'public'                => true,
            'publicly_queryable'    => true,
            'show_ui'               => true,
            'show_in_menu'          => false, // Set to false to hide from the menu
            'query_var'             => true,
            'rewrite'               => array( 'slug' => 'result-message' ),
            'capability_type'       => 'post',
            'has_archive'           => true,
            'hierarchical'          => false,
            'menu_position'         => null,
            'supports'              => array( 'title', 'editor'),
        );

        register_post_type( 'result-message', $args );

    }



}

return ST_ProQyz_Post_Result_Message::instance();
