<?php

namespace GriffinForms\Frontend\Security\Guards;

interface GuardInterface
{
    /**
     * Unique key for the guard (used for routing + logging).
     */
    public function getKey(): string;

    /**
     * Priority order (lower runs first).
     */
    public function getPriority(): int;

    /**
     * Evaluate guard state for the given form.
     *
     * @param int   $form_id
     * @param array $context
     *
     * @return array{blocked:bool,message?:string}
     */
    public function check(int $form_id, array $context = []): array;
}
