package coil;

import A4.d;
import E3.v;
import J4.c;
import K1.b;
import V4.AbstractC0786y;
import a0.C0932r0;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import coil.ComponentRegistry;
import coil.EventListener;
import coil.ImageLoader;
import coil.decode.ExifOrientationPolicy;
import coil.disk.DiskCache;
import coil.memory.MemoryCache;
import coil.request.CachePolicy;
import coil.request.DefaultRequestOptions;
import coil.request.Disposable;
import coil.request.ImageRequest;
import coil.size.Precision;
import coil.transition.CrossfadeTransition;
import coil.transition.Transition;
import coil.util.Contexts;
import coil.util.ImageLoaderOptions;
import coil.util.Logger;
import coil.util.Requests;
import coil.util.SingletonDiskCache;
import coil.util.Utils;
import m1.g;
import okhttp3.Call;
import okhttp3.OkHttpClient;
import w4.InterfaceC3141c;
import w4.f;
import w4.h;

/* JADX INFO: loaded from: classes.dex */
public interface ImageLoader {

    public static final class Builder {
        private final Context applicationContext;
        private h callFactory;
        private ComponentRegistry componentRegistry;
        private DefaultRequestOptions defaults;
        private h diskCache;
        private EventListener.Factory eventListenerFactory;
        private Logger logger;
        private h memoryCache;
        private ImageLoaderOptions options;

        public Builder(Context context) {
            this.applicationContext = context.getApplicationContext();
            this.defaults = Requests.getDEFAULT_REQUEST_OPTIONS();
            this.memoryCache = null;
            this.diskCache = null;
            this.callFactory = null;
            this.eventListenerFactory = null;
            this.componentRegistry = null;
            this.options = new ImageLoaderOptions(false, false, false, 0, null, 31, null);
            this.logger = null;
        }

        /* JADX INFO: Access modifiers changed from: private */
        public static final MemoryCache build$lambda$33(Builder builder) {
            return new MemoryCache.Builder(builder.applicationContext).build();
        }

        /* JADX INFO: Access modifiers changed from: private */
        public static final DiskCache build$lambda$34(Builder builder) {
            return SingletonDiskCache.INSTANCE.get(builder.applicationContext);
        }

        /* JADX INFO: Access modifiers changed from: private */
        public static final OkHttpClient build$lambda$35() {
            return new OkHttpClient();
        }

        /* JADX INFO: Access modifiers changed from: private */
        public static final EventListener eventListener$lambda$15(EventListener eventListener, ImageRequest imageRequest) {
            return eventListener;
        }

        public final Builder addLastModifiedToFileCacheKey(boolean z6) {
            this.options = ImageLoaderOptions.copy$default(this.options, z6, false, false, 0, null, 30, null);
            return this;
        }

        public final Builder allowHardware(boolean z6) {
            DefaultRequestOptions defaultRequestOptions = this.defaults;
            this.defaults = defaultRequestOptions.copy((32639 & 1) != 0 ? defaultRequestOptions.interceptorDispatcher : null, (32639 & 2) != 0 ? defaultRequestOptions.fetcherDispatcher : null, (32639 & 4) != 0 ? defaultRequestOptions.decoderDispatcher : null, (32639 & 8) != 0 ? defaultRequestOptions.transformationDispatcher : null, (32639 & 16) != 0 ? defaultRequestOptions.transitionFactory : null, (32639 & 32) != 0 ? defaultRequestOptions.precision : null, (32639 & 64) != 0 ? defaultRequestOptions.bitmapConfig : null, (32639 & 128) != 0 ? defaultRequestOptions.allowHardware : z6, (32639 & 256) != 0 ? defaultRequestOptions.allowRgb565 : false, (32639 & 512) != 0 ? defaultRequestOptions.placeholder : null, (32639 & 1024) != 0 ? defaultRequestOptions.error : null, (32639 & 2048) != 0 ? defaultRequestOptions.fallback : null, (32639 & 4096) != 0 ? defaultRequestOptions.memoryCachePolicy : null, (32639 & 8192) != 0 ? defaultRequestOptions.diskCachePolicy : null, (32639 & 16384) != 0 ? defaultRequestOptions.networkCachePolicy : null);
            return this;
        }

