package dev.sonpx.loyalty.mcp.tool;

import dev.sonpx.loyalty.mcp.model.Result;
import dev.sonpx.loyalty.mcp.reward.model.PoolDefinition;
import dev.sonpx.loyalty.mcp.service.PoolDefinitionService;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.ai.mcp.annotation.McpTool;
import org.springframework.stereotype.Component;

@Component
@RequiredArgsConstructor
public class PoolDefinitionTools {

    private final PoolDefinitionService poolDefinitionService;

    @McpTool(description = "Lấy thông tin chi tiết một Point Pool theo ID.")
    public Result<PoolDefinition> getPoolDefinitionById(String poolId) {
        return poolDefinitionService.findById(poolId);
    }

    @McpTool(description = "Lấy thông tin nhiều Point Pool theo danh sách ID, phân tách bằng dấu phẩy.")
    public Result<List<PoolDefinition>> getPoolDefinitionsByIds(String ids) {
        return poolDefinitionService.findActiveByIds(ids);
    }
}
