package com.bytedance.sdk.component.adexpress.ajl;

import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.text.TextUtils;
import android.view.animation.LinearInterpolator;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.media3.exoplayer.ExoPlayer;

/* JADX INFO: loaded from: classes.dex */
public class wu extends sds {
    private AnimatorSet ajl;
    private TextView fm;
    private int jnr;

    /* JADX INFO: renamed from: lb, reason: collision with root package name */
    private ImageView f6460lb;
    private ImageView ro;
    private ImageView yz;

    public wu(Context context) {
        super(context);
        this.ajl = new AnimatorSet();
        ro(context);
    }

    private void ro(Context context) {
        addView(com.bytedance.sdk.component.adexpress.lb.fm.ro(context));
        this.ro = (ImageView) findViewById(2097610751);
        this.f6460lb = (ImageView) findViewById(2097610750);
        this.yz = (ImageView) findViewById(2097610749);
        this.fm = (TextView) findViewById(2097610748);
    }

    private void yz() {
        ObjectAnimator objectAnimatorOfInt = ObjectAnimator.ofInt(this, "alphaColor", 0, 60);
        objectAnimatorOfInt.setInterpolator(new LinearInterpolator());
        objectAnimatorOfInt.setDuration(ExoPlayer.DEFAULT_DETACH_SURFACE_TIMEOUT_MS);
        objectAnimatorOfInt.setRepeatCount(-1);
        objectAnimatorOfInt.start();
    }

    @Override // com.bytedance.sdk.component.adexpress.ajl.sds
    public void fm(Context context) {
    }

    public float getAlphaColor() {
        return this.jnr;
    }

    public void setAlphaColor(int i10) {
        if (i10 < 0 || i10 > 60) {
            return;
        }
        int i11 = i10 + 195;
        ImageView imageView = this.yz;
        int iRgb = Color.rgb(i11, i11, i11);
        PorterDuff.Mode mode = PorterDuff.Mode.SRC_IN;
        imageView.setColorFilter(iRgb, mode);
        int i12 = ((i10 + 20) % 60) + 195;
        this.f6460lb.setColorFilter(Color.rgb(i12, i12, i12), mode);
        int i13 = ((i10 + 40) % 60) + 195;
        this.ro.setColorFilter(Color.rgb(i13, i13, i13), mode);
    }

    public void setButtonText(String str) {
        if (this.fm == null || TextUtils.isEmpty(str)) {
            return;
        }
        this.fm.setText(str);
    }

    @Override // com.bytedance.sdk.component.adexpress.ajl.sds
    public void fm() {
        yz();
    }

    @Override // com.bytedance.sdk.component.adexpress.ajl.sds
    public void ro() {
        this.ajl.cancel();
    }
}