        public final Builder allowRgb565(boolean z6) {
            DefaultRequestOptions defaultRequestOptions = this.defaults;
            this.defaults = defaultRequestOptions.copy((32639 & 1) != 0 ? defaultRequestOptions.interceptorDispatcher : null, (32639 & 2) != 0 ? defaultRequestOptions.fetcherDispatcher : null, (32639 & 4) != 0 ? defaultRequestOptions.decoderDispatcher : null, (32639 & 8) != 0 ? defaultRequestOptions.transformationDispatcher : null, (32639 & 16) != 0 ? defaultRequestOptions.transitionFactory : null, (32639 & 32) != 0 ? defaultRequestOptions.precision : null, (32639 & 64) != 0 ? defaultRequestOptions.bitmapConfig : null, (32639 & 128) != 0 ? defaultRequestOptions.allowHardware : false, (32639 & 256) != 0 ? defaultRequestOptions.allowRgb565 : z6, (32639 & 512) != 0 ? defaultRequestOptions.placeholder : null, (32639 & 1024) != 0 ? defaultRequestOptions.error : null, (32639 & 2048) != 0 ? defaultRequestOptions.fallback : null, (32639 & 4096) != 0 ? defaultRequestOptions.memoryCachePolicy : null, (32639 & 8192) != 0 ? defaultRequestOptions.diskCachePolicy : null, (32639 & 16384) != 0 ? defaultRequestOptions.networkCachePolicy : null);
            return this;
        }

        @InterfaceC3141c
        public final Builder availableMemoryPercentage(double d6) {
            Utils.unsupported();
            throw new v();
        }

        public final Builder bitmapConfig(Bitmap.Config config) {
            DefaultRequestOptions defaultRequestOptions = this.defaults;
            this.defaults = defaultRequestOptions.copy((32639 & 1) != 0 ? defaultRequestOptions.interceptorDispatcher : null, (32639 & 2) != 0 ? defaultRequestOptions.fetcherDispatcher : null, (32639 & 4) != 0 ? defaultRequestOptions.decoderDispatcher : null, (32639 & 8) != 0 ? defaultRequestOptions.transformationDispatcher : null, (32639 & 16) != 0 ? defaultRequestOptions.transitionFactory : null, (32639 & 32) != 0 ? defaultRequestOptions.precision : null, (32639 & 64) != 0 ? defaultRequestOptions.bitmapConfig : config, (32639 & 128) != 0 ? defaultRequestOptions.allowHardware : false, (32639 & 256) != 0 ? defaultRequestOptions.allowRgb565 : false, (32639 & 512) != 0 ? defaultRequestOptions.placeholder : null, (32639 & 1024) != 0 ? defaultRequestOptions.error : null, (32639 & 2048) != 0 ? defaultRequestOptions.fallback : null, (32639 & 4096) != 0 ? defaultRequestOptions.memoryCachePolicy : null, (32639 & 8192) != 0 ? defaultRequestOptions.diskCachePolicy : null, (32639 & 16384) != 0 ? defaultRequestOptions.networkCachePolicy : null);
            return this;
        }

        public final Builder bitmapFactoryExifOrientationPolicy(ExifOrientationPolicy exifOrientationPolicy) {
            this.options = ImageLoaderOptions.copy$default(this.options, false, false, false, 0, exifOrientationPolicy, 15, null);
            return this;
        }

        public final Builder bitmapFactoryMaxParallelism(int i6) {
            if (i6 <= 0) {
                throw new IllegalArgumentException("maxParallelism must be > 0.");
            }
            this.options = ImageLoaderOptions.copy$default(this.options, false, false, false, i6, null, 23, null);
            return this;
        }

