/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  net.minecraft.class_1799
 */
package meteordevelopment.meteorclient.gui.widgets;

import meteordevelopment.meteorclient.gui.renderer.GuiRenderer;
import meteordevelopment.meteorclient.gui.widgets.WWidget;
import net.minecraft.class_1799;

public class WItem
extends WWidget {
    protected class_1799 itemStack;

    public WItem(class_1799 itemStack) {
        this.itemStack = itemStack;
    }

    @Override
    protected void onCalculateSize() {
        double s;
        this.width = s = this.theme.scale(32.0);
        this.height = s;
    }

    @Override
    protected void onRender(GuiRenderer renderer, double mouseX, double mouseY, double delta) {
        if (!this.itemStack.method_7960()) {
            renderer.post(() -> {
                double s = this.theme.scale(2.0);
                renderer.item(this.itemStack, (int)this.x, (int)this.y, (float)s, true);
            });
        }
    }

    public void set(class_1799 itemStack) {
        this.itemStack = itemStack;
    }
}

