package c1;

import E3.v;
import I2.O;
import android.graphics.Paint;
import android.graphics.Shader;
import android.text.TextPaint;
import androidx.compose.runtime.SnapshotStateKt;
import androidx.compose.runtime.State;
import f1.C2024l;
import kotlin.jvm.internal.o;
import p0.AbstractC2686D;
import p0.AbstractC2711q;
import p0.C2714u;
import p0.V;
import p0.W;
import p0.Z;

/* JADX INFO: renamed from: c1.e, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C1230e extends TextPaint {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public O f13404a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public C2024l f13405b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public int f13406c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public W f13407d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public C2714u f13408e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public AbstractC2711q f13409f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public State f13410g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public o0.e f13411h;

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public r0.f f13412i;

    public final p0.O a() {
        O o6 = this.f13404a;
        if (o6 != null) {
            return o6;
        }
        O o7 = new O(this);
        this.f13404a = o7;
        return o7;
    }

    public final void b(int i6) {
        if (i6 == this.f13406c) {
            return;
        }
        ((O) a()).f(i6);
        this.f13406c = i6;
    }

    /* JADX WARN: Removed duplicated region for block: B:19:0x0038  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void c(final AbstractC2711q abstractC2711q, final long j4, float f6) {
        if (abstractC2711q == null) {
            this.f13410g = null;
            this.f13409f = null;
            this.f13411h = null;
            setShader(null);
            return;
        }
        if (abstractC2711q instanceof Z) {
            d(W.b.t0(f6, ((Z) abstractC2711q).f22898a));
            return;
        }
        if (!(abstractC2711q instanceof V)) {
            throw new v();
        }
        if (o.c(this.f13409f, abstractC2711q)) {
            o0.e eVar = this.f13411h;
            if (!(eVar == null ? false : o0.e.a(eVar.f21799a, j4))) {
            }
        } else {
            if (j4 != 9205357640488583168L) {
                this.f13409f = abstractC2711q;
                this.f13411h = new o0.e(j4);
                this.f13410g = SnapshotStateKt.derivedStateOf(new J4.a() { // from class: c1.d
                    @Override // J4.a
                    public final Object invoke() {
                        return ((V) abstractC2711q).mo746createShaderuvyYCjk(j4);
                    }
                });
            }
        }
        p0.O oA = a();
        State state = this.f13410g;
        ((O) oA).j(state != null ? (Shader) state.getValue() : null);
        this.f13408e = null;
        AbstractC1235j.c(this, f6);
    }

    public final void d(long j4) {
        C2714u c2714u = this.f13408e;
        if (c2714u == null ? false : C2714u.d(c2714u.f22947a, j4)) {
            return;
        }
        if (j4 != 16) {
            this.f13408e = new C2714u(j4);
            setColor(AbstractC2686D.I(j4));
            this.f13410g = null;
            this.f13409f = null;
            this.f13411h = null;
            setShader(null);
        }
    }

    public final void e(r0.f fVar) {
        if (fVar == null || o.c(this.f13412i, fVar)) {
            return;
        }
        this.f13412i = fVar;
        if (fVar.equals(r0.h.f23808a)) {
            setStyle(Paint.Style.FILL);
            return;
        }
        if (!(fVar instanceof r0.i)) {
            throw new v();
        }
        ((O) a()).n(1);
        r0.i iVar = (r0.i) fVar;
        ((O) a()).m(iVar.f23809a);
        ((Paint) ((O) a()).f2524b).setStrokeMiter(iVar.f23810b);
        ((O) a()).l(iVar.f23812d);
        ((O) a()).k(iVar.f23811c);
        ((Paint) ((O) a()).f2524b).setPathEffect(null);
    }

    public final void f(W w6) {
        if (w6 == null || o.c(this.f13407d, w6)) {
            return;
        }
        this.f13407d = w6;
        if (w6.equals(W.f22883d)) {
            clearShadowLayer();
            return;
        }
        W w7 = this.f13407d;
        float f6 = w7.f22886c;
        if (f6 == 0.0f) {
            f6 = Float.MIN_VALUE;
        }
        setShadowLayer(f6, Float.intBitsToFloat((int) (w7.f22885b >> 32)), Float.intBitsToFloat((int) (this.f13407d.f22885b & 4294967295L)), AbstractC2686D.I(this.f13407d.f22884a));
    }

    public final void g(C2024l c2024l) {
        if (c2024l == null || o.c(this.f13405b, c2024l)) {
            return;
        }
        this.f13405b = c2024l;
        int i6 = c2024l.f16389a;
        setUnderlineText((i6 | 1) == i6);
        C2024l c2024l2 = this.f13405b;
        c2024l2.getClass();
        int i7 = c2024l2.f16389a;
        setStrikeThruText((i7 | 2) == i7);
    }
}
