"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetDeckByIdQueryHandler = void 0;
const DeckMapper_1 = require("../../DTOs/Mappers/DeckMapper");
class GetDeckByIdQueryHandler {
    constructor(deckRepo) {
        this.deckRepo = deckRepo;
    }
    async execute(query) {
        const deck = await this.deckRepo.findById(query.id);
        if (!deck)
            return null;
        return DeckMapper_1.DeckMapper.toShortDto(deck);
    }
}
exports.GetDeckByIdQueryHandler = GetDeckByIdQueryHandler;
//# sourceMappingURL=GetDeckByIdQueryHandler.js.map