<?php

namespace GriffinForms\Includes\Pipelines;

interface PostSubmissionHandlerInterface
{
    /**
     * Unique handler identifier.
     */
    public function getId(): string;

    /**
     * Priority for execution. Higher values run earlier.
     */
    public function getPriority(): int;

    /**
     * Determine whether handler should run for provided context.
     *
     * @param array $context
     */
    public function supports(array $context): bool;

    /**
     * Execute handler logic.
     *
     * @param array $context
     */
    public function handle(array $context): void;
}
