package p000.p001.p002.p008.p009.p010;

import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;
import androidx.leanback.widget.VerticalGridView;
import androidx.lifecycle.LiveData;
import androidx.recyclerview.widget.RecyclerView;
import ar.tvplayer.core.util.CommonUtilsKt;
import ar.tvplayer.tv.base.ui.filepicker.FilePickerActivity;
import ar.tvplayer.tv.base.ui.filepicker.LanSmbActivity;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.concurrent.CancellationException;
import kotlin.TypeCastException;
import p000.p001.p002.p008.C0911;
import p000.p001.p002.p008.C0913;
import p000.p001.p002.p008.C0915;
import p000.p001.p002.p008.p009.AbstractC0736;
import p025.p026.InterfaceC1327;
import p025.p026.InterfaceC1363;
import p037.p038.p039.AbstractC1459;
import p037.p038.p039.C1456;
import p037.p038.p039.InterfaceC1458;
import p037.p038.p039.p040.C1467;
import p037.p041.p043.p044.C1527;
import p037.p089.p090.ActivityC1999;
import p037.p091.p095.AbstractC2176;
import p037.p091.p095.C2136;
import p037.p091.p095.C2138;
import p037.p091.p095.C2141;
import p037.p091.p095.C2155;
import p037.p099.AbstractC2245;
import p037.p099.AbstractC2248;
import p037.p099.C2250;
import p037.p099.C2251;
import p037.p099.InterfaceC2219;
import p037.p099.InterfaceC2230;
import p138.p139.p143.p144.C2803;
import p138.p176.p177.p242.p246.p251.C4303;
import p402.C6549;
import p402.InterfaceC6538;
import p402.InterfaceC6540;
import p402.p403.C6560;
import p402.p403.C6563;
import p402.p405.InterfaceC6575;
import p402.p405.p406.EnumC6586;
import p402.p405.p407.p408.AbstractC6597;
import p402.p405.p407.p408.InterfaceC6593;
import p402.p411.p412.InterfaceC6603;
import p402.p411.p412.InterfaceC6618;
import p402.p411.p413.AbstractC6636;
import p402.p411.p413.C6635;
import p402.p420.C6703;