        public final ImageLoader build() {
            Context context = this.applicationContext;
            DefaultRequestOptions defaultRequestOptions = this.defaults;
            h hVarK = this.memoryCache;
            if (hVarK == null) {
                final int i6 = 0;
                hVarK = g.k(new J4.a(this) { // from class: coil.a

                    /* JADX INFO: renamed from: b, reason: collision with root package name */
                    public final /* synthetic */ ImageLoader.Builder f13487b;

                    {
                        this.f13487b = this;
                    }

                    @Override // J4.a
                    public final Object invoke() {
                        switch (i6) {
                            case 0:
                                return ImageLoader.Builder.build$lambda$33(this.f13487b);
                            default:
                                return ImageLoader.Builder.build$lambda$34(this.f13487b);
                        }
                    }
                });
            }
            h hVarK2 = this.diskCache;
            if (hVarK2 == null) {
                final int i7 = 1;
                hVarK2 = g.k(new J4.a(this) { // from class: coil.a

                    /* JADX INFO: renamed from: b, reason: collision with root package name */
                    public final /* synthetic */ ImageLoader.Builder f13487b;

                    {
                        this.f13487b = this;
                    }

                    @Override // J4.a
                    public final Object invoke() {
                        switch (i7) {
                            case 0:
                                return ImageLoader.Builder.build$lambda$33(this.f13487b);
                            default:
                                return ImageLoader.Builder.build$lambda$34(this.f13487b);
                        }
                    }
                });
            }
            h hVarK3 = this.callFactory;
            if (hVarK3 == null) {
                hVarK3 = g.k(new C0932r0(21));
            }
            EventListener.Factory factory = this.eventListenerFactory;
            if (factory == null) {
                factory = EventListener.Factory.NONE;
            }
            ComponentRegistry componentRegistry = this.componentRegistry;
            if (componentRegistry == null) {
                componentRegistry = new ComponentRegistry();
            }
            return new RealImageLoader(context, defaultRequestOptions, hVarK, hVarK2, hVarK3, factory, componentRegistry, this.options, this.logger);
        }

        public final Builder callFactory(Call.Factory factory) {
            this.callFactory = new f(factory);
            return this;
        }

        @InterfaceC3141c
        public final Builder componentRegistry(c cVar) {
            Utils.unsupported();
            throw new v();
        }

        public final /* synthetic */ Builder components(c cVar) {
            ComponentRegistry.Builder builder = new ComponentRegistry.Builder();
            cVar.invoke(builder);
            return components(builder.build());
        }

        public final Builder crossfade(boolean z6) {
            return crossfade(z6 ? 100 : 0);
        }

        public final Builder decoderDispatcher(AbstractC0786y abstractC0786y) {
            DefaultRequestOptions defaultRequestOptions = this.defaults;
            this.defaults = defaultRequestOptions.copy((32639 & 1) != 0 ? defaultRequestOptions.interceptorDispatcher : null, (32639 & 2) != 0 ? defaultRequestOptions.fetcherDispatcher : null, (32639 & 4) != 0 ? defaultRequestOptions.decoderDispatcher : abstractC0786y, (32639 & 8) != 0 ? defaultRequestOptions.transformationDispatcher : null, (32639 & 16) != 0 ? defaultRequestOptions.transitionFactory : null, (32639 & 32) != 0 ? defaultRequestOptions.precision : null, (32639 & 64) != 0 ? defaultRequestOptions.bitmapConfig : null, (32639 & 128) != 0 ? defaultRequestOptions.allowHardware : false, (32639 & 256) != 0 ? defaultRequestOptions.allowRgb565 : false, (32639 & 512) != 0 ? defaultRequestOptions.placeholder : null, (32639 & 1024) != 0 ? defaultRequestOptions.error : null, (32639 & 2048) != 0 ? defaultRequestOptions.fallback : null, (32639 & 4096) != 0 ? defaultRequestOptions.memoryCachePolicy : null, (32639 & 8192) != 0 ? defaultRequestOptions.diskCachePolicy : null, (32639 & 16384) != 0 ? defaultRequestOptions.networkCachePolicy : null);
            return this;
        }

        public final Builder diskCache(DiskCache diskCache) {
            this.diskCache = new f(diskCache);
            return this;
        }

