<?php
/**
 * Design / Live Requests CPT bootstrap.
 *
 * Transitional module-local owner for the noesia_request post type.
 * Keeps the existing post type slug and arguments unchanged for backward
 * compatibility while moving ownership out of the central kernel.
 *
 * @package Noesia_Smart_Waiter
 */

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

if ( ! class_exists( 'Noesia_SWA_Module_Design_CPT' ) ) {
    /**
     * Registers the Live Requests CPT for the Design module.
     */
    class Noesia_SWA_Module_Design_CPT {

        /**
         * Register hooks.
         */
        public function __construct() {
            add_action( 'init', array( $this, 'register_cpt' ) );
        }

        /**
         * Register the Live Requests post type.
         *
         * Keeps the existing post type slug unchanged for backward compatibility.
         *
         * @return void
         */
        public function register_cpt() {
        register_post_type(
	'noesia_request',
	array(
		'public'        => false,
		'show_ui'       => true,
		'show_in_menu'  => true,
		'menu_position' => 90,
		'labels'        => array(
			'name' => __( 'Live Requests', 'noesia-smart-waiter' ),
		),
		'supports'      => array( 'title', 'custom-fields' ),
		'capabilities'  => array(
			'create_posts' => 'do_not_allow',
		),
		'map_meta_cap'  => true,
                )
            );
        }
    }
}
