package top.leisuretimedock.dglabgame.mixin.ldlib;

import com.lowdragmc.lowdraglib.gui.widget.Widget;
import net.minecraft.network.chat.Component;
import org.spongepowered.asm.mixin.*;
import top.leisuretimedock.dglabgame.core.extend.IDLWidgetExtend;

import java.util.List;

@Pseudo
@Mixin(value = Widget.class, remap = false)
@Implements(value = {@Interface(iface = IDLWidgetExtend.class, prefix = "dglab$")})
public abstract class MixinWidget implements IDLWidgetExtend {

    @Shadow @Final protected List<Component> tooltipTexts;

    @Override
    public void dgLab$clearHoverTooltips() {
        this.tooltipTexts.clear();
    }
    @Unique
    private boolean dgLab$enable = true;

    @Override
    public void dgLab$setEnabled(boolean enabled) {
        this.dgLab$enable = enabled;
    }

    @Override
    public boolean dgLab$isEnabled() {
        return this.dgLab$enable;
    }
}
