package ඓ.ᨨ.K;

import android.app.Activity;
import android.content.Intent;
import androidx.fragment.app.Fragment;
import com.zhihu.matisse.MimeType;
import com.zhihu.matisse.R$style;
import com.zhihu.matisse.ui.MatisseActivity;
import java.lang.ref.WeakReference;
import java.util.Set;
import ඓ.ᨨ.K.ʬ.K.C0765;
import ඓ.ᨨ.K.ඓ.K.C0778;

/* renamed from: ඓ.ᨨ.K.ῲ  reason: contains not printable characters */
/* compiled from: SelectionCreator */
public final class C0804 {

    /* renamed from: ῲ  reason: contains not printable characters */
    public final C0778 f4006;

    /* renamed from: K  reason: contains not printable characters */
    public final C0805 f4007;

    public C0804(C0805 k, Set<MimeType> set, boolean z) {
        this.f4007 = k;
        C0778 r5 = C0778.C0779.f3967;
        r5.f3956 = null;
        r5.f3954 = true;
        r5.f3944 = false;
        r5.f3963 = R$style.Matisse_Zhihu;
        r5.f3949 = 0;
        r5.f3961 = false;
        r5.f3955 = 1;
        r5.f3964 = 0;
        r5.f3953 = 0;
        r5.f3960 = null;
        r5.f3952 = false;
        r5.f3957 = null;
        r5.f3966 = 3;
        r5.f3945 = 0;
        r5.f3958 = 0.5f;
        r5.f3947 = new C0765();
        r5.f3951 = true;
        r5.f3948 = false;
        r5.f3965 = false;
        r5.f3946 = Integer.MAX_VALUE;
        r5.f3950 = true;
        this.f4006 = r5;
        C0778 r52 = this.f4006;
        r52.f3956 = set;
        r52.f3954 = z;
        r52.f3949 = -1;
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public C0804 m2392(int i) {
        if (i >= 1) {
            C0778 r0 = this.f4006;
            if (r0.f3964 > 0 || r0.f3953 > 0) {
                throw new IllegalStateException("already set maxImageSelectable and maxVideoSelectable");
            }
            r0.f3955 = i;
            return this;
        }
        throw new IllegalArgumentException("maxSelectable must be greater than or equal to one");
    }

    /* renamed from: K  reason: contains not printable characters */
    public C0804 m2393(float f) {
        if (f <= 0.0f || f > 1.0f) {
            throw new IllegalArgumentException("Thumbnail scale must be between (0.0, 1.0]");
        }
        this.f4006.f3958 = f;
        return this;
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m2394(int i) {
        Activity activity = this.f4007.f4009.get();
        if (activity != null) {
            Intent intent = new Intent(activity, MatisseActivity.class);
            WeakReference<Fragment> weakReference = this.f4007.f4008;
            Fragment fragment = weakReference != null ? weakReference.get() : null;
            if (fragment != null) {
                fragment.startActivityForResult(intent, i);
            } else {
                activity.startActivityForResult(intent, i);
            }
        }
    }
}