        public final Builder diskCachePolicy(CachePolicy cachePolicy) {
            DefaultRequestOptions defaultRequestOptions = this.defaults;
            this.defaults = defaultRequestOptions.copy((32639 & 1) != 0 ? defaultRequestOptions.interceptorDispatcher : null, (32639 & 2) != 0 ? defaultRequestOptions.fetcherDispatcher : null, (32639 & 4) != 0 ? defaultRequestOptions.decoderDispatcher : null, (32639 & 8) != 0 ? defaultRequestOptions.transformationDispatcher : null, (32639 & 16) != 0 ? defaultRequestOptions.transitionFactory : null, (32639 & 32) != 0 ? defaultRequestOptions.precision : null, (32639 & 64) != 0 ? defaultRequestOptions.bitmapConfig : null, (32639 & 128) != 0 ? defaultRequestOptions.allowHardware : false, (32639 & 256) != 0 ? defaultRequestOptions.allowRgb565 : false, (32639 & 512) != 0 ? defaultRequestOptions.placeholder : null, (32639 & 1024) != 0 ? defaultRequestOptions.error : null, (32639 & 2048) != 0 ? defaultRequestOptions.fallback : null, (32639 & 4096) != 0 ? defaultRequestOptions.memoryCachePolicy : null, (32639 & 8192) != 0 ? defaultRequestOptions.diskCachePolicy : cachePolicy, (32639 & 16384) != 0 ? defaultRequestOptions.networkCachePolicy : null);
            return this;
        }

        public final Builder dispatcher(AbstractC0786y abstractC0786y) {
            DefaultRequestOptions defaultRequestOptions = this.defaults;
            this.defaults = defaultRequestOptions.copy((32639 & 1) != 0 ? defaultRequestOptions.interceptorDispatcher : null, (32639 & 2) != 0 ? defaultRequestOptions.fetcherDispatcher : abstractC0786y, (32639 & 4) != 0 ? defaultRequestOptions.decoderDispatcher : abstractC0786y, (32639 & 8) != 0 ? defaultRequestOptions.transformationDispatcher : abstractC0786y, (32639 & 16) != 0 ? defaultRequestOptions.transitionFactory : null, (32639 & 32) != 0 ? defaultRequestOptions.precision : null, (32639 & 64) != 0 ? defaultRequestOptions.bitmapConfig : null, (32639 & 128) != 0 ? defaultRequestOptions.allowHardware : false, (32639 & 256) != 0 ? defaultRequestOptions.allowRgb565 : false, (32639 & 512) != 0 ? defaultRequestOptions.placeholder : null, (32639 & 1024) != 0 ? defaultRequestOptions.error : null, (32639 & 2048) != 0 ? defaultRequestOptions.fallback : null, (32639 & 4096) != 0 ? defaultRequestOptions.memoryCachePolicy : null, (32639 & 8192) != 0 ? defaultRequestOptions.diskCachePolicy : null, (32639 & 16384) != 0 ? defaultRequestOptions.networkCachePolicy : null);
            return this;
        }

        public final Builder error(int i6) {
            return error(Contexts.getDrawableCompat(this.applicationContext, i6));
        }

        public final Builder eventListener(EventListener eventListener) {
            return eventListenerFactory(new b(eventListener, 14));
        }

        public final Builder eventListenerFactory(EventListener.Factory factory) {
            this.eventListenerFactory = factory;
            return this;
        }

        public final Builder fallback(int i6) {
            return fallback(Contexts.getDrawableCompat(this.applicationContext, i6));
        }

        public final Builder fetcherDispatcher(AbstractC0786y abstractC0786y) {
            DefaultRequestOptions defaultRequestOptions = this.defaults;
            this.defaults = defaultRequestOptions.copy((32639 & 1) != 0 ? defaultRequestOptions.interceptorDispatcher : null, (32639 & 2) != 0 ? defaultRequestOptions.fetcherDispatcher : abstractC0786y, (32639 & 4) != 0 ? defaultRequestOptions.decoderDispatcher : null, (32639 & 8) != 0 ? defaultRequestOptions.transformationDispatcher : null, (32639 & 16) != 0 ? defaultRequestOptions.transitionFactory : null, (32639 & 32) != 0 ? defaultRequestOptions.precision : null, (32639 & 64) != 0 ? defaultRequestOptions.bitmapConfig : null, (32639 & 128) != 0 ? defaultRequestOptions.allowHardware : false, (32639 & 256) != 0 ? defaultRequestOptions.allowRgb565 : false, (32639 & 512) != 0 ? defaultRequestOptions.placeholder : null, (32639 & 1024) != 0 ? defaultRequestOptions.error : null, (32639 & 2048) != 0 ? defaultRequestOptions.fallback : null, (32639 & 4096) != 0 ? defaultRequestOptions.memoryCachePolicy : null, (32639 & 8192) != 0 ? defaultRequestOptions.diskCachePolicy : null, (32639 & 16384) != 0 ? defaultRequestOptions.networkCachePolicy : null);
            return this;
        }

