<?php
/**
 * Orders custom post type (data layer; admin UI in Phase 3).
 *
 * @package WPDudeProducts
 */

declare(strict_types=1);

namespace WPDude\Products\Orders;

/**
 * Registers wpdude_dc_order CPT.
 */
final class Post_Type {

	public const POST_TYPE = 'wpdude_dc_order';

	/**
	 * Register CPT.
	 */
	public static function register(): void {
		register_post_type(
			self::POST_TYPE,
			array(
				'labels'              => array(
					'name'          => __( 'Orders', 'dude-commerce' ),
					'singular_name' => __( 'Order', 'dude-commerce' ),
				),
				'public'              => false,
				'show_ui'             => false,
				'show_in_menu'        => false,
				'show_in_rest'        => false,
				'capability_type'     => 'post',
				'map_meta_cap'        => true,
				'supports'            => array( 'title' ),
				'has_archive'         => false,
			)
		);
	}
}
