<?php

declare(strict_types=1);

/** APO-194 Card 7 — GET /api/v1/design/navigation/default */
final class MyronGetNavigationDefaultAction implements MyronAction
{
    public function __construct(private readonly MyronNavigationDesignRepository $repo) {}

    public function metadata(): MyronActionMetadata
    {
        return new MyronActionMetadata(
            uri: '/api/v1/design/navigation/default', method: 'GET',
            domain: 'design', resource: 'navigation-default', verb: 'get',
            inputSchema: ['type' => 'object', 'properties' => []],
            outputSchema: ['type' => 'object', 'properties' => []],
            requiredScope: MyronApiScopes::DESIGN_READ,
            summary: 'Get the current global default navigation version.',
            audienceClass: 3,
            snapshotInclude: true, snapshotKey: 'design.navigationDefault',
            exposeToMcp: true,
        );
    }

    public function execute(array $input, MyronActionCallerContext $caller): MyronActionResult
    {
        return MyronActionResult::ok((array) $this->repo->getDefault());
    }
}