        public final Builder interceptorDispatcher(AbstractC0786y abstractC0786y) {
            DefaultRequestOptions defaultRequestOptions = this.defaults;
            this.defaults = defaultRequestOptions.copy((32639 & 1) != 0 ? defaultRequestOptions.interceptorDispatcher : abstractC0786y, (32639 & 2) != 0 ? defaultRequestOptions.fetcherDispatcher : null, (32639 & 4) != 0 ? defaultRequestOptions.decoderDispatcher : null, (32639 & 8) != 0 ? defaultRequestOptions.transformationDispatcher : null, (32639 & 16) != 0 ? defaultRequestOptions.transitionFactory : null, (32639 & 32) != 0 ? defaultRequestOptions.precision : null, (32639 & 64) != 0 ? defaultRequestOptions.bitmapConfig : null, (32639 & 128) != 0 ? defaultRequestOptions.allowHardware : false, (32639 & 256) != 0 ? defaultRequestOptions.allowRgb565 : false, (32639 & 512) != 0 ? defaultRequestOptions.placeholder : null, (32639 & 1024) != 0 ? defaultRequestOptions.error : null, (32639 & 2048) != 0 ? defaultRequestOptions.fallback : null, (32639 & 4096) != 0 ? defaultRequestOptions.memoryCachePolicy : null, (32639 & 8192) != 0 ? defaultRequestOptions.diskCachePolicy : null, (32639 & 16384) != 0 ? defaultRequestOptions.networkCachePolicy : null);
            return this;
        }

        @InterfaceC3141c
        public final Builder launchInterceptorChainOnMainThread(boolean z6) {
            Utils.unsupported();
            throw new v();
        }

        public final Builder logger(Logger logger) {
            this.logger = logger;
            return this;
        }

        public final Builder memoryCache(MemoryCache memoryCache) {
            this.memoryCache = new f(memoryCache);
            return this;
        }

        public final Builder memoryCachePolicy(CachePolicy cachePolicy) {
            DefaultRequestOptions defaultRequestOptions = this.defaults;
            this.defaults = defaultRequestOptions.copy((32639 & 1) != 0 ? defaultRequestOptions.interceptorDispatcher : null, (32639 & 2) != 0 ? defaultRequestOptions.fetcherDispatcher : null, (32639 & 4) != 0 ? defaultRequestOptions.decoderDispatcher : null, (32639 & 8) != 0 ? defaultRequestOptions.transformationDispatcher : null, (32639 & 16) != 0 ? defaultRequestOptions.transitionFactory : null, (32639 & 32) != 0 ? defaultRequestOptions.precision : null, (32639 & 64) != 0 ? defaultRequestOptions.bitmapConfig : null, (32639 & 128) != 0 ? defaultRequestOptions.allowHardware : false, (32639 & 256) != 0 ? defaultRequestOptions.allowRgb565 : false, (32639 & 512) != 0 ? defaultRequestOptions.placeholder : null, (32639 & 1024) != 0 ? defaultRequestOptions.error : null, (32639 & 2048) != 0 ? defaultRequestOptions.fallback : null, (32639 & 4096) != 0 ? defaultRequestOptions.memoryCachePolicy : cachePolicy, (32639 & 8192) != 0 ? defaultRequestOptions.diskCachePolicy : null, (32639 & 16384) != 0 ? defaultRequestOptions.networkCachePolicy : null);
            return this;
        }

