package dev.sonpx.loyalty.mcp.tool;

import dev.sonpx.loyalty.mcp.model.Result;
import dev.sonpx.loyalty.mcp.reward.model.DeductionSequences;
import dev.sonpx.loyalty.mcp.service.DeductionSequenceService;
import lombok.RequiredArgsConstructor;
import org.springframework.ai.mcp.annotation.McpTool;
import org.springframework.stereotype.Component;

@Component
@RequiredArgsConstructor
public class DeductionSequenceTools {

    private final DeductionSequenceService deductionSequenceService;

    @McpTool(description = "Lấy thông tin cấu hình trừ điểm (Deduction Sequence) theo ID.")
    public Result<DeductionSequences> getDeductionSequenceById(String deductionSeqId) {
        return deductionSequenceService.findById(deductionSeqId);
    }

    @McpTool(description = "Lấy thông tin cấu hình trừ điểm (Deduction Sequence) mặc định của hệ thống.")
    public Result<DeductionSequences> getDefaultDeductionSequence() {
        return deductionSequenceService.findDefault();
    }
}
