<?php

namespace App\Framework\Smartlinks\Actions;

use App\Framework\Smartlinks\SmartlinkData;
use App\Framework\Smartlinks\TokenConfig;

interface SmartlinkAction
{
    /**
     * Get the action name
     */
    public function getName(): string;

    /**
     * Get default configuration for this action
     */
    public function getDefaultConfig(): TokenConfig;

    /**
     * Validate the payload for this action
     */
    public function validatePayload(array $payload): bool;

    /**
     * Execute the action
     */
    public function execute(SmartlinkData $smartlinkData, array $context = []): ActionResult;

    /**
     * Get required permissions/roles for this action
     */
    public function getRequiredPermissions(): array;
}
