// Generated by delombok at Fri Oct 24 23:16:37 UTC 2025
package net.md_5.bungee.api.chat;

public final class KeybindComponent extends BaseComponent {
    /**
     * The keybind identifier to use.
     * <br>
     * Will be replaced with the actual key the client is using.
     */
    private String keybind;

    /**
     * Creates a keybind component from the original to clone it.
     *
     * @param original the original for the new keybind component.
     */
    public KeybindComponent(KeybindComponent original) {
        super(original);
        setKeybind(original.getKeybind());
    }

    /**
     * Creates a keybind component with the passed internal keybind value.
     *
     * @param keybind the keybind value
     * @see Keybinds
     */
    public KeybindComponent(String keybind) {
        setKeybind(keybind);
    }

    @Override
    public KeybindComponent duplicate() {
        return new KeybindComponent(this);
    }

    @Override
    protected void toPlainText(StringVisitor builder) {
        builder.append(getKeybind());
        super.toPlainText(builder);
    }

    @Override
    protected void toLegacyText(StringVisitor builder) {
        addFormat(builder);
        builder.append(getKeybind());
        super.toLegacyText(builder);
    }

    /**
     * The keybind identifier to use.
     * <br>
     * Will be replaced with the actual key the client is using.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getKeybind() {
        return this.keybind;
    }

    /**
     * The keybind identifier to use.
     * <br>
     * Will be replaced with the actual key the client is using.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setKeybind(final String keybind) {
        this.keybind = keybind;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "KeybindComponent(keybind=" + this.getKeybind() + ")";
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public KeybindComponent() {
    }

    @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 KeybindComponent)) return false;
        final KeybindComponent other = (KeybindComponent) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        if (!super.equals(o)) return false;
        final java.lang.Object this$keybind = this.getKeybind();
        final java.lang.Object other$keybind = other.getKeybind();
        if (this$keybind == null ? other$keybind != null : !this$keybind.equals(other$keybind)) return false;
        return true;
    }

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

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