"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const Filter_1 = __importDefault(require("./Filter"));
const Translation_1 = require("../../../translations/Translation");
class RateTypeFilter extends Filter_1.default {
    constructor(viewOnly) {
        super();
        this.viewOnly = viewOnly;
    }
    getLabel(t) {
        return t(Translation_1.Translation.Step.Room.RateTypeFilterLabel);
    }
    getViewOnly() {
        return this.viewOnly;
    }
    check(room) {
        room.filteredRates = room.getOriginalRates().filter((rate) => this.viewOnly.includes(rate.name) || this.viewOnly.includes(rate.code));
        return room;
    }
}
exports.default = RateTypeFilter;
//# sourceMappingURL=RateTypeFilter.js.map