AndroidSwitchManagerDelegate.smali

.class public Lcom/facebook/react/viewmanagers/AndroidSwitchManagerDelegate;
.super Lcom/facebook/react/uimanager/BaseViewManagerDelegate;
.source "SourceFile"


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "<T:",
        "Landroid/view/View;",
        "U::",
        "Lcom/facebook/react/uimanager/BaseViewManagerInterface<",
        "TT;>;:",
        "Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface<",
        "TT;>;>",
        "Lcom/facebook/react/uimanager/BaseViewManagerDelegate<",
        "TT;TU;>;"
    }
.end annotation


# direct methods
.method public constructor <init>(Lcom/facebook/react/uimanager/BaseViewManagerInterface;)V
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TU;)V"
        }
    .end annotation

    invoke-direct {p0, p1}, Lcom/facebook/react/uimanager/BaseViewManagerDelegate;-><init>(Lcom/facebook/react/uimanager/BaseViewManagerInterface;)V

    return-void
.end method


# virtual methods
.method public receiveCommand(Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface;Landroid/view/View;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
    .registers 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface<",
            "TT;>;TT;",
            "Ljava/lang/String;",
            "Lcom/facebook/react/bridge/ReadableArray;",
            ")V"
        }
    .end annotation

    .line 1
    invoke-static {p3}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    const-string v0, "setNativeValue"

    invoke-virtual {p3, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p3

    if-nez p3, :cond_c

    goto :goto_14

    :cond_c
    const/4 p3, 0x0

    .line 2
    invoke-interface {p4, p3}, Lcom/facebook/react/bridge/ReadableArray;->getBoolean(I)Z

    move-result p3

    invoke-interface {p1, p2, p3}, Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface;->setNativeValue(Landroid/view/View;Z)V

    :goto_14
    return-void
.end method

.method public setProperty(Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
    .registers 8
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TT;",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ")V"
        }
    .end annotation

    .line 1
    invoke-static {p2}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    invoke-virtual {p2}, Ljava/lang/String;->hashCode()I

    move-result v0

    const/4 v1, 0x1

    const/4 v2, 0x0

    const/4 v3, -0x1

    sparse-switch v0, :sswitch_data_114

    goto/16 :goto_75

    :sswitch_f
    const-string v0, "trackColorForTrue"

    invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_19

    goto/16 :goto_75

    :cond_19
    const/16 v3, 0x8

    goto/16 :goto_75

    :sswitch_1d
    const-string v0, "thumbTintColor"

    invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_26

    goto :goto_75

    :cond_26
    const/4 v3, 0x7

    goto :goto_75

    :sswitch_28
    const-string v0, "trackColorForFalse"

    invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_31

    goto :goto_75

    :cond_31
    const/4 v3, 0x6

    goto :goto_75

    :sswitch_33
    const-string v0, "disabled"

    invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_3c

    goto :goto_75

    :cond_3c
    const/4 v3, 0x5

    goto :goto_75

    :sswitch_3e
    const-string/jumbo v0, "value"

    invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_48

    goto :goto_75

    :cond_48
    const/4 v3, 0x4

    goto :goto_75

    :sswitch_4a
    const-string v0, "on"

    invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_53

    goto :goto_75

    :cond_53
    const/4 v3, 0x3

    goto :goto_75

    :sswitch_55
    const-string v0, "trackTintColor"

    invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_5e

    goto :goto_75

    :cond_5e
    const/4 v3, 0x2

    goto :goto_75

    :sswitch_60
    const-string v0, "enabled"

    invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_69

    goto :goto_75

    :cond_69
    const/4 v3, 0x1

    goto :goto_75

    :sswitch_6b
    const-string v0, "thumbColor"

    invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_74

    goto :goto_75

    :cond_74
    const/4 v3, 0x0

    :goto_75
    packed-switch v3, :pswitch_data_13a

    .line 2
    invoke-super {p0, p1, p2, p3}, Lcom/facebook/react/uimanager/BaseViewManagerDelegate;->setProperty(Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V

    goto/16 :goto_112

    .line 3
    :pswitch_7d
    iget-object p2, p0, Lcom/facebook/react/uimanager/BaseViewManagerDelegate;->mViewManager:Lcom/facebook/react/uimanager/BaseViewManagerInterface;

    check-cast p2, Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface;

    invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {p3, v0}, Lcom/facebook/react/bridge/ColorPropConverter;->getColor(Ljava/lang/Object;Landroid/content/Context;)Ljava/lang/Integer;

    move-result-object p3

    invoke-interface {p2, p1, p3}, Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface;->setTrackColorForTrue(Landroid/view/View;Ljava/lang/Integer;)V

    goto/16 :goto_112

    .line 4
    :pswitch_8e
    iget-object p2, p0, Lcom/facebook/react/uimanager/BaseViewManagerDelegate;->mViewManager:Lcom/facebook/react/uimanager/BaseViewManagerInterface;

    check-cast p2, Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface;

    invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {p3, v0}, Lcom/facebook/react/bridge/ColorPropConverter;->getColor(Ljava/lang/Object;Landroid/content/Context;)Ljava/lang/Integer;

    move-result-object p3

    invoke-interface {p2, p1, p3}, Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface;->setThumbTintColor(Landroid/view/View;Ljava/lang/Integer;)V

    goto/16 :goto_112

    .line 5
    :pswitch_9f
    iget-object p2, p0, Lcom/facebook/react/uimanager/BaseViewManagerDelegate;->mViewManager:Lcom/facebook/react/uimanager/BaseViewManagerInterface;

    check-cast p2, Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface;

    invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {p3, v0}, Lcom/facebook/react/bridge/ColorPropConverter;->getColor(Ljava/lang/Object;Landroid/content/Context;)Ljava/lang/Integer;

    move-result-object p3

    invoke-interface {p2, p1, p3}, Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface;->setTrackColorForFalse(Landroid/view/View;Ljava/lang/Integer;)V

    goto :goto_112

    .line 6
    :pswitch_af
    iget-object p2, p0, Lcom/facebook/react/uimanager/BaseViewManagerDelegate;->mViewManager:Lcom/facebook/react/uimanager/BaseViewManagerInterface;

    check-cast p2, Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface;

    if-nez p3, :cond_b6

    goto :goto_bc

    :cond_b6
    check-cast p3, Ljava/lang/Boolean;

    invoke-virtual {p3}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v2

    :goto_bc
    invoke-interface {p2, p1, v2}, Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface;->setDisabled(Landroid/view/View;Z)V

    goto :goto_112

    .line 7
    :pswitch_c0
    iget-object p2, p0, Lcom/facebook/react/uimanager/BaseViewManagerDelegate;->mViewManager:Lcom/facebook/react/uimanager/BaseViewManagerInterface;

    check-cast p2, Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface;

    if-nez p3, :cond_c7

    goto :goto_cd

    :cond_c7
    check-cast p3, Ljava/lang/Boolean;

    invoke-virtual {p3}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v2

    :goto_cd
    invoke-interface {p2, p1, v2}, Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface;->setValue(Landroid/view/View;Z)V

    goto :goto_112

    .line 8
    :pswitch_d1
    iget-object p2, p0, Lcom/facebook/react/uimanager/BaseViewManagerDelegate;->mViewManager:Lcom/facebook/react/uimanager/BaseViewManagerInterface;

    check-cast p2, Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface;

    if-nez p3, :cond_d8

    goto :goto_de

    :cond_d8
    check-cast p3, Ljava/lang/Boolean;

    invoke-virtual {p3}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v2

    :goto_de
    invoke-interface {p2, p1, v2}, Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface;->setOn(Landroid/view/View;Z)V

    goto :goto_112

    .line 9
    :pswitch_e2
    iget-object p2, p0, Lcom/facebook/react/uimanager/BaseViewManagerDelegate;->mViewManager:Lcom/facebook/react/uimanager/BaseViewManagerInterface;

    check-cast p2, Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface;

    invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {p3, v0}, Lcom/facebook/react/bridge/ColorPropConverter;->getColor(Ljava/lang/Object;Landroid/content/Context;)Ljava/lang/Integer;

    move-result-object p3

    invoke-interface {p2, p1, p3}, Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface;->setTrackTintColor(Landroid/view/View;Ljava/lang/Integer;)V

    goto :goto_112

    .line 10
    :pswitch_f2
    iget-object p2, p0, Lcom/facebook/react/uimanager/BaseViewManagerDelegate;->mViewManager:Lcom/facebook/react/uimanager/BaseViewManagerInterface;

    check-cast p2, Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface;

    if-nez p3, :cond_f9

    goto :goto_ff

    :cond_f9
    check-cast p3, Ljava/lang/Boolean;

    invoke-virtual {p3}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v1

    :goto_ff
    invoke-interface {p2, p1, v1}, Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface;->setEnabled(Landroid/view/View;Z)V

    goto :goto_112

    .line 11
    :pswitch_103
    iget-object p2, p0, Lcom/facebook/react/uimanager/BaseViewManagerDelegate;->mViewManager:Lcom/facebook/react/uimanager/BaseViewManagerInterface;

    check-cast p2, Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface;

    invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {p3, v0}, Lcom/facebook/react/bridge/ColorPropConverter;->getColor(Ljava/lang/Object;Landroid/content/Context;)Ljava/lang/Integer;

    move-result-object p3

    invoke-interface {p2, p1, p3}, Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface;->setThumbColor(Landroid/view/View;Ljava/lang/Integer;)V

    :goto_112
    return-void

    nop

    :sswitch_data_114
    .sparse-switch
        -0x67dbbcd3 -> :sswitch_6b
        -0x5ff074bf -> :sswitch_60
        -0x1120fbe3 -> :sswitch_55
        0xddf -> :sswitch_4a
        0x6ac9171 -> :sswitch_3e
        0x10263a7c -> :sswitch_33
        0x40a6a2d2 -> :sswitch_28
        0x71fbaff2 -> :sswitch_1d
        0x7dfb79ff -> :sswitch_f
    .end sparse-switch

    :pswitch_data_13a
    .packed-switch 0x0
        :pswitch_103
        :pswitch_f2
        :pswitch_e2
        :pswitch_d1
        :pswitch_c0
        :pswitch_af
        :pswitch_9f
        :pswitch_8e
        :pswitch_7d
    .end packed-switch
.end method