// Path: src/main/java/de/johni0702/minecraft/gui/element/GuiElement.java
// public interface GuiElement<T extends GuiElement<T>> {
// 
//     MinecraftClient getMinecraft();
// 
//     GuiContainer getContainer();
//     T setContainer(GuiContainer container);
// 
//     void layout(ReadableDimension size, RenderInfo renderInfo);
//     void draw(GuiRenderer renderer, ReadableDimension size, RenderInfo renderInfo);
// 
//     ReadableDimension getMinSize();
//     ReadableDimension getMaxSize();
// 
//     T setMaxSize(ReadableDimension maxSize);
// 
//     boolean isEnabled();
//     T setEnabled(boolean enabled);
//     T setEnabled();
//     T setDisabled();
// 
//     GuiElement getTooltip(RenderInfo renderInfo);
//     T setTooltip(GuiElement tooltip);
// 
//     /**
//      * Returns the layer this element takes part in.
//      * The standard layer is layer 0. Event handlers will be called for this layer.
//      * @return The layer of this element
//      */
//     int getLayer();
// 
// }
// 
// Path: src/main/java/de/johni0702/minecraft/gui/layout/Layout.java
// public interface Layout {
// 
//     Map<GuiElement, Pair<ReadablePoint, ReadableDimension>> layOut(GuiContainer<?> container, ReadableDimension size);
// 
//     ReadableDimension calcMinSize(GuiContainer<?> container);
// 
// }
// 
// Path: src/main/java/de/johni0702/minecraft/gui/layout/LayoutData.java
// public interface LayoutData {
//     LayoutData NONE = VoidLayoutData.INSTANCE;
// }


import de.johni0702.minecraft.gui.element.GuiElement;
import de.johni0702.minecraft.gui.layout.Layout;
import de.johni0702.minecraft.gui.layout.LayoutData;
import java.util.ArrayList;
import java.util.Map;

    GuiPanel(Layout layout, int width , int height, Map<GuiElement, LayoutData> withElements) {
        setLayout(layout);
        if (width != 0 || height != 0) {
            setSize(width, height);
        }
        for (Map.Entry<GuiElement, LayoutData> e : withElements.entrySet()) {
            addElements(e.getValue(), e.getKey());
        }
    }

    public static GuiPanelBuilder builder() {
        return new GuiPanelBuilder();
    }

    @Override
    protected GuiPanel getThis() {
        return this;
    }

    public static class GuiPanelBuilder {
        private Layout layout;
        private int width;
        private int height;
        private ArrayList<GuiElement> withElements$key;
        private ArrayList<LayoutData> withElements$value;

        GuiPanelBuilder() {
        }

// Path: src/main/java/de/johni0702/minecraft/gui/element/GuiElement.java
// public interface GuiElement<T extends GuiElement<T>> {
// 
//     MinecraftClient getMinecraft();
// 
//     GuiContainer getContainer();
//     T setContainer(GuiContainer container);
// 
//     void layout(ReadableDimension size, RenderInfo renderInfo);
//     void draw(GuiRenderer renderer, ReadableDimension size, RenderInfo renderInfo);
// 
//     ReadableDimension getMinSize();
//     ReadableDimension getMaxSize();
// 
//     T setMaxSize(ReadableDimension maxSize);
// 
//     boolean isEnabled();
//     T setEnabled(boolean enabled);
//     T setEnabled();
//     T setDisabled();
// 
//     GuiElement getTooltip(RenderInfo renderInfo);
//     T setTooltip(GuiElement tooltip);
// 
//     /**
//      * Returns the layer this element takes part in.
//      * The standard layer is layer 0. Event handlers will be called for this layer.
//      * @return The layer of this element
//      */
//     int getLayer();
// 
// }
// 
// Path: src/main/java/de/johni0702/minecraft/gui/layout/Layout.java
// public interface Layout {
// 
//     Map<GuiElement, Pair<ReadablePoint, ReadableDimension>> layOut(GuiContainer<?> container, ReadableDimension size);
// 
//     ReadableDimension calcMinSize(GuiContainer<?> container);
// 
// }
// 
// Path: src/main/java/de/johni0702/minecraft/gui/layout/LayoutData.java
// public interface LayoutData {
//     LayoutData NONE = VoidLayoutData.INSTANCE;
// }


// Path: src/main/java/de/johni0702/minecraft/gui/container/GuiPanel.java
import de.johni0702.minecraft.gui.element.GuiElement;
import de.johni0702.minecraft.gui.layout.Layout;
import de.johni0702.minecraft.gui.layout.LayoutData;
import java.util.ArrayList;
import java.util.Map;


    GuiPanel(Layout layout, int width , int height, Map<GuiElement, LayoutData> withElements) {
        setLayout(layout);
        if (width != 0 || height != 0) {
            setSize(width, height);
        }
        for (Map.Entry<GuiElement, LayoutData> e : withElements.entrySet()) {
            addElements(e.getValue(), e.getKey());
        }
    }

    public static GuiPanelBuilder builder() {
        return new GuiPanelBuilder();
    }

    @Override
    protected GuiPanel getThis() {
        return this;
    }

    public static class GuiPanelBuilder {
        private Layout layout;
        private int width;
        private int height;
        private ArrayList<GuiElement> withElements$key;
        private ArrayList<LayoutData> withElements$value;

        GuiPanelBuilder() {
        }

        public GuiPanelBuilder layout(Layout layout) {