<?php
/**
 * Policy Contract
 *
 * @package Licenzo\Framework\Contracts\Auth
 */

namespace Licenzo\Framework\Contracts\Auth;

use Licenzo\Framework\Http\Request;

// Prevent direct access
if (!defined('ABSPATH')) {
    exit;
}

/**
 * Policy interface for authorization
 */
interface Policy
{
    /**
     * Authorize the request
     *
     * @param Request $request
     * @param mixed ...$arguments
     * @return bool
     */
    public function authorize(Request $request, ...$arguments): bool;

    /**
     * Get the authorization failure message
     *
     * @return string
     */
    public function message(): string;

    /**
     * Get the required WordPress capabilities
     *
     * @return array
     */
    public function getRequiredCapabilities(): array;
}
