<?php
/**
 * WooCommerce Measurement Price Calculator
 *
 * This source file is subject to the GNU General Public License v3.0
 * that is bundled with this package in the file license.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.html
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@skyverge.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade WooCommerce Measurement Price Calculator to newer
 * versions in the future. If you wish to customize WooCommerce Measurement Price Calculator for your
 * needs please refer to http://docs.woocommerce.com/document/measurement-price-calculator/ for more information.
 *
 * @author    SkyVerge
 * @copyright Copyright (c) 2012-2026, SkyVerge, Inc. (info@skyverge.com)
 * @license   http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
 */

namespace SkyVerge\WooCommerce\Measurement_Price_Calculator\Abilities;

use SkyVerge\WooCommerce\Measurement_Price_Calculator\Measurements\Abilities\MeasurementConvert;
use SkyVerge\WooCommerce\Measurement_Price_Calculator\Products\Abilities\GetProductCalculatorSettings;
use SkyVerge\WooCommerce\PluginFramework\v6_2_0\Abilities\AbstractAbilitiesProvider;
use SkyVerge\WooCommerce\PluginFramework\v6_2_0\Abilities\DataObjects\AbilityCategory;

defined( 'ABSPATH' ) or exit;

/**
 * Registers ability categories and ability classes for the plugin.
 *
 * @since 3.24.0
 */
class Provider extends AbstractAbilitiesProvider {

	const PRODUCTS_CATEGORY_SLUG     = 'woocommerce-measurement-price-calculator-products';
	const MEASUREMENTS_CATEGORY_SLUG = 'woocommerce-measurement-price-calculator-measurements';

	/** @inheritDoc */
	protected array $abilities = [
		MeasurementConvert::class,
		GetProductCalculatorSettings::class,
	];

	/** @inheritDoc */
	public function getCategories() : array
	{
		return [
			new AbilityCategory(
				static::PRODUCTS_CATEGORY_SLUG,
				__( 'Measurement Price Calculator Products', 'woocommerce-measurement-price-calculator' ),
				__( 'Abilities related to products that use the measurement price calculator.', 'woocommerce-measurement-price-calculator' )
			),
			new AbilityCategory(
				static::MEASUREMENTS_CATEGORY_SLUG,
				__( 'Measurement Price Calculator Measurements', 'woocommerce-measurement-price-calculator' ),
				__( 'Abilities related to measurement values and unit conversion.', 'woocommerce-measurement-price-calculator' )
			),
		];
	}
}
