c.smali

.class public final Lwe/c;
.super Ljava/lang/Object;
.source "FloatViewFactory.kt"


# static fields
.field public static final a:Lwe/c;


# direct methods
.method public static constructor <clinit>()V
    .registers 1

    new-instance v0, Lwe/c;

    invoke-direct {v0}, Lwe/c;-><init>()V

    sput-object v0, Lwe/c;->a:Lwe/c;

    return-void
.end method

.method public constructor <init>()V
    .registers 1

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public final a(Landroid/content/Context;Lye/a;)Lcom/shopee/foody/driver/floatingview/FloatingViewWrapper;
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Ljava/lang/Object;",
            ">(",
            "Landroid/content/Context;",
            "Lye/a<",
            "TT;>;)",
            "Lcom/shopee/foody/driver/floatingview/FloatingViewWrapper<",
            "TT;>;"
        }
    .end annotation

    invoke-virtual {p0, p2}, Lwe/c;->a(Lye/a;)V

    invoke-virtual {p2}, Lye/a;->c()Lcom/shopee/foody/driver/floatingview/ViewType;

    move-result-object v0

    sget-object v1, Lwe/b;->$EnumSwitchMapping$0:[I

    invoke-virtual {v0}, Ljava/lang/Enum;->ordinal()I

    move-result v0

    aget v0, v1, v0

    const/4 v1, 0x1

    if-eq v0, v1, :cond_25

    const/4 v1, 0x2

    if-eq v0, v1, :cond_1a

    invoke-virtual {p0}, Lwe/c;->a()V

    const/4 p1, 0x0

    goto :goto_30

    :cond_1a
    new-instance v0, Lcom/shopee/foody/driver/floatingview/FloatingViewWrapper;

    new-instance v1, Lcom/shopee/foody/driver/floatingview/impl/SimpleNotifyFloatView;

    invoke-direct {v1, p1}, Lcom/shopee/foody/driver/floatingview/impl/SimpleNotifyFloatView;-><init>(Landroid/content/Context;)V

    invoke-direct {v0, v1, p2}, Lcom/shopee/foody/driver/floatingview/FloatingViewWrapper;-><init>(Laf/a;Lye/a;)V

    goto :goto_2f

    :cond_25
    new-instance v0, Lcom/shopee/foody/driver/floatingview/FloatingViewWrapper;

    new-instance v1, Lcom/shopee/foody/driver/im/view/ChatMsgNotifyFloatingView;

    invoke-direct {v1, p1}, Lcom/shopee/foody/driver/im/view/ChatMsgNotifyFloatingView;-><init>(Landroid/content/Context;)V

    invoke-direct {v0, v1, p2}, Lcom/shopee/foody/driver/floatingview/FloatingViewWrapper;-><init>(Laf/a;Lye/a;)V

    :goto_2f
    move-object p1, v0

    :goto_30
    return-object p1
.end method

.method public final a()V
    .registers 3

    sget-object v0, Ljd/b;->c:Ljd/b$a;

    invoke-virtual {v0}, Ljd/b$a;->b()Z

    move-result v0

    if-nez v0, :cond_9

    return-void

    :cond_9
    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string v1, "createViewWrapper failed: view type or data is not valid"

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method public final a(Lye/a;)V
    .registers 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Ljava/lang/Object;",
            ">(",
            "Lye/a<",
            "TT;>;)V"
        }
    .end annotation

    invoke-virtual {p1}, Lye/a;->c()Lcom/shopee/foody/driver/floatingview/ViewType;

    move-result-object v0

    sget-object v1, Lwe/b;->$EnumSwitchMapping$1:[I

    invoke-virtual {v0}, Ljava/lang/Enum;->ordinal()I

    move-result v0

    aget v0, v1, v0

    const/4 v1, 0x1

    if-eq v0, v1, :cond_22

    const/4 v1, 0x2

    if-eq v0, v1, :cond_16

    invoke-virtual {p0}, Lwe/c;->a()V

    goto :goto_2d

    :cond_16
    invoke-virtual {p1}, Lye/a;->a()Ljava/lang/Object;

    move-result-object p1

    instance-of p1, p1, Lze/b;

    if-nez p1, :cond_2d

    invoke-virtual {p0}, Lwe/c;->a()V

    goto :goto_2d

    :cond_22
    invoke-virtual {p1}, Lye/a;->a()Ljava/lang/Object;

    move-result-object p1

    instance-of p1, p1, Lcom/shopee/foody/driver/im/data/ChatMsgNotifyData;

    if-nez p1, :cond_2d

    invoke-virtual {p0}, Lwe/c;->a()V

    :cond_2d
    :goto_2d
    return-void
.end method