<?php

declare(strict_types=1);

namespace Plugin\tnt_mcp\src\Mcp\Action;

/**
 * The argument shape one `adminIo` method wants. It has to be declared because the two shapes are
 * not distinguishable from anything the shop exposes, and getting it wrong is a `TypeError`, not a
 * misfeature: `IOController` declares `strict_types=1`
 * (`includes/src/Router/Controller/Backend/IOController.php:3`), so `"5"` handed to
 * `deleteShippingSurcharge(int $surchargeID)` (`:618`) fatals.
 *
 * - {@see self::FormData} — the method takes ONE argument, the browser's `serializeArray()` output:
 *   a `list<array{name: string, value: string}>` that the controller flattens with
 *   `$post[$item['name']] = $item['value']` (`:565-567`, `:684-686`). Every value is a string, like
 *   a form post; because the flatten keeps only the last pair of a repeated name, an array field
 *   cannot survive it and is rejected at catalog load.
 * - {@see self::Positional} — one argument per declared field, in declaration order, cast to the
 *   PHP type the signature names (`deleteShippingSurchargeZIP(int $surchargeID, string $ZIP)`,
 *   `:637`). A positional argument cannot be skipped, so every field of such an entry must be
 *   `required: true`.
 */
enum AdminIoParams: string
{
    case FormData   = 'formData';
    case Positional = 'positional';
}
