<?php
/**
 * Reusable product attributes module.
 *
 * @package ScheduledChanges
 */

namespace ScheduledChangesWooCommerce\CoreCompat\WooCommerce\Attributes;

/** Owns product attribute fields, codecs, and schema operations. */
final class ProductAttributesModule {
	public const MODULE_ID = 'scheduled-changes-product-attributes';

	/** @return string[] */
	public function fieldKeys(): array {
		return array(
			'attributes.definitions',
			'attributes.default_values',
			'attributes.assignment',
		);
	}

	/** Creates the canonical attribute codec. */
	public function createCodec(): AttributeCodec {
		return new AttributeCodec();
	}

	/** Creates add/remove/replace/reorder schema operations. */
	public function createOperationService(): AttributeOperationService {
		return new AttributeOperationService();
	}
}
