package com.yourname.premiumah.model;

import java.util.Collections;
import java.util.Map;

public record ActionResult(boolean success, String messageKey, Map<String, String> placeholders) {
    public static ActionResult success(String messageKey, Map<String, String> placeholders) {
        return new ActionResult(true, messageKey, placeholders == null ? Collections.emptyMap() : placeholders);
    }

    public static ActionResult fail(String messageKey, Map<String, String> placeholders) {
        return new ActionResult(false, messageKey, placeholders == null ? Collections.emptyMap() : placeholders);
    }
}