        public final Builder networkCachePolicy(CachePolicy cachePolicy) {
            DefaultRequestOptions defaultRequestOptions = this.defaults;
            this.defaults = defaultRequestOptions.copy((32639 & 1) != 0 ? defaultRequestOptions.interceptorDispatcher : null, (32639 & 2) != 0 ? defaultRequestOptions.fetcherDispatcher : null, (32639 & 4) != 0 ? defaultRequestOptions.decoderDispatcher : null, (32639 & 8) != 0 ? defaultRequestOptions.transformationDispatcher : null, (32639 & 16) != 0 ? defaultRequestOptions.transitionFactory : null, (32639 & 32) != 0 ? defaultRequestOptions.precision : null, (32639 & 64) != 0 ? defaultRequestOptions.bitmapConfig : null, (32639 & 128) != 0 ? defaultRequestOptions.allowHardware : false, (32639 & 256) != 0 ? defaultRequestOptions.allowRgb565 : false, (32639 & 512) != 0 ? defaultRequestOptions.placeholder : null, (32639 & 1024) != 0 ? defaultRequestOptions.error : null, (32639 & 2048) != 0 ? defaultRequestOptions.fallback : null, (32639 & 4096) != 0 ? defaultRequestOptions.memoryCachePolicy : null, (32639 & 8192) != 0 ? defaultRequestOptions.diskCachePolicy : null, (32639 & 16384) != 0 ? defaultRequestOptions.networkCachePolicy : cachePolicy);
            return this;
        }

        public final Builder networkObserverEnabled(boolean z6) {
            this.options = ImageLoaderOptions.copy$default(this.options, false, z6, false, 0, null, 29, null);
            return this;
        }

        public final Builder okHttpClient(OkHttpClient okHttpClient) {
            return callFactory(okHttpClient);
        }

        public final Builder placeholder(int i6) {
            return placeholder(Contexts.getDrawableCompat(this.applicationContext, i6));
        }

        public final Builder precision(Precision precision) {
            DefaultRequestOptions defaultRequestOptions = this.defaults;
            this.defaults = defaultRequestOptions.copy((32639 & 1) != 0 ? defaultRequestOptions.interceptorDispatcher : null, (32639 & 2) != 0 ? defaultRequestOptions.fetcherDispatcher : null, (32639 & 4) != 0 ? defaultRequestOptions.decoderDispatcher : null, (32639 & 8) != 0 ? defaultRequestOptions.transformationDispatcher : null, (32639 & 16) != 0 ? defaultRequestOptions.transitionFactory : null, (32639 & 32) != 0 ? defaultRequestOptions.precision : precision, (32639 & 64) != 0 ? defaultRequestOptions.bitmapConfig : null, (32639 & 128) != 0 ? defaultRequestOptions.allowHardware : false, (32639 & 256) != 0 ? defaultRequestOptions.allowRgb565 : false, (32639 & 512) != 0 ? defaultRequestOptions.placeholder : null, (32639 & 1024) != 0 ? defaultRequestOptions.error : null, (32639 & 2048) != 0 ? defaultRequestOptions.fallback : null, (32639 & 4096) != 0 ? defaultRequestOptions.memoryCachePolicy : null, (32639 & 8192) != 0 ? defaultRequestOptions.diskCachePolicy : null, (32639 & 16384) != 0 ? defaultRequestOptions.networkCachePolicy : null);
            return this;
        }

        public final Builder respectCacheHeaders(boolean z6) {
            this.options = ImageLoaderOptions.copy$default(this.options, false, false, z6, 0, null, 27, null);
            return this;
        }

        @InterfaceC3141c
        public final Builder trackWeakReferences(boolean z6) {
            Utils.unsupported();
            throw new v();
        }

        public final Builder transformationDispatcher(AbstractC0786y abstractC0786y) {
            DefaultRequestOptions defaultRequestOptions = this.defaults;
            this.defaults = defaultRequestOptions.copy((32639 & 1) != 0 ? defaultRequestOptions.interceptorDispatcher : null, (32639 & 2) != 0 ? defaultRequestOptions.fetcherDispatcher : null, (32639 & 4) != 0 ? defaultRequestOptions.decoderDispatcher : null, (32639 & 8) != 0 ? defaultRequestOptions.transformationDispatcher : abstractC0786y, (32639 & 16) != 0 ? defaultRequestOptions.transitionFactory : null, (32639 & 32) != 0 ? defaultRequestOptions.precision : null, (32639 & 64) != 0 ? defaultRequestOptions.bitmapConfig : null, (32639 & 128) != 0 ? defaultRequestOptions.allowHardware : false, (32639 & 256) != 0 ? defaultRequestOptions.allowRgb565 : false, (32639 & 512) != 0 ? defaultRequestOptions.placeholder : null, (32639 & 1024) != 0 ? defaultRequestOptions.error : null, (32639 & 2048) != 0 ? defaultRequestOptions.fallback : null, (32639 & 4096) != 0 ? defaultRequestOptions.memoryCachePolicy : null, (32639 & 8192) != 0 ? defaultRequestOptions.diskCachePolicy : null, (32639 & 16384) != 0 ? defaultRequestOptions.networkCachePolicy : null);
            return this;
        }

