package p000.p001.p002.p016.p017;

import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import ar.tvplayer.core.data.db.entities.ޠ;
import ar.tvplayer.core.data.prefs.ރ;
import ar.tvplayer.core.data.repositories.ˉ;
import ar.tvplayer.core.util.CommonUtilsKt;
import p000.p001.p002.p016.C1155;
import p000.p001.p002.p016.p017.C1163;
import p025.p026.C1340;
import p025.p026.InterfaceC1327;
import p037.p089.p090.ActivityC1999;
import p138.p176.p177.p242.p246.p251.C4303;
import p402.C6549;
import p402.InterfaceC6540;
import p402.p405.InterfaceC6575;
import p402.p405.InterfaceC6578;
import p402.p405.p406.EnumC6586;
import p402.p405.p407.p408.AbstractC6597;
import p402.p405.p407.p408.InterfaceC6593;
import p402.p411.p412.InterfaceC6618;
import p402.p411.p413.C6635;
import p402.p411.p413.C6644;

/* JADX INFO: renamed from: ނ.֏.֏.ބ.ނ.ހ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
@InterfaceC6540
@InterfaceC6593(c = "ar.tvplayer.tv.reminders.ui.ReminderPopupFragment$showPopup$1", f = "ReminderPopupActivity.kt", l = {88, 93}, m = "invokeSuspend")
public final class C1168 extends AbstractC6597 implements InterfaceC6618<InterfaceC1327, InterfaceC6575<? super C6549>, Object> {

    /* JADX INFO: renamed from: އ, reason: contains not printable characters */
    public InterfaceC1327 f4242;

    /* JADX INFO: renamed from: ވ, reason: contains not printable characters */
    public Object f4243;

    /* JADX INFO: renamed from: މ, reason: contains not printable characters */
    public Object f4244;

    /* JADX INFO: renamed from: ފ, reason: contains not printable characters */
    public int f4245;

    /* JADX INFO: renamed from: ދ, reason: contains not printable characters */
    public final /* synthetic */ C1163 f4246;

    /* JADX INFO: renamed from: ނ.֏.֏.ބ.ނ.ހ$֏, reason: contains not printable characters */
    public static final class ViewOnClickListenerC1169 implements View.OnClickListener {

        /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
        public final /* synthetic */ ޠ f4248;

        public ViewOnClickListenerC1169(ޠ r2) {
            this.f4248 = r2;
        }

        @Override // android.view.View.OnClickListener
        public final void onClick(View view) {
            C1163.m2441(C1168.this.f4246, this.f4248);
        }
    }

    /* JADX INFO: renamed from: ނ.֏.֏.ބ.ނ.ހ$ؠ, reason: contains not printable characters */
    public static final class ViewOnClickListenerC1170 implements View.OnClickListener {
        public ViewOnClickListenerC1170() {
        }

        @Override // android.view.View.OnClickListener
        public final void onClick(View view) {
            C1168.this.f4246.mo1520();
        }
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C1168(C1163 c1163, InterfaceC6575 interfaceC6575) {
        super(2, interfaceC6575);
        this.f4246 = c1163;
    }

    @Override // p402.p405.p407.p408.AbstractC6589
    /* JADX INFO: renamed from: ֏ */
    public final InterfaceC6575<C6549> mo837(Object obj, InterfaceC6575<?> interfaceC6575) {
        if (interfaceC6575 == null) {
            C6635.m9824("completion");
            throw null;
        }
        C1168 c1168 = new C1168(this.f4246, interfaceC6575);
        c1168.f4242 = (InterfaceC1327) obj;
        return c1168;
    }

    @Override // p402.p411.p412.InterfaceC6618
    /* JADX INFO: renamed from: ؠ */
    public final Object mo838(InterfaceC1327 interfaceC1327, InterfaceC6575<? super C6549> interfaceC6575) {
        return ((C1168) mo837(interfaceC1327, interfaceC6575)).mo839(C6549.f19328);
    }

    @Override // p402.p405.p407.p408.AbstractC6589
    /* JADX INFO: renamed from: ށ */
    public final Object mo839(Object obj) throws Throwable {
        InterfaceC1327 interfaceC1327;
        ޠ r0;
        EnumC6586 enumC6586 = EnumC6586.COROUTINE_SUSPENDED;
        int i = this.f4245;
        if (i == 0) {
            C4303.m7198(obj);
            interfaceC1327 = this.f4242;
            long j = ((C1163.C1164) this.f4246.f4236.getValue()).f4238;
            this.f4243 = interfaceC1327;
            this.f4245 = 1;
            obj = C4303.m7018((InterfaceC6578) C1340.f4488, (InterfaceC6618) new ˉ(j, (InterfaceC6575) null), (InterfaceC6575) this);
            if (obj == enumC6586) {
                return enumC6586;
            }
        } else {
            if (i != 1) {
                if (i != 2) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                r0 = (ޠ) this.f4244;
                C4303.m7198(obj);
                ((Button) this.f4246.m2442(C1155.btnWatch)).setOnClickListener(new ViewOnClickListenerC1169(r0));
                ((Button) this.f4246.m2442(C1155.btnDismiss)).setOnClickListener(new ViewOnClickListenerC1170());
                TextView textView = (TextView) this.f4246.m2442(C1155.tvProgramTitle);
                C6635.m9823((Object) textView, "tvProgramTitle");
                textView.setSelected(true);
                return C6549.f19328;
            }
            interfaceC1327 = (InterfaceC1327) this.f4243;
            C4303.m7198(obj);
        }
        ޠ r11 = (ޠ) obj;
        if (r11 != null) {
            if (!(System.currentTimeMillis() / ((long) 1000) >= r11.ފ)) {
                C1163.m2440(this.f4246, r11);
                this.f4246.m2443(true);
                C1163 c1163 = this.f4246;
                if (c1163 == null) {
                    throw null;
                }
                C6644 c6644 = new C6644();
                int i2 = ރ.ߠ.ࢤ();
                c6644.f19403 = i2;
                if (i2 > 0) {
                    CommonUtilsKt.ؠ(c1163, new C1171(c1163, c6644, null));
                }
                this.f4243 = interfaceC1327;
                this.f4244 = r11;
                this.f4245 = 2;
                if (C4303.m7005(1500L, this) == enumC6586) {
                    return enumC6586;
                }
                r0 = r11;
                ((Button) this.f4246.m2442(C1155.btnWatch)).setOnClickListener(new ViewOnClickListenerC1169(r0));
                ((Button) this.f4246.m2442(C1155.btnDismiss)).setOnClickListener(new ViewOnClickListenerC1170());
                TextView textView2 = (TextView) this.f4246.m2442(C1155.tvProgramTitle);
                C6635.m9823((Object) textView2, "tvProgramTitle");
                textView2.setSelected(true);
                return C6549.f19328;
            }
        }
        ActivityC1999 activity = this.f4246.getActivity();
        if (activity != null) {
            activity.finish();
        }
        return C6549.f19328;
    }
}
