package com.vinfast.companion.corecompose.compose;

/* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
/* JADX INFO: loaded from: E:\ios\vf_dex\classes15.dex */
@kotlin.Metadata(d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0002\u001a:\u0010\u0007\u001a\u00020\u00032\b\b\u0002\u0010\u0001\u001a\u00020\u00002\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00030\u00022\u0011\u0010\u0006\u001a\r\u0012\u0004\u0012\u00020\u00030\u0002¢\u0006\u0002\b\u0005H\u0007¢\u0006\u0004\b\u0007\u0010\b¨\u0006\u000b²\u0006\u000e\u0010\n\u001a\u00020\t8\n@\nX\u008a\u008e\u0002"}, d2 = {"Landroidx/compose/ui/Modifier;", "modifier", "Lkotlin/Function0;", "", "onRefresh", "Landroidx/compose/runtime/Composable;", "content", "e", "(Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V", "", "isRefreshing", "core-compose_release"}, k = 2, mv = {2, 2, 0}, xi = 48)
@kotlin.jvm.internal.SourceDebugExtension
public final class PullToRefreshKt {
    public static final void e(androidx.compose.ui.Modifier modifier, final kotlin.jvm.functions.Function0 function0, final kotlin.jvm.functions.Function2 function2, androidx.compose.runtime.Composer composer, final int i, final int i2) {
        androidx.compose.ui.Modifier modifier2;
        int i3;
        final androidx.compose.ui.Modifier modifier3;
        kotlin.jvm.internal.Intrinsics.l(function0, "onRefresh");
        kotlin.jvm.internal.Intrinsics.l(function2, "content");
        androidx.compose.runtime.Composer composerB = composer.B(1393758863);
        int i4 = i2 & 1;
        if (i4 != 0) {
            i3 = i | 6;
            modifier2 = modifier;
        } else if ((i & 6) == 0) {
            modifier2 = modifier;
            i3 = (composerB.s(modifier2) ? 4 : 2) | i;
        } else {
            modifier2 = modifier;
            i3 = i;
        }
        if ((i & 48) == 0) {
            i3 |= composerB.P(function0) ? 32 : 16;
        }
        if ((i & 384) == 0) {
            i3 |= composerB.P(function2) ? 256 : 128;
        }
        int i5 = i3;
        if (composerB.f((i5 & 147) != 146, i5 & 1)) {
            androidx.compose.ui.Modifier modifier4 = i4 != 0 ? androidx.compose.ui.Modifier.c0 : modifier2;
            if (androidx.compose.runtime.ComposerKt.m()) {
                androidx.compose.runtime.ComposerKt.q(1393758863, i5, -1, "com.vinfast.companion.corecompose.compose.PullToRefresh (PullToRefresh.kt:51)");
            }
            java.lang.Object objN = composerB.N();
            androidx.compose.runtime.Composer.Companion companion = androidx.compose.runtime.Composer.a;
            if (objN == companion.a()) {
                objN = androidx.compose.runtime.SnapshotStateKt.j(java.lang.Boolean.FALSE, (androidx.compose.runtime.SnapshotMutationPolicy) null, 2, (java.lang.Object) null);
                composerB.H(objN);
            }
            final androidx.compose.runtime.MutableState mutableState = (androidx.compose.runtime.MutableState) objN;
            boolean z = false;
            final androidx.compose.material3.pulltorefresh.PullToRefreshState pullToRefreshStateX = androidx.compose.material3.pulltorefresh.PullToRefreshKt.x(composerB, 0);
            java.lang.Object objN2 = composerB.N();
            if (objN2 == companion.a()) {
                objN2 = androidx.compose.runtime.EffectsKt.k(kotlin.coroutines.EmptyCoroutineContext.a, composerB);
                composerB.H(objN2);
            }
            final kotlinx.coroutines.CoroutineScope coroutineScope = (kotlinx.coroutines.CoroutineScope) objN2;
            boolean zF = f(mutableState);
            if ((i5 & 112) == 32) {
                z = true;
            }
            boolean zP = z | composerB.P(coroutineScope);
            java.lang.Object objN3 = composerB.N();
            if (zP || objN3 == companion.a()) {
                final long j = 1332;
                kotlin.jvm.functions.Function0 function1 = new kotlin.jvm.functions.Function0() { // from class: com.vinfast.companion.corecompose.compose.s0
                    public final java.lang.Object invoke() {
                        return com.vinfast.companion.corecompose.compose.PullToRefreshKt.h(function0, coroutineScope, mutableState, j);
                    }
                };
                composerB.H(function1);
                objN3 = function1;
            }
            androidx.compose.material3.pulltorefresh.PullToRefreshKt.n(zF, (kotlin.jvm.functions.Function0) objN3, modifier4, pullToRefreshStateX, (androidx.compose.ui.Alignment) null, androidx.compose.runtime.internal.ComposableLambdaKt.e(-2107478808, true, new kotlin.jvm.functions.Function3() { // from class: com.vinfast.companion.corecompose.compose.t0
                public final java.lang.Object invoke(java.lang.Object obj, java.lang.Object obj2, java.lang.Object obj3) {
                    return com.vinfast.companion.corecompose.compose.PullToRefreshKt.i(pullToRefreshStateX, mutableState, (androidx.compose.foundation.layout.BoxScope) obj, (androidx.compose.runtime.Composer) obj2, ((java.lang.Integer) obj3).intValue());
                }
            }, composerB, 54), androidx.compose.runtime.internal.ComposableLambdaKt.e(1484892649, true, new kotlin.jvm.functions.Function3() { // from class: com.vinfast.companion.corecompose.compose.u0
                public final java.lang.Object invoke(java.lang.Object obj, java.lang.Object obj2, java.lang.Object obj3) {
                    return com.vinfast.companion.corecompose.compose.PullToRefreshKt.j(function2, (androidx.compose.foundation.layout.BoxScope) obj, (androidx.compose.runtime.Composer) obj2, ((java.lang.Integer) obj3).intValue());
                }
            }, composerB, 54), composerB, ((i5 << 6) & 896) | 1769472, 16);
            if (androidx.compose.runtime.ComposerKt.m()) {
                androidx.compose.runtime.ComposerKt.p();
            }
            modifier3 = modifier4;
        } else {
            composerB.n();
            modifier3 = modifier2;
        }
        androidx.compose.runtime.ScopeUpdateScope scopeUpdateScopeD = composerB.D();
        if (scopeUpdateScopeD != null) {
            scopeUpdateScopeD.a(new kotlin.jvm.functions.Function2() { // from class: com.vinfast.companion.corecompose.compose.v0
                public final java.lang.Object invoke(java.lang.Object obj, java.lang.Object obj2) {
                    return com.vinfast.companion.corecompose.compose.PullToRefreshKt.k(modifier3, function0, function2, i, i2, (androidx.compose.runtime.Composer) obj, ((java.lang.Integer) obj2).intValue());
                }
            });
        }
    }

    private static final boolean f(androidx.compose.runtime.MutableState mutableState) {
        return ((java.lang.Boolean) mutableState.getValue()).booleanValue();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void g(androidx.compose.runtime.MutableState mutableState, boolean z) {
        mutableState.setValue(java.lang.Boolean.valueOf(z));
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final kotlin.Unit h(kotlin.jvm.functions.Function0 function0, kotlinx.coroutines.CoroutineScope coroutineScope, androidx.compose.runtime.MutableState mutableState, long j) {
        g(mutableState, true);
        function0.invoke();
        kotlinx.coroutines.BuildersKt.d(coroutineScope, (kotlin.coroutines.CoroutineContext) null, (kotlinx.coroutines.CoroutineStart) null, new com.vinfast.companion.corecompose.compose.PullToRefreshKt$PullToRefresh$1$1$1(j, mutableState, null), 3, (java.lang.Object) null);
        return kotlin.Unit.a;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final kotlin.Unit i(androidx.compose.material3.pulltorefresh.PullToRefreshState pullToRefreshState, androidx.compose.runtime.MutableState mutableState, androidx.compose.foundation.layout.BoxScope boxScope, androidx.compose.runtime.Composer composer, int i) {
        int i2;
        kotlin.jvm.internal.Intrinsics.l(boxScope, "$this$PullToRefreshBox");
        if ((i & 6) == 0) {
            i2 = i | (composer.s(boxScope) ? 4 : 2);
        } else {
            i2 = i;
        }
        if (composer.f((i2 & 19) != 18, i2 & 1)) {
            if (androidx.compose.runtime.ComposerKt.m()) {
                androidx.compose.runtime.ComposerKt.q(-2107478808, i2, -1, "com.vinfast.companion.corecompose.compose.PullToRefresh.<anonymous> (PullToRefresh.kt:63)");
            }
            androidx.compose.material3.pulltorefresh.PullToRefreshDefaults.a.g(pullToRefreshState, f(mutableState), boxScope.g(androidx.compose.ui.Modifier.c0, androidx.compose.ui.Alignment.a.m()), androidx.compose.ui.graphics.Color.b.i(), com.vinfast.companion.corecompose.ui.theme.ColorSchemeKt.a(com.vinfast.companion.corecompose.R.attr.colorAccent, composer, 0), androidx.compose.ui.unit.Dp.g(50), composer, 199680 | (androidx.compose.material3.pulltorefresh.PullToRefreshDefaults.h << 18), 0);
            if (androidx.compose.runtime.ComposerKt.m()) {
                androidx.compose.runtime.ComposerKt.p();
            }
        } else {
            composer.n();
        }
        return kotlin.Unit.a;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final kotlin.Unit j(kotlin.jvm.functions.Function2 function2, androidx.compose.foundation.layout.BoxScope boxScope, androidx.compose.runtime.Composer composer, int i) {
        kotlin.jvm.internal.Intrinsics.l(boxScope, "$this$PullToRefreshBox");
        if (composer.f((i & 17) != 16, i & 1)) {
            if (androidx.compose.runtime.ComposerKt.m()) {
                androidx.compose.runtime.ComposerKt.q(1484892649, i, -1, "com.vinfast.companion.corecompose.compose.PullToRefresh.<anonymous> (PullToRefresh.kt:83)");
            }
            function2.invoke(composer, 0);
            if (androidx.compose.runtime.ComposerKt.m()) {
                androidx.compose.runtime.ComposerKt.p();
            }
        } else {
            composer.n();
        }
        return kotlin.Unit.a;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final kotlin.Unit k(androidx.compose.ui.Modifier modifier, kotlin.jvm.functions.Function0 function0, kotlin.jvm.functions.Function2 function2, int i, int i2, androidx.compose.runtime.Composer composer, int i3) {
        e(modifier, function0, function2, composer, androidx.compose.runtime.RecomposeScopeImplKt.a(i | 1), i2);
        return kotlin.Unit.a;
    }
}
