<?php
/**
 * Component knowledge ability schemas.
 *
 * @package LolaCoreForBricks
 */

declare(strict_types=1);

namespace LolaCoreForBricks\Schemas;

use LolaCoreForBricks\AbilitiesProvider;

/**
 * Door 1 schemas for component reads.
 */
class ComponentSchemas
{
    /**
     * @return array<string, array<string, mixed>>
     */
    public static function define(): array
    {
        return [
            'getComponents' => [
                'description' => 'List Bricks components with properties and instance counts. Includes index coverage.',
                'category'    => AbilitiesProvider::CATEGORY,
                'keywords'    => [
                    'exact' => ['bricks components', 'componentes'],
                    'stem'  => ['component'],
                ],
                'parameters'  => [
                    'type'       => 'object',
                    'properties' => SchemaPagination::properties(),
                ],
            ],
            'getComponentUsage' => [
                'description' => 'List component instances by page and element. Includes index coverage.',
                'category'    => AbilitiesProvider::CATEGORY,
                'keywords'    => [
                    'exact' => ['component usage', 'uso de componente'],
                    'stem'  => ['component', 'instance'],
                ],
                'parameters'  => [
                    'type'       => 'object',
                    'properties' => array_merge(SchemaPagination::properties(), [
                        'component' => ['type' => 'string'],
                    ]),
                    'required'   => ['component'],
                ],
            ],
        ];
    }
}
