<?php

declare(strict_types=1);

namespace Atdt;

/**
 * What a door implements (SPEC §13.2). Frames out, In events in; the
 * runner and DoorScreen handle everything else.
 */
interface DoorInterface
{
    /** @return list<array<string, mixed>> frames */
    public function enter(DoorContext $ctx): array;

    /** @return list<array<string, mixed>> frames */
    public function input(DoorContext $ctx, In $in): array;

    public function leave(DoorContext $ctx): void;
}
