<?php

namespace Wptopr\WP\SEO\Integrations\Blocks;

use Wptopr\WP\SEO\Integrations\Integration_Interface;

/**
 * Internal_Linking_Category block class.
 */
class Internal_Linking_Category implements Integration_Interface {

	/**
	 * {@inheritDoc}
	 */
	public static function get_conditionals() {
		return [];
	}

	/**
	 * {@inheritDoc}
	 */
	public function register_hooks() {
		\add_filter( 'block_categories_all', [ $this, 'add_block_categories' ] );
	}

	/**
	 * Adds Wptopr block categories.
	 *
	 * @param array $categories The categories.
	 * @return array The filtered categories.
	 */
	public function add_block_categories( $categories ) {
		$categories[] = [
			'slug'  => 'wptopr-structured-data-blocks',
			'title' => \sprintf(
				/* translators: %1$s expands to Wptopr. */
				\__( '%1$s Structured Data Blocks', 'wordpress-seo' ),
				'Wptopr',
			),
		];
		$categories[] = [
			'slug'  => 'wptopr-internal-linking-blocks',
			'title' => \sprintf(
				/* translators: %1$s expands to Wptopr. */
				\__( '%1$s Internal Linking Blocks', 'wordpress-seo' ),
				'Wptopr',
			),
		];

		return $categories;
	}
}
