import { WornHat, WornHatEffect } from "../worn_hat";
class DiverHat extends WornHatEffect {
    constructor() {
        super(...arguments);
        this.hatTypeId = "ldz_crcomp:hat_diver";
        this.effectData = [
            { type: "conduit_power", amplifier: 2, condition: (entity) => { return entity.isInWater; } },
        ];
    }
    async onEquip() {
        super.onEquip();
        //this.hatWearer.Entity.runCommand('say equip');
        this.hatWearer.Entity.runCommand('fog @s remove default_water_fog');
        this.hatWearer.Entity.runCommand('fog @s push ldz_crcomp:no_water_fog no_water_fog');
    }
    async onUnequip() {
        super.onUnequip();
        //this.hatWearer.Entity.runCommand('say unequip');
        this.hatWearer.Entity.runCommand('fog @s remove no_water_fog');
        this.hatWearer.Entity.runCommand('fog @s push ldz_crcomp:default_water_fog default_water_fog');
    }
}
WornHat.HatTable["ldz_crcomp:hat_diver"] = DiverHat;