        @InterfaceC3141c
        public final Builder transition(Transition transition) {
            Utils.unsupported();
            throw new v();
        }

        public final Builder transitionFactory(Transition.Factory factory) {
            DefaultRequestOptions defaultRequestOptions = this.defaults;
            this.defaults = defaultRequestOptions.copy((32639 & 1) != 0 ? defaultRequestOptions.interceptorDispatcher : null, (32639 & 2) != 0 ? defaultRequestOptions.fetcherDispatcher : null, (32639 & 4) != 0 ? defaultRequestOptions.decoderDispatcher : null, (32639 & 8) != 0 ? defaultRequestOptions.transformationDispatcher : null, (32639 & 16) != 0 ? defaultRequestOptions.transitionFactory : factory, (32639 & 32) != 0 ? defaultRequestOptions.precision : null, (32639 & 64) != 0 ? defaultRequestOptions.bitmapConfig : null, (32639 & 128) != 0 ? defaultRequestOptions.allowHardware : false, (32639 & 256) != 0 ? defaultRequestOptions.allowRgb565 : false, (32639 & 512) != 0 ? defaultRequestOptions.placeholder : null, (32639 & 1024) != 0 ? defaultRequestOptions.error : null, (32639 & 2048) != 0 ? defaultRequestOptions.fallback : null, (32639 & 4096) != 0 ? defaultRequestOptions.memoryCachePolicy : null, (32639 & 8192) != 0 ? defaultRequestOptions.diskCachePolicy : null, (32639 & 16384) != 0 ? defaultRequestOptions.networkCachePolicy : null);
            return this;
        }

        public final Builder components(ComponentRegistry componentRegistry) {
            this.componentRegistry = componentRegistry;
            return this;
        }

        public final Builder crossfade(int i6) {
            Transition.Factory factory;
            if (i6 > 0) {
                factory = new CrossfadeTransition.Factory(i6, false, 2, null);
            } else {
                factory = Transition.Factory.NONE;
            }
            transitionFactory(factory);
            return this;
        }

        public final Builder error(Drawable drawable) {
            DefaultRequestOptions defaultRequestOptions = this.defaults;
            this.defaults = defaultRequestOptions.copy((32639 & 1) != 0 ? defaultRequestOptions.interceptorDispatcher : null, (32639 & 2) != 0 ? defaultRequestOptions.fetcherDispatcher : null, (32639 & 4) != 0 ? defaultRequestOptions.decoderDispatcher : null, (32639 & 8) != 0 ? defaultRequestOptions.transformationDispatcher : null, (32639 & 16) != 0 ? defaultRequestOptions.transitionFactory : null, (32639 & 32) != 0 ? defaultRequestOptions.precision : null, (32639 & 64) != 0 ? defaultRequestOptions.bitmapConfig : null, (32639 & 128) != 0 ? defaultRequestOptions.allowHardware : false, (32639 & 256) != 0 ? defaultRequestOptions.allowRgb565 : false, (32639 & 512) != 0 ? defaultRequestOptions.placeholder : null, (32639 & 1024) != 0 ? defaultRequestOptions.error : drawable != null ? drawable.mutate() : null, (32639 & 2048) != 0 ? defaultRequestOptions.fallback : null, (32639 & 4096) != 0 ? defaultRequestOptions.memoryCachePolicy : null, (32639 & 8192) != 0 ? defaultRequestOptions.diskCachePolicy : null, (32639 & 16384) != 0 ? defaultRequestOptions.networkCachePolicy : null);
            return this;
        }

