package ῲ.Ԕ.K;

import androidx.fragment.app.Fragment;
import androidx.lifecycle.Lifecycle;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import ඓ.K.K.K.C1293;

/* renamed from: ῲ.Ԕ.K.䁗  reason: contains not printable characters */
/* compiled from: FragmentTransaction */
public abstract class AbstractC1558 {

    /* renamed from: ʬ  reason: contains not printable characters */
    public int f5707;

    /* renamed from: Ԕ  reason: contains not printable characters */
    public ArrayList<String> f5708;

    /* renamed from: ؿ  reason: contains not printable characters */
    public boolean f5709 = false;

    /* renamed from: ඓ  reason: contains not printable characters */
    public int f5710;

    /* renamed from: ᓣ  reason: contains not printable characters */
    public ArrayList<Runnable> f5711;

    /* renamed from: ᕣ  reason: contains not printable characters */
    public CharSequence f5712;

    /* renamed from: ᨨ  reason: contains not printable characters */
    public String f5713;

    /* renamed from: ῲ  reason: contains not printable characters */
    public int f5714;

    /* renamed from: ⁱ  reason: contains not printable characters */
    public int f5715;

    /* renamed from: K  reason: contains not printable characters */
    public ArrayList<C1559> f5716 = new ArrayList<>();

    /* renamed from: 㑃  reason: contains not printable characters */
    public int f5717;

    /* renamed from: 㗗  reason: contains not printable characters */
    public ArrayList<String> f5718;

    /* renamed from: 㳳  reason: contains not printable characters */
    public int f5719;

    /* renamed from: 㴹  reason: contains not printable characters */
    public int f5720;

    /* renamed from: 㸾  reason: contains not printable characters */
    public int f5721;

    /* renamed from: 㿎  reason: contains not printable characters */
    public boolean f5722;

    /* renamed from: 䁗  reason: contains not printable characters */
    public CharSequence f5723;

    /* renamed from: ῲ.Ԕ.K.䁗$K  reason: contains not printable characters */
    /* compiled from: FragmentTransaction */
    public static final class C1559 {

        /* renamed from: ʬ  reason: contains not printable characters */
        public int f5724;

        /* renamed from: ඓ  reason: contains not printable characters */
        public int f5725;

        /* renamed from: ῲ  reason: contains not printable characters */
        public Fragment f5726;

        /* renamed from: ⁱ  reason: contains not printable characters */
        public Lifecycle.State f5727;

        /* renamed from: K  reason: contains not printable characters */
        public int f5728;

        /* renamed from: 㴹  reason: contains not printable characters */
        public int f5729;

        /* renamed from: 㸾  reason: contains not printable characters */
        public int f5730;

        /* renamed from: 㿎  reason: contains not printable characters */
        public Lifecycle.State f5731;

        public C1559() {
        }

        public C1559(int i, Fragment fragment) {
            this.f5728 = i;
            this.f5726 = fragment;
            Lifecycle.State state = Lifecycle.State.RESUMED;
            this.f5727 = state;
            this.f5731 = state;
        }

        public C1559(int i, Fragment fragment, Lifecycle.State state) {
            this.f5728 = i;
            this.f5726 = fragment;
            this.f5727 = fragment.mMaxState;
            this.f5731 = state;
        }
    }

    /* renamed from: ʬ  reason: contains not printable characters */
    public AbstractC1558 m4087(Fragment fragment) {
        m4102(new C1559(4, fragment));
        return this;
    }

    /* renamed from: ʬ  reason: contains not printable characters */
    public abstract void m4088();

    /* renamed from: ඓ  reason: contains not printable characters */
    public AbstractC1558 m4090(Fragment fragment) {
        m4102(new C1559(5, fragment));
        return this;
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public abstract int m4091();

    /* renamed from: ῲ  reason: contains not printable characters */
    public AbstractC1558 m4092(int i, Fragment fragment) {
        return m4093(i, fragment, null);
    }

    /* renamed from: K  reason: contains not printable characters */
    public abstract int m4095();

    /* renamed from: K  reason: contains not printable characters */
    public void m4102(C1559 k) {
        this.f5716.add(k);
        k.f5724 = this.f5714;
        k.f5730 = this.f5707;
        k.f5725 = this.f5721;
        k.f5729 = this.f5710;
    }

    /* renamed from: 㸾  reason: contains not printable characters */
    public AbstractC1558 m4103(Fragment fragment) {
        m4102(new C1559(3, fragment));
        return this;
    }

    /* renamed from: 㸾  reason: contains not printable characters */
    public abstract void m4104();

    /* renamed from: ඓ  reason: contains not printable characters */
    public AbstractC1558 m4089() {
        if (!this.f5722) {
            return this;
        }
        throw new IllegalStateException("This transaction is already being added to the back stack");
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public AbstractC1558 m4093(int i, Fragment fragment, String str) {
        if (i != 0) {
            m4101(i, fragment, str, 2);
            return this;
        }
        throw new IllegalArgumentException("Must use non-zero containerViewId");
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public AbstractC1558 m4094(Fragment fragment) {
        m4102(new C1559(6, fragment));
        return this;
    }

    /* renamed from: K  reason: contains not printable characters */
    public AbstractC1558 m4100(Fragment fragment, String str) {
        m4101(0, fragment, str, 1);
        return this;
    }

    /* renamed from: K  reason: contains not printable characters */
    public AbstractC1558 m4096(int i, Fragment fragment) {
        m4101(i, fragment, null, 1);
        return this;
    }

    /* renamed from: K  reason: contains not printable characters */
    public AbstractC1558 m4097(int i, Fragment fragment, String str) {
        m4101(i, fragment, str, 1);
        return this;
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m4101(int i, Fragment fragment, String str, int i2) {
        Class<?> cls = fragment.getClass();
        int modifiers = cls.getModifiers();
        if (cls.isAnonymousClass() || !Modifier.isPublic(modifiers) || (cls.isMemberClass() && !Modifier.isStatic(modifiers))) {
            StringBuilder r5 = C1293.m3416("Fragment ");
            r5.append(cls.getCanonicalName());
            r5.append(" must be a public static class to be  properly recreated from instance state.");
            throw new IllegalStateException(r5.toString());
        }
        if (str != null) {
            String str2 = fragment.mTag;
            if (str2 == null || str.equals(str2)) {
                fragment.mTag = str;
            } else {
                throw new IllegalStateException("Can't change tag of fragment " + fragment + ": was " + fragment.mTag + " now " + str);
            }
        }
        if (i != 0) {
            if (i != -1) {
                int i3 = fragment.mFragmentId;
                if (i3 == 0 || i3 == i) {
                    fragment.mFragmentId = i;
                    fragment.mContainerId = i;
                } else {
                    throw new IllegalStateException("Can't change container ID of fragment " + fragment + ": was " + fragment.mFragmentId + " now " + i);
                }
            } else {
                throw new IllegalArgumentException("Can't add fragment " + fragment + " with tag " + str + " to container view with no id");
            }
        }
        m4102(new C1559(i2, fragment));
    }

    /* renamed from: K  reason: contains not printable characters */
    public AbstractC1558 m4098(Fragment fragment) {
        m4102(new C1559(7, fragment));
        return this;
    }

    /* renamed from: K  reason: contains not printable characters */
    public AbstractC1558 m4099(Fragment fragment, Lifecycle.State state) {
        m4102(new C1559(10, fragment, state));
        return this;
    }
}
