<?php
/**
 * Registers generated snippet CPT.
 *
 * @package Niwa_AI
 */

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

class Niwa_AI_Snippet_Post_Type {
	public function register_hooks() {
		add_action( 'init', array( $this, 'register' ) );
	}

	public function register() {
		register_post_type(
			Niwa_AI_Template_Library_Types::CPT_SNIPPET,
			array(
				'labels'              => array(
					'name'          => __( 'Niwa Code Snippets', 'niwa-ai' ),
					'singular_name' => __( 'Niwa Code Snippet', 'niwa-ai' ),
				),
				'public'              => false,
				'publicly_queryable'  => false,
				'show_ui'             => false,
				'show_in_menu'        => false,
				'show_in_rest'        => false,
				'supports'            => array( 'title', 'author' ),
				'capability_type'     => 'post',
				'map_meta_cap'        => true,
				'exclude_from_search' => true,
				'rewrite'             => false,
			)
		);
	}
}