/* JADX INFO: renamed from: ނ.֏.֏.ހ.֏.ހ.֏, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
@InterfaceC6540
public final class C0754 extends AbstractC0736 {

    /* JADX INFO: renamed from: ޓ, reason: contains not printable characters */
    public String f3253;

    /* JADX INFO: renamed from: ޖ, reason: contains not printable characters */
    public boolean f3256;

    /* JADX INFO: renamed from: ޜ, reason: contains not printable characters */
    public final AbstractC1459<Intent> f3262;

    /* JADX INFO: renamed from: ސ, reason: contains not printable characters */
    public final InterfaceC6538 f3250 = C4303.m7065((InterfaceC6603) new C0756());

    /* JADX INFO: renamed from: ޑ, reason: contains not printable characters */
    public final InterfaceC6538 f3251 = C4303.m7065((InterfaceC6603) new C0762());

    /* JADX INFO: renamed from: ޒ, reason: contains not printable characters */
    public String f3252 = "";

    /* JADX INFO: renamed from: ޔ, reason: contains not printable characters */
    public ArrayList<String> f3254 = new ArrayList<>();

    /* JADX INFO: renamed from: ޕ, reason: contains not printable characters */
    public long f3255 = 100;

    /* JADX INFO: renamed from: ޗ, reason: contains not printable characters */
    public boolean f3257 = true;

    /* JADX INFO: renamed from: ޘ, reason: contains not printable characters */
    public final InterfaceC6538 f3258 = C4303.m7065((InterfaceC6603) new C0755(3, this));

    /* JADX INFO: renamed from: ޙ, reason: contains not printable characters */
    public final InterfaceC6538 f3259 = C4303.m7065((InterfaceC6603) new C0755(2, this));

    /* JADX INFO: renamed from: ޚ, reason: contains not printable characters */
    public final InterfaceC6538 f3260 = C4303.m7065((InterfaceC6603) new C0755(1, this));

    /* JADX INFO: renamed from: ޛ, reason: contains not printable characters */
    public final InterfaceC6538 f3261 = C4303.m7065((InterfaceC6603) new C0755(0, this));

    /* JADX INFO: renamed from: ނ.֏.֏.ހ.֏.ހ.֏$֏, reason: contains not printable characters */
    /* JADX INFO: compiled from: com.android.tools.r8.jetbrains.kotlin-style lambda group */
    public static final class C0755 extends AbstractC6636 implements InterfaceC6603<Drawable> {

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

        /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
        public final /* synthetic */ Object f3264;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C0755(int i, Object obj) {
            super(0);
            this.f3263 = i;
            this.f3264 = obj;
        }

        @Override // p402.p411.p412.InterfaceC6603
        /* JADX INFO: renamed from: ނ */
        public final Drawable mo1543() {
            Drawable drawableMutate;
            int i = this.f3263;
            if (i == 0) {
                Drawable drawableM3025 = C1527.m3025(((C0754) this.f3264).requireContext(), C0911.ic_file_white);
                if (drawableM3025 == null || (drawableMutate = drawableM3025.mutate()) == null) {
                    return null;
                }
                drawableMutate.setAlpha((int) 153.0d);
                return drawableMutate;
            }
            if (i == 1) {
                return C1527.m3025(((C0754) this.f3264).requireContext(), C0911.ic_folder_white);
            }
            if (i == 2) {
                return C1527.m3025(((C0754) this.f3264).requireContext(), C0911.ic_network_white);
            }
            if (i == 3) {
                return C1527.m3025(((C0754) this.f3264).requireContext(), C0911.ic_sd_white);
            }
            throw null;
        }
    }

    /* JADX INFO: renamed from: ނ.֏.֏.ހ.֏.ހ.֏$ؠ, reason: contains not printable characters */
    public static final class C0756 extends AbstractC6636 implements InterfaceC6603<FilePickerActivity.֏> {
        public C0756() {
            super(0);
        }

        @Override // p402.p411.p412.InterfaceC6603
        /* JADX INFO: renamed from: ނ */
        public FilePickerActivity.֏ mo1543() {
            FilePickerActivity activity = C0754.this.getActivity();
            if (activity != null) {
                return (FilePickerActivity.֏) activity.ޅ.getValue();
            }
            throw new TypeCastException("null cannot be cast to non-null type ar.tvplayer.tv.base.ui.filepicker.FilePickerActivity");
        }
    }

    /* JADX INFO: renamed from: ނ.֏.֏.ހ.֏.ހ.֏$ހ, reason: contains not printable characters */
    public static final class C0757 extends C2155 {
        @Override // p037.p091.p095.C2155
        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public int mo2069() {
            return C0913.item_file_picker_guidedactions;
        }
    }

    /* JADX INFO: renamed from: ނ.֏.֏.ހ.֏.ހ.֏$ށ, reason: contains not printable characters */
    public static final class C0758<T> implements InterfaceC2230<T> {
        public C0758() {
        }

        @Override // p037.p099.InterfaceC2230
        /* JADX INFO: renamed from: ֏ */
        public final void mo1576(T t) {
            C0754.m2059(C0754.this, (List) t);
        }
    }

    /* JADX INFO: renamed from: ނ.֏.֏.ހ.֏.ހ.֏$ނ, reason: contains not printable characters */
    @InterfaceC6540
    public static final class C0759 extends AbstractC2176 {

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public RecyclerView.AbstractC0224 f3267;

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public InterfaceC1363 f3268;

        /* JADX INFO: renamed from: ނ.֏.֏.ހ.֏.ހ.֏$ނ$֏, reason: contains not printable characters */
        @InterfaceC6593(c = "ar.tvplayer.tv.base.ui.filepicker.FilePickerFragment$onViewCreated$1$onChildViewHolderSelected$1$1", f = "FilePickerFragment.kt", l = {92}, m = "invokeSuspend")
        public static final class C0760 extends AbstractC6597 implements InterfaceC6618<InterfaceC1327, InterfaceC6575<? super C6549>, Object> {

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

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

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

            /* JADX INFO: renamed from: ފ, reason: contains not printable characters */
            public final /* synthetic */ TextView f3273;

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            public C0760(TextView textView, InterfaceC6575 interfaceC6575) {
                super(2, interfaceC6575);
                this.f3273 = textView;
            }

            @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;
                }
                C0760 c0760 = new C0760(this.f3273, interfaceC6575);
                c0760.f3270 = (InterfaceC1327) obj;
                return c0760;
            }

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

            @Override // p402.p405.p407.p408.AbstractC6589
            /* JADX INFO: renamed from: ށ */
            public final Object mo839(Object obj) {
                EnumC6586 enumC6586 = EnumC6586.COROUTINE_SUSPENDED;
                int i = this.f3272;
                if (i == 0) {
                    C4303.m7198(obj);
                    this.f3271 = this.f3270;
                    this.f3272 = 1;
                    if (C4303.m7005(500L, this) == enumC6586) {
                        return enumC6586;
                    }
                } else {
                    if (i != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    C4303.m7198(obj);
                }
                this.f3273.setSelected(true);
                return C6549.f19328;
            }
        }

        public C0759() {
        }

        @Override // p037.p091.p095.AbstractC2176
        /* JADX INFO: renamed from: ֏ */
        public void mo326(RecyclerView recyclerView, RecyclerView.AbstractC0224 abstractC0224, int i, int i2) {
            TextView textView;
            TextView textView2;
            C2155.C2160 c2160 = (C2155.C2160) (!(abstractC0224 instanceof C2155.C2160) ? null : abstractC0224);
            if (c2160 != null && (textView2 = c2160.f7051) != null) {
                textView2.setKeyListener(null);
                textView2.setEllipsize(TextUtils.TruncateAt.MARQUEE);
                InterfaceC1363 interfaceC1363 = this.f3268;
                if (interfaceC1363 != null) {
                    C4303.m7098(interfaceC1363, (CancellationException) null, 1, (Object) null);
                }
                this.f3268 = CommonUtilsKt.ؠ(C0754.this, new C0760(textView2, null));
            }
            RecyclerView.AbstractC0224 abstractC02242 = this.f3267;
            C2155.C2160 c21602 = (C2155.C2160) (abstractC02242 instanceof C2155.C2160 ? abstractC02242 : null);
            if (c21602 != null && (textView = c21602.f7051) != null) {
                textView.setSelected(false);
            }
            this.f3267 = abstractC0224;
        }
    }

    /* JADX INFO: renamed from: ނ.֏.֏.ހ.֏.ހ.֏$ރ, reason: contains not printable characters */
    public static final class C0761<O> implements InterfaceC1458<C1456> {
        public C0761() {
        }

        @Override // p037.p038.p039.InterfaceC1458
        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public void mo2070(C1456 c1456) {
            C1456 c14562 = c1456;
            C0754 c0754 = C0754.this;
            C6635.m9823((Object) c14562, "it");
            C0754.m2060(c0754, c14562);
        }
    }

    /* JADX INFO: renamed from: ނ.֏.֏.ހ.֏.ހ.֏$ބ, reason: contains not printable characters */
    public static final class C0762 extends AbstractC6636 implements InterfaceC6603<C0769> {
        public C0762() {
            super(0);
        }

        /* JADX WARN: Multi-variable type inference failed */
        @Override // p402.p411.p412.InterfaceC6603
        /* JADX INFO: renamed from: ނ */
        public C0769 mo1543() {
            C0754 c0754 = C0754.this;
            C0766 c0766 = new C0766(this);
            C2251 viewModelStore = c0754.getViewModelStore();
            String canonicalName = C0769.class.getCanonicalName();
            if (canonicalName == null) {
                throw new IllegalArgumentException("Local and anonymous classes can not be ViewModels");
            }
            String strM4879 = C2803.m4879("androidx.lifecycle.ViewModelProvider.DefaultKey:", canonicalName);
            AbstractC2245 abstractC2245Mo4300 = viewModelStore.f7211.get(strM4879);
            if (!C0769.class.isInstance(abstractC2245Mo4300)) {
                abstractC2245Mo4300 = c0766 instanceof AbstractC2248 ? ((AbstractC2248) c0766).mo4300(strM4879, C0769.class) : c0766.mo1666(C0769.class);
                AbstractC2245 abstractC2245Put = viewModelStore.f7211.put(strM4879, abstractC2245Mo4300);
                if (abstractC2245Put != null) {
                    abstractC2245Put.mo2103();
                }
            } else if (c0766 instanceof C2250) {
                ((C2250) c0766).mo4301(abstractC2245Mo4300);
            }
            C6635.m9823((Object) abstractC2245Mo4300, "ViewModelProvider(this, …ctory).get(T::class.java)");
            return (C0769) abstractC2245Mo4300;
        }
    }

    public C0754() {
        AbstractC1459<Intent> abstractC1459RegisterForActivityResult = registerForActivityResult(new C1467(), new C0761());
        C6635.m9823((Object) abstractC1459RegisterForActivityResult, "registerForActivityResul…ssSetupLanSmbResult(it) }");
        this.f3262 = abstractC1459RegisterForActivityResult;
    }

    /* JADX WARN: Removed duplicated region for block: B:79:0x01bb  */
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static final /* synthetic */ void m2059(C0754 c0754, List list) {
        int size;
        if (c0754 == null) {
            throw null;
        }
        List<C0767> list2 = list != null ? list : C6563.f19343;
        boolean z = true;
        if (list2.size() == 1 && !c0754.m2066().ކ) {
            if ((c0754.f3252.length() == 0) && c0754.f3254.isEmpty()) {
                c0754.f3252 = ((C0767) list2.get(0)).f3280;
                C2136 c2136 = c0754.f6809;
                C6635.m9823((Object) c2136, "guidanceStylist");
                TextView textView = c2136.f6963;
                C6635.m9823((Object) textView, "guidanceStylist.titleView");
                textView.setText(c0754.m2067());
                c0754.m2064(c0754.f3252);
                return;
            }
        }
        c0754.f3256 = false;
        ArrayList arrayList = new ArrayList();
        String str = c0754.f3252;
        int i = 0;
        for (int i2 = 0; i2 < str.length(); i2++) {
            if (str.charAt(i2) == '/') {
                i++;
            }
        }
        if (i > 1) {
            C2138.C2139 c2139 = new C2138.C2139(c0754.getContext());
            long j = c0754.f3255;
            c0754.f3255 = j + 1;
            c2139.f6984 = j;
            c2139.f6987 = (Drawable) c0754.f3260.getValue();
            c2139.f6985 = "..";
            arrayList.add(c2139.m4183());
        }
        if (!list2.isEmpty()) {
            size = 0;
            for (C0767 c0767 : list2) {
                Drawable drawable = c0767.f3282 ? CommonUtilsKt.ރ(c0767.f3280) ? (Drawable) c0754.f3259.getValue() : (Drawable) c0754.f3258.getValue() : c0767.f3281 ? (Drawable) c0754.f3260.getValue() : (Drawable) c0754.f3261.getValue();
                C2138.C2139 c21392 = new C2138.C2139(c0754.getContext());
                long j2 = c0754.f3255;
                c0754.f3255 = j2 + 1;
                c21392.f6984 = j2;
                c21392.f6987 = drawable;
                c21392.f6985 = c0767.f3279;
                arrayList.add(c21392.m4183());
                if (C6635.m9825((Object) c0767.f3280, (Object) c0754.f3253)) {
                    size = arrayList.size() - 1;
                }
            }
        } else {
            C2138.C2139 c21393 = new C2138.C2139(c0754.getContext());
            long j3 = c0754.f3255;
            c0754.f3255 = 1 + j3;
            c21393.f6984 = j3;
            c21393.m4187(c0754.m2066().ބ ? C0915.file_picker_no_folders : C0915.file_picker_no_files);
            c21393.m4190(false);
            arrayList.add(c21393.m4183());
            size = 0;
        }
        if (c0754.m2066().ކ) {
            if (c0754.f3252.length() == 0) {
                C2138.C2139 c21394 = new C2138.C2139(c0754.getContext());
                c21394.f6984 = 99L;
                c21394.m4187(C0915.file_picker_setup_lan_smb);
                arrayList.add(c21394.m4183());
            }
        }
        c0754.f6816 = arrayList;
        C2141 c2141 = c0754.f6812;
        if (c2141 != null) {
            c2141.m4195(arrayList);
        }
        C2155 c2155 = c0754.f6810;
        C6635.m9823((Object) c2155, "guidedActionsStylist");
        VerticalGridView verticalGridView = c2155.f7022;
        verticalGridView.setSelectedPosition(size);
        if (c0754.f3257) {
            c0754.f3257 = false;
            verticalGridView.postDelayed(new RunnableC0765(verticalGridView), 100L);
        }
        if (list == null) {
            z = false;
        } else if (!(c0754.f3252.length() > 0) || (CommonUtilsKt.ރ(c0754.f3252) && c0754.m2068().m2072(c0754.f3252))) {
        }
        c0754.m2032(0L, z);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static final /* synthetic */ void m2060(C0754 c0754, C1456 c1456) {
        if (c0754 == null) {
            throw null;
        }
        if (c1456.f4646 == -1) {
            c0754.m2064(c0754.f3252);
        }
    }

    @Override // p037.p091.p092.C2084, androidx.fragment.app.Fragment
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        if (bundle != null) {
            String string = bundle.getString("current_folder_path");
            if (string == null) {
                C6635.m9822();
                throw null;
            }
            this.f3252 = string;
            this.f3253 = bundle.getString("folder_path_to_select");
            ArrayList<String> stringArrayList = bundle.getStringArrayList("folder_path_history");
            if (stringArrayList != null) {
                this.f3254 = stringArrayList;
            } else {
                C6635.m9822();
                throw null;
            }
        }
    }

    @Override // p000.p001.p002.p008.p009.AbstractC0736, p037.p091.p092.C2084, androidx.fragment.app.Fragment
    public /* synthetic */ void onDestroyView() {
        super.onDestroyView();
    }

    @Override // p037.p091.p092.C2084, androidx.fragment.app.Fragment
    public void onSaveInstanceState(Bundle bundle) {
        if (bundle == null) {
            C6635.m9824("outState");
            throw null;
        }
        super.onSaveInstanceState(bundle);
        bundle.putString("current_folder_path", this.f3252);
        bundle.putString("folder_path_to_select", this.f3253);
        bundle.putStringArrayList("folder_path_history", this.f3254);
    }

    @Override // p000.p001.p002.p008.p009.AbstractC0736, androidx.fragment.app.Fragment
    public void onViewCreated(View view, Bundle bundle) {
        if (view == null) {
            C6635.m9824("view");
            throw null;
        }
        super.onViewCreated(view, bundle);
        C2136 c2136 = this.f6809;
        C6635.m9823((Object) c2136, "guidanceStylist");
        TextView textView = c2136.f6963;
        C6635.m9823((Object) textView, "guidanceStylist.titleView");
        textView.setMaxLines(3);
        C2155 c2155 = this.f6810;
        C6635.m9823((Object) c2155, "guidedActionsStylist");
        c2155.f7022.setOnChildViewHolderSelectedListener(new C0759());
        LiveData<List<C0767>> liveData = m2068().f3285;
        InterfaceC2219 viewLifecycleOwner = getViewLifecycleOwner();
        C6635.m9823((Object) viewLifecycleOwner, "viewLifecycleOwner");
        liveData.mo342(viewLifecycleOwner, new C0758());
    }

    @Override // p037.p091.p092.C2084
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public C2136.C2137 mo2061(Bundle bundle) {
        return new C2136.C2137(m2067(), m2066().ރ, null, C1527.m3025(requireContext(), C0911.ic_folder_white));
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m2062(String str) {
        ActivityC1999 activity = getActivity();
        if (activity != null) {
            activity.setResult(-1, new Intent().setData(Uri.parse(str)));
            activity.finish();
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m2063(String str, boolean z) {
        int iNextIndex;
        if (this.f3256) {
            return;
        }
        this.f3256 = true;
        ArrayList<String> arrayList = this.f3254;
        ListIterator<String> listIterator = arrayList.listIterator(arrayList.size());
        while (true) {
            if (!listIterator.hasPrevious()) {
                iNextIndex = -1;
                break;
            } else if (C6635.m9825((Object) listIterator.previous(), (Object) str)) {
                iNextIndex = listIterator.nextIndex();
                break;
            }
        }
        if (iNextIndex == -1) {
            this.f3254.add(this.f3252);
        } else {
            C6635.m9823((Object) this.f3254.remove(iNextIndex), "folderPathHistory.removeAt(folderPathIndex)");
        }
        this.f3253 = z ? this.f3252 : null;
        this.f3252 = str;
        C2136 c2136 = this.f6809;
        C6635.m9823((Object) c2136, "guidanceStylist");
        TextView textView = c2136.f6963;
        C6635.m9823((Object) textView, "guidanceStylist.titleView");
        textView.setText(m2067());
        m2064(str);
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final void m2064(String str) {
        m2068().m2071(str, m2066().ބ, m2066().ޅ, m2066().ކ);
    }

    @Override // p037.p091.p092.C2084
    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public void mo2065(List<C2138> list, Bundle bundle) {
        if (list == null) {
            C6635.m9824("actions");
            throw null;
        }
        if (m2066().ބ) {
            C2138.C2139 c2139 = new C2138.C2139(getContext());
            c2139.f6984 = 0L;
            c2139.m4187(C0915.select);
            C2803.m4894(c2139, "GuidedAction.Builder(con…                 .build()", list);
        }
        C2138.C2139 c21392 = new C2138.C2139(getContext());
        c21392.f6984 = 1L;
        c21392.m4187(C0915.cancel);
        C2803.m4894(c21392, "GuidedAction.Builder(con…\n                .build()", list);
    }

    @Override // p000.p001.p002.p008.p009.AbstractC0736, p037.p091.p092.C2084
    /* JADX INFO: renamed from: ؠ */
    public void mo2033(C2138 c2138) {
        List<C0767> listM339;
        if (c2138 == null) {
            C6635.m9824("action");
            throw null;
        }
        long j = c2138.f6867;
        if (j < 100) {
            if (j == 99) {
                this.f3262.mo96(new Intent(getContext(), (Class<?>) LanSmbActivity.class), null);
                return;
            } else if (j == 0) {
                m2062(this.f3252);
                return;
            } else {
                super.mo2033(c2138);
                return;
            }
        }
        if (C6635.m9825((Object) c2138.f6869, (Object) "..")) {
            m2063(m2068().m2072(this.f3252) ? "" : C6703.m9902(this.f3252, '/', (String) null, 2), true);
            return;
        }
        int iIndexOf = this.f6816.indexOf(c2138);
        if (iIndexOf == -1 || (listM339 = m2068().f3285.m339()) == null) {
            return;
        }
        C6635.m9823((Object) listM339, "viewModel.itemsLiveData.value ?: return");
        if (!(this.f3252.length() == 0)) {
            iIndexOf--;
        }
        C0767 c0767 = (C0767) C6560.m9773(listM339, iIndexOf);
        if (c0767 != null) {
            if (c0767.f3281) {
                m2063(c0767.f3280, false);
            } else {
                m2062(c0767.f3280);
            }
        }
    }

    @Override // p000.p001.p002.p008.p009.AbstractC0736, p037.p091.p092.C2084
    /* JADX INFO: renamed from: މ */
    public C2155 mo2036() {
        return new C0757();
    }

    @Override // p000.p001.p002.p008.p009.AbstractC0736
    /* JADX INFO: renamed from: ދ */
    public void mo2037() {
    }

    /* JADX INFO: renamed from: ޑ, reason: contains not printable characters */
    public final FilePickerActivity.֏ m2066() {
        return (FilePickerActivity.֏) this.f3250.getValue();
    }

    /* JADX INFO: renamed from: ޒ, reason: contains not printable characters */
    public final String m2067() {
        Object next;
        if (this.f3252.length() == 0) {
            String string = getString(C0915.file_picker_storage);
            C6635.m9823((Object) string, "getString(R.string.file_picker_storage)");
            return string;
        }
        C0769 c0769M2068 = m2068();
        String str = this.f3252;
        if (str == null) {
            C6635.m9824("folderPath");
            throw null;
        }
        Iterator<T> it = c0769M2068.f3286.iterator();
        while (true) {
            if (!it.hasNext()) {
                next = null;
                break;
            }
            next = it.next();
            if (C6635.m9825((Object) ((C0767) next).f3280, (Object) str)) {
                break;
            }
        }
        C0767 c0767 = (C0767) next;
        String str2 = c0767 != null ? c0767.f3279 : null;
        return str2 != null ? str2 : C6703.m9866(this.f3252, '/', (String) null, 2);
    }

    /* JADX INFO: renamed from: ޓ, reason: contains not printable characters */
    public final C0769 m2068() {
        return (C0769) this.f3251.getValue();
    }
}
