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

declare(strict_types=1);

namespace LolaCoreForBricks\Schemas;

use LolaCoreForBricks\AbilitiesProvider;

/**
 * Door 1 schemas for global variable reads.
 */
class VariableSchemas
{
    /**
     * @return array<string, array<string, mixed>>
     */
    public static function define(): array
    {
        return [
            'getGlobalVariables' => [
                'description' => 'List Bricks global variables with categories and the color palette.',
                'category'    => AbilitiesProvider::CATEGORY,
                'keywords'    => [
                    'exact' => ['global variables', 'variables globales', 'design tokens'],
                    'stem'  => ['variable', 'token'],
                ],
                'parameters'  => [
                    'type'       => 'object',
                    'properties' => array_merge(SchemaPagination::properties(), [
                        'category' => ['type' => 'string'],
                    ]),
                ],
            ],
            'getVariableUsage' => [
                'description' => 'Show which elements, classes, or theme styles reference a variable. Includes index coverage.',
                'category'    => AbilitiesProvider::CATEGORY,
                'keywords'    => [
                    'exact' => ['variable usage', 'uso de variable'],
                    'stem'  => ['variable', 'reference'],
                ],
                'parameters'  => [
                    'type'       => 'object',
                    'properties' => array_merge(SchemaPagination::properties(), [
                        'variable' => ['type' => 'string'],
                    ]),
                    'required'   => ['variable'],
                ],
            ],
        ];
    }
}
