package M2;

import V2.L3;
import androidx.compose.runtime.MutableState;
import m3.AbstractC2467b;
import w4.C3137A;

/* JADX INFO: renamed from: M2.f1, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0509f1 extends C4.j implements J4.e {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public int f4699a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ MutableState f4700b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ String f4701c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ String f4702d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ MutableState f4703e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final /* synthetic */ MutableState f4704f;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C0509f1(MutableState mutableState, String str, String str2, MutableState mutableState2, MutableState mutableState3, A4.d dVar) {
        super(2, dVar);
        this.f4700b = mutableState;
        this.f4701c = str;
        this.f4702d = str2;
        this.f4703e = mutableState2;
        this.f4704f = mutableState3;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        return new C0509f1(this.f4700b, this.f4701c, this.f4702d, this.f4703e, this.f4704f, dVar);
    }

    @Override // J4.e
    public final Object invoke(Object obj, Object obj2) {
        return ((C0509f1) create((V4.C) obj, (A4.d) obj2)).invokeSuspend(C3137A.f25453a);
    }

    /* JADX WARN: Multi-variable type inference failed */
    @Override // C4.a
    public final Object invokeSuspend(Object obj) {
        B4.a aVar = B4.a.f492a;
        int i6 = this.f4699a;
        MutableState mutableState = this.f4700b;
        if (i6 == 0) {
            AbstractC2467b.l(obj);
            J.f fVar = B1.f4224a;
            mutableState.setValue(Boolean.TRUE);
            V4.x0 x0Var = V4.x0.f8349a;
            C0506e1 c0506e1 = new C0506e1(this.f4701c, this.f4702d, null);
            this.f4699a = 1;
            obj = V4.E.H(x0Var, c0506e1, this);
            if (obj == aVar) {
                return aVar;
            }
        } else {
            if (i6 != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            AbstractC2467b.l(obj);
        }
        Object obj2 = ((w4.n) obj).f25472a;
        J.f fVar2 = B1.f4224a;
        mutableState.setValue(Boolean.FALSE);
        if (!(obj2 instanceof w4.m)) {
            this.f4703e.setValue(null);
            MutableState mutableState2 = this.f4704f;
            mutableState2.setValue(Integer.valueOf(((Number) mutableState2.getValue()).intValue() + 1));
            a5.c cVar = K2.p.f4116a;
            K2.p.a("Add-on added successfully", (10 & 2) != 0 ? "" : "Could not resolve a playable download URL for this link.", K2.r.f4126a, (10 & 8) != 0 ? androidx.media3.common.C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS : 4000L);
        }
        Throwable thA = w4.n.a(obj2);
        if (thA != null) {
            L3 l32 = L3.f7428a;
            String strT = L3.t(thA);
            a5.c cVar2 = K2.p.f4116a;
            K2.p.a(strT, (10 & 2) != 0 ? "" : "Could not resolve a playable download URL for this link.", K2.r.f4127b, (10 & 8) != 0 ? androidx.media3.common.C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS : 4000L);
        }
        return C3137A.f25453a;
    }
}
