Rabbit-R1/switch port/java/sources/androidx/compose/foundation/FocusableElement.java
2024-05-21 17:08:36 -04:00

55 lines
3.4 KiB
Java

package androidx.compose.foundation;
import androidx.compose.foundation.interaction.MutableInteractionSource;
import androidx.compose.ui.node.ModifierNodeElement;
import androidx.compose.ui.platform.InspectorInfo;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
/* compiled from: Focusable.kt */
@Metadata(d1 = {"\u00006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\b\u0002\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001B\u000f\u0012\b\u0010\u0003\u001a\u0004\u0018\u00010\u0004¢\u0006\u0002\u0010\u0005J\b\u0010\u0006\u001a\u00020\u0002H\u0016J\u0013\u0010\u0007\u001a\u00020\b2\b\u0010\t\u001a\u0004\u0018\u00010\nH\u0096\u0002J\b\u0010\u000b\u001a\u00020\fH\u0016J\u0010\u0010\r\u001a\u00020\u000e2\u0006\u0010\u000f\u001a\u00020\u0002H\u0016J\f\u0010\u0010\u001a\u00020\u000e*\u00020\u0011H\u0016R\u0010\u0010\u0003\u001a\u0004\u0018\u00010\u0004X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u0012"}, d2 = {"Landroidx/compose/foundation/FocusableElement;", "Landroidx/compose/ui/node/ModifierNodeElement;", "Landroidx/compose/foundation/FocusableNode;", "interactionSource", "Landroidx/compose/foundation/interaction/MutableInteractionSource;", "(Landroidx/compose/foundation/interaction/MutableInteractionSource;)V", "create", "equals", "", "other", "", "hashCode", "", "update", "", "node", "inspectableProperties", "Landroidx/compose/ui/platform/InspectorInfo;", "foundation_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
final class FocusableElement extends ModifierNodeElement<FocusableNode> {
private final MutableInteractionSource interactionSource;
public FocusableElement(MutableInteractionSource mutableInteractionSource) {
this.interactionSource = mutableInteractionSource;
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // androidx.compose.ui.node.ModifierNodeElement
public FocusableNode create() {
return new FocusableNode(this.interactionSource);
}
@Override // androidx.compose.ui.node.ModifierNodeElement
public void update(FocusableNode node) {
Intrinsics.checkNotNullParameter(node, "node");
node.update(this.interactionSource);
}
@Override // androidx.compose.ui.node.ModifierNodeElement
public boolean equals(Object other) {
if (this == other) {
return true;
}
return (other instanceof FocusableElement) && Intrinsics.areEqual(this.interactionSource, ((FocusableElement) other).interactionSource);
}
@Override // androidx.compose.ui.node.ModifierNodeElement
public int hashCode() {
MutableInteractionSource mutableInteractionSource = this.interactionSource;
if (mutableInteractionSource != null) {
return mutableInteractionSource.hashCode();
}
return 0;
}
@Override // androidx.compose.ui.node.ModifierNodeElement
public void inspectableProperties(InspectorInfo inspectorInfo) {
Intrinsics.checkNotNullParameter(inspectorInfo, "<this>");
inspectorInfo.setName("focusable");
inspectorInfo.getProperties().set("enabled", true);
inspectorInfo.getProperties().set("interactionSource", this.interactionSource);
}
}