<?php
/**
 * Native WordPress base-content module boundary.
 *
 * @package ScheduledChanges
 */

namespace ScheduledChanges\WordPressContent;

use ScheduledChanges\Repository\RecordingSessionRepository;

/**
 * Creates and registers native post/page target capability.
 */
final class NativeContentModule {
	public const MODULE_ID = 'scheduled-changes-native-content';

	/**
	 * Creates the provider that owns native target and base-field behavior.
	 */
	public function createProvider( ?NativeWordPressFieldSchema $schema = null, ?RegisteredMetaService $registered_meta = null ): NativeWordPressProvider {
		return new NativeWordPressProvider( $schema ?? new NativeWordPressFieldSchema(), null, null, null, $registered_meta );
	}

	/**
	 * Registers native target discovery and recording integration hooks.
	 */
	public function registerHooks( RecordingSessionRepository $recordings ): void {
		( new NativeWordPressIntegration( $recordings ) )->registerHooks();
	}
}
