<?php

namespace Miruni\Merge_Syntax;

if (!defined('ABSPATH')) {
    exit; // Exit if accessed directly
}

/**
 * Available actions for Miruni merge syntax.
 */
enum Miruni_Merge_Action: string
{
    case ATTACHMENT_URL = 'ATTACHMENT_URL';
}

class Miruni_Merge_SyntaxOperation
{
    private Miruni_Merge_Action $action;
    /** @var array<string, mixed> */
    private array $args;

    /**
     * @param string $action
     * @param array<string,mixed> $args
     */
    public function __construct(string $action, array $args)
    {
        $this->action = Miruni_Merge_Action::from($action);
        $this->args = $args;
    }

    public function get_action(): Miruni_Merge_Action
    {
        return $this->action;
    }

    /**
     * @return array<string,mixed>
     */
    public function get_args(): array
    {
        return $this->args;
    }
}
