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

declare(strict_types=1);

namespace LolaCoreForBricks\Schemas;

use LolaCoreForBricks\AbilitiesProvider;

/**
 * Door 1 schemas for global class reads.
 */
class ClassSchemas
{
    /**
     * @return array<string, array<string, mixed>>
     */
    public static function define(): array
    {
        return [
            'getGlobalClasses' => [
                'description' => 'List Bricks global classes with categories, settings counts, and lock state. Supports pagination.',

                'category'    => AbilitiesProvider::CATEGORY,

                'keywords'    => [

                    'exact' => ['global classes', 'clases globales', 'bricks classes'],

                    'stem'  => ['class', 'clase'],

                ],

                'parameters'  => [

                    'type'       => 'object',

                    'properties' => array_merge(SchemaPagination::properties(), [

                        'category'      => ['type' => 'string'],

                        'include_trash' => ['type' => 'boolean'],

                    ]),

                ],

            ],

            'getClassUsage' => [

                'description' => 'Show where a global class is used, grouped by page with element counts. Includes index coverage.',

                'category'    => AbilitiesProvider::CATEGORY,

                'keywords'    => [

                    'exact' => ['class usage', 'where is class used', 'uso de clase'],

                    'stem'  => ['usage', 'uso'],

                ],

                'parameters'  => [

                    'type'       => 'object',

                    'properties' => array_merge(SchemaPagination::properties(), [

                        'class' => ['type' => 'string', 'description' => 'Global class id or name.'],

                    ]),

                    'required'   => ['class'],

                ],

            ],

        ];

    }

}

