<?php
/**
 * Reminders CPT bootstrap.
 *
 * Transitional module-local owner for the noesia_reminder 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_Reminders_CPT' ) ) {
    /**
     * Registers the Reminders CPT for the Reminders module.
     */
    class Noesia_SWA_Module_Reminders_CPT {

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

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