        public final Builder fallback(Drawable drawable) {
            DefaultRequestOptions defaultRequestOptions = this.defaults;
            this.defaults = defaultRequestOptions.copy((32639 & 1) != 0 ? defaultRequestOptions.interceptorDispatcher : null, (32639 & 2) != 0 ? defaultRequestOptions.fetcherDispatcher : null, (32639 & 4) != 0 ? defaultRequestOptions.decoderDispatcher : null, (32639 & 8) != 0 ? defaultRequestOptions.transformationDispatcher : null, (32639 & 16) != 0 ? defaultRequestOptions.transitionFactory : null, (32639 & 32) != 0 ? defaultRequestOptions.precision : null, (32639 & 64) != 0 ? defaultRequestOptions.bitmapConfig : null, (32639 & 128) != 0 ? defaultRequestOptions.allowHardware : false, (32639 & 256) != 0 ? defaultRequestOptions.allowRgb565 : false, (32639 & 512) != 0 ? defaultRequestOptions.placeholder : null, (32639 & 1024) != 0 ? defaultRequestOptions.error : null, (32639 & 2048) != 0 ? defaultRequestOptions.fallback : drawable != null ? drawable.mutate() : null, (32639 & 4096) != 0 ? defaultRequestOptions.memoryCachePolicy : null, (32639 & 8192) != 0 ? defaultRequestOptions.diskCachePolicy : null, (32639 & 16384) != 0 ? defaultRequestOptions.networkCachePolicy : null);
            return this;
        }

        public final Builder okHttpClient(J4.a aVar) {
            return callFactory(aVar);
        }

        public final Builder placeholder(Drawable drawable) {
            DefaultRequestOptions defaultRequestOptions = this.defaults;
            this.defaults = defaultRequestOptions.copy((32639 & 1) != 0 ? defaultRequestOptions.interceptorDispatcher : null, (32639 & 2) != 0 ? defaultRequestOptions.fetcherDispatcher : null, (32639 & 4) != 0 ? defaultRequestOptions.decoderDispatcher : null, (32639 & 8) != 0 ? defaultRequestOptions.transformationDispatcher : null, (32639 & 16) != 0 ? defaultRequestOptions.transitionFactory : null, (32639 & 32) != 0 ? defaultRequestOptions.precision : null, (32639 & 64) != 0 ? defaultRequestOptions.bitmapConfig : null, (32639 & 128) != 0 ? defaultRequestOptions.allowHardware : false, (32639 & 256) != 0 ? defaultRequestOptions.allowRgb565 : false, (32639 & 512) != 0 ? defaultRequestOptions.placeholder : drawable != null ? drawable.mutate() : null, (32639 & 1024) != 0 ? defaultRequestOptions.error : null, (32639 & 2048) != 0 ? defaultRequestOptions.fallback : null, (32639 & 4096) != 0 ? defaultRequestOptions.memoryCachePolicy : null, (32639 & 8192) != 0 ? defaultRequestOptions.diskCachePolicy : null, (32639 & 16384) != 0 ? defaultRequestOptions.networkCachePolicy : null);
            return this;
        }

        public final Builder callFactory(J4.a aVar) {
            this.callFactory = g.k(aVar);
            return this;
        }

        public final Builder diskCache(J4.a aVar) {
            this.diskCache = g.k(aVar);
            return this;
        }

        public final Builder memoryCache(J4.a aVar) {
            this.memoryCache = g.k(aVar);
            return this;
        }

        @InterfaceC3141c
        public final Builder componentRegistry(ComponentRegistry componentRegistry) {
            Utils.unsupported();
            throw new v();
        }

        public Builder(RealImageLoader realImageLoader) {
            this.applicationContext = realImageLoader.getContext().getApplicationContext();
            this.defaults = realImageLoader.getDefaults();
            this.memoryCache = realImageLoader.getMemoryCacheLazy();
            this.diskCache = realImageLoader.getDiskCacheLazy();
            this.callFactory = realImageLoader.getCallFactoryLazy();
            this.eventListenerFactory = realImageLoader.getEventListenerFactory();
            this.componentRegistry = realImageLoader.getComponentRegistry();
            this.options = realImageLoader.getOptions();
            this.logger = realImageLoader.getLogger();
        }
    }

    Disposable enqueue(ImageRequest imageRequest);

    Object execute(ImageRequest imageRequest, d dVar);

    ComponentRegistry getComponents();

    DefaultRequestOptions getDefaults();

    DiskCache getDiskCache();

    MemoryCache getMemoryCache();

    Builder newBuilder();

    void shutdown();
}
