// Generated by delombok at Tue Dec 16 19:34:32 UTC 2025
package net.md_5.bungee.api.dialog.input;

import com.google.gson.annotations.SerializedName;
import lombok.NonNull;
import net.md_5.bungee.api.chat.BaseComponent;

/**
 * Represents a checkbox input control.
 */
public class BooleanInput extends DialogInput {
    /**
     * The input label.
     */
    @NonNull
    private BaseComponent label;
    /**
     * The initial value (default: false/unchecked).
     */
    private Boolean initial;
    /**
     * The string value to be submitted when true/checked (default: "true").
     */
    @SerializedName("on_true")
    private String onTrue;
    /**
     * The string value to be submitted when false/unchecked (default: "false").
     */
    @SerializedName("on_false")
    private String onFalse;

    public BooleanInput(@NonNull String key, @NonNull BaseComponent label) {
        this(key, label, null, "true", "false");
        if (key == null) {
            throw new java.lang.NullPointerException("key is marked non-null but is null");
        }
        if (label == null) {
            throw new java.lang.NullPointerException("label is marked non-null but is null");
        }
    }

    public BooleanInput(@NonNull String key, @NonNull BaseComponent label, Boolean initial, String onTrue, String onFalse) {
        super("minecraft:boolean", key);
        if (key == null) {
            throw new java.lang.NullPointerException("key is marked non-null but is null");
        }
        if (label == null) {
            throw new java.lang.NullPointerException("label is marked non-null but is null");
        }
        this.label = label;
        this.initial = initial;
        this.onTrue = onTrue;
        this.onFalse = onFalse;
    }

    /**
     * The input label.
     */
    @NonNull
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public BaseComponent label() {
        return this.label;
    }

    /**
     * The initial value (default: false/unchecked).
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public Boolean initial() {
        return this.initial;
    }

    /**
     * The string value to be submitted when true/checked (default: "true").
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String onTrue() {
        return this.onTrue;
    }

    /**
     * The string value to be submitted when false/unchecked (default: "false").
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String onFalse() {
        return this.onFalse;
    }

    /**
     * The input label.
     * @return {@code this}.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public BooleanInput label(@NonNull final BaseComponent label) {
        if (label == null) {
            throw new java.lang.NullPointerException("label is marked non-null but is null");
        }
        this.label = label;
        return this;
    }

    /**
     * The initial value (default: false/unchecked).
     * @return {@code this}.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public BooleanInput initial(final Boolean initial) {
        this.initial = initial;
        return this;
    }

    /**
     * The string value to be submitted when true/checked (default: "true").
     * @return {@code this}.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public BooleanInput onTrue(final String onTrue) {
        this.onTrue = onTrue;
        return this;
    }

    /**
     * The string value to be submitted when false/unchecked (default: "false").
     * @return {@code this}.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public BooleanInput onFalse(final String onFalse) {
        this.onFalse = onFalse;
        return this;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "BooleanInput(super=" + super.toString() + ", label=" + this.label() + ", initial=" + this.initial() + ", onTrue=" + this.onTrue() + ", onFalse=" + this.onFalse() + ")";
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public boolean equals(final java.lang.Object o) {
        if (o == this) return true;
        if (!(o instanceof BooleanInput)) return false;
        final BooleanInput other = (BooleanInput) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        if (!super.equals(o)) return false;
        final java.lang.Object this$initial = this.initial();
        final java.lang.Object other$initial = other.initial();
        if (this$initial == null ? other$initial != null : !this$initial.equals(other$initial)) return false;
        final java.lang.Object this$label = this.label();
        final java.lang.Object other$label = other.label();
        if (this$label == null ? other$label != null : !this$label.equals(other$label)) return false;
        final java.lang.Object this$onTrue = this.onTrue();
        final java.lang.Object other$onTrue = other.onTrue();
        if (this$onTrue == null ? other$onTrue != null : !this$onTrue.equals(other$onTrue)) return false;
        final java.lang.Object this$onFalse = this.onFalse();
        final java.lang.Object other$onFalse = other.onFalse();
        if (this$onFalse == null ? other$onFalse != null : !this$onFalse.equals(other$onFalse)) return false;
        return true;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    protected boolean canEqual(final java.lang.Object other) {
        return other instanceof BooleanInput;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public int hashCode() {
        final int PRIME = 59;
        int result = super.hashCode();
        final java.lang.Object $initial = this.initial();
        result = result * PRIME + ($initial == null ? 43 : $initial.hashCode());
        final java.lang.Object $label = this.label();
        result = result * PRIME + ($label == null ? 43 : $label.hashCode());
        final java.lang.Object $onTrue = this.onTrue();
        result = result * PRIME + ($onTrue == null ? 43 : $onTrue.hashCode());
        final java.lang.Object $onFalse = this.onFalse();
        result = result * PRIME + ($onFalse == null ? 43 : $onFalse.hashCode());
        return result;
    }
}
