using MediatR;
using MktZaloService.Domain.Enums;

namespace MktZaloService.API.Application.Commands.Rules;

/// <summary>
/// EN: Command to create a new chatbot rule.
/// VI: Command để tạo quy tắc chatbot mới.
/// </summary>
public record CreateChatbotRuleCommand(
    string Name,
    string? Description,
    RuleType Type,
    int Priority,
    ActionType ActionType,
    string? ResponseText,
    Guid? TemplateId,
    List<RuleConditionDto> Conditions
) : IRequest<CreateChatbotRuleResult>;

public record RuleConditionDto(string Field, string Operator, string Value);

public record CreateChatbotRuleResult(
    bool Success,
    Guid? RuleId = null,
    string? Error = null
);
