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

import net.md_5.bungee.api.chat.ClickEvent;
import net.md_5.bungee.api.dialog.Dialog;

/**
 * Click event which displays either a pre-existing dialog by key or a custom
 * dialog.
 */
public class ShowDialogClickEvent extends ClickEvent {
    /**
     * Key for a pre-existing dialog to show.
     */
    private String reference;
    /**
     * Dialog to show.
     */
    private Dialog dialog;

    public ShowDialogClickEvent(String reference) {
        this(reference, null);
    }

    public ShowDialogClickEvent(Dialog dialog) {
        this(null, dialog);
    }

    private ShowDialogClickEvent(String reference, Dialog dialog) {
        super(Action.SHOW_DIALOG, null);
        this.reference = reference;
        this.dialog = dialog;
    }

    /**
     * Key for a pre-existing dialog to show.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getReference() {
        return this.reference;
    }

    /**
     * Dialog to show.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public Dialog getDialog() {
        return this.dialog;
    }

    /**
     * Key for a pre-existing dialog to show.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setReference(final String reference) {
        this.reference = reference;
    }

    /**
     * Dialog to show.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setDialog(final Dialog dialog) {
        this.dialog = dialog;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "ShowDialogClickEvent(reference=" + this.getReference() + ", dialog=" + this.getDialog() + ")";
    }

    @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 ShowDialogClickEvent)) return false;
        final ShowDialogClickEvent other = (ShowDialogClickEvent) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        final java.lang.Object this$reference = this.getReference();
        final java.lang.Object other$reference = other.getReference();
        if (this$reference == null ? other$reference != null : !this$reference.equals(other$reference)) return false;
        final java.lang.Object this$dialog = this.getDialog();
        final java.lang.Object other$dialog = other.getDialog();
        if (this$dialog == null ? other$dialog != null : !this$dialog.equals(other$dialog)) return false;
        return true;
    }

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

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final java.lang.Object $reference = this.getReference();
        result = result * PRIME + ($reference == null ? 43 : $reference.hashCode());
        final java.lang.Object $dialog = this.getDialog();
        result = result * PRIME + ($dialog == null ? 43 : $dialog.hashCode());
        return result;
    }
}
