package com.strmr.ps.ui.mobile.settings;

import android.widget.TextView;
import com.strmr.ps.data.local.entity.RowConfigEntity;
import defpackage.ak1;
import defpackage.ck1;
import defpackage.e6a;
import defpackage.gr3;
import defpackage.m02;
import defpackage.m12;
import defpackage.o26;
import defpackage.s38;
import defpackage.sc2;
import defpackage.vx8;
import defpackage.wj0;
import defpackage.y41;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;

/* JADX INFO: loaded from: classes3.dex */
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0002\u001a\u00020\u0001*\u00020\u0000H\n¢\u0006\u0004\b\u0002\u0010\u0003"}, d2 = {"Lak1;", "Le6a;", "<anonymous>", "(Lak1;)V"}, k = 3, mv = {2, 0, 0})
@DebugMetadata(c = "com.strmr.ps.ui.mobile.settings.MobileDisplayFragment$refreshHeroSourceSummary$1", f = "MobileDisplayFragment.kt", i = {}, l = {167}, m = "invokeSuspend", n = {}, s = {})
@vx8
final class ah extends SuspendLambda implements gr3<ak1, Continuation<? super e6a>, Object> {
    public int a;
    public final /* synthetic */ MobileDisplayFragment b;
    public final /* synthetic */ TextView c;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public ah(MobileDisplayFragment mobileDisplayFragment, TextView textView, Continuation continuation) {
        super(2, continuation);
        this.b = mobileDisplayFragment;
        this.c = textView;
    }

    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    public final Continuation create(Object obj, Continuation continuation) {
        return new ah(this.b, this.c, continuation);
    }

    @Override // defpackage.gr3
    public final Object invoke(Object obj, Object obj2) {
        return ((ah) create((ak1) obj, (Continuation) obj2)).invokeSuspend(e6a.a);
    }

    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    public final Object invokeSuspend(Object obj) throws Throwable {
        String str;
        ck1 ck1Var = ck1.a;
        int i = this.a;
        MobileDisplayFragment mobileDisplayFragment = this.b;
        if (i == 0) {
            s38.b(obj);
            m12 m12Var = sc2.a;
            m02 m02Var = m02.c;
            ag agVar = new ag(mobileDisplayFragment, null);
            this.a = 1;
            obj = wj0.f(m02Var, agVar, this);
            if (obj == ck1Var) {
                return ck1Var;
            }
        } else {
            if (i != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            s38.b(obj);
        }
        Set<String> mobileHeroSourceRowIds = mobileDisplayFragment.n().getMobileHeroSourceRowIds();
        ArrayList arrayList = new ArrayList();
        for (Object obj2 : (List) obj) {
            if (mobileHeroSourceRowIds.contains(((RowConfigEntity) obj2).getId())) {
                arrayList.add(obj2);
            }
        }
        if (arrayList.isEmpty()) {
            str = "0 of 2 selected — tap to choose";
        } else {
            String strAi = y41.ai(arrayList, ", ", null, null, new o26(mobileDisplayFragment, 6), 30);
            str = arrayList.size() + " of 2 selected • " + strAi;
        }
        this.c.setText(str);
        return e6a.a;
    }
}
