"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PostPickupSelectionFilter = void 0;
const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
const CustomCallback_1 = require("../private/CustomCallback");
class PostPickupSelectionFilter extends CustomCallback_1.CustomCallback {
    constructor() {
        super();
        this.callbacksUsed = [
            // 37
            [isaac_typescript_definitions_1.ModCallback.POST_PICKUP_SELECTION, this.postPickupSelection],
        ];
    }
    /**
     * We cannot use the `shouldFirePickup` helper function because in the case of non-collectibles,
     * `EntityPickup.Type` and `EntityPickup.Variant` and `EntityPickup.SubType` will all be set to 0
     * in this callback.
     */
    shouldFire = (fireArgs, optionalArgs) => {
        const [_pickup, pickupVariant, subType] = fireArgs;
        const [callbackPickupVariant, callbackPickupSubType] = optionalArgs;
        return ((callbackPickupVariant === undefined ||
            callbackPickupVariant === pickupVariant) &&
            (callbackPickupSubType === undefined || callbackPickupSubType === subType));
    };
    // ModCallback.POST_PICKUP_SELECTION (37)
    postPickupSelection = (pickup, variant, subType) => this.fire(pickup, variant, subType);
}
exports.PostPickupSelectionFilter = PostPickupSelectionFilter;
