<?php

declare(strict_types=1);

namespace App\Framework\MagicLinks\Actions;

use App\Framework\MagicLinks\TokenAction;

interface ActionRegistry
{
    /**
     * Register an action
     */
    public function register(MagicLinkAction $action): void;

    /**
     * Get an action by name
     */
    public function get(TokenAction $action): ?MagicLinkAction;

    /**
     * Check if an action is registered
     */
    public function has(TokenAction $action): bool;

    /**
     * Get all registered actions
     */
    public function getAll(): array;

    /**
     * Unregister an action
     */
    public function unregister(TokenAction $action): void;
}
