package kotlin.reflect.jvm.internal.impl.descriptors.annotations;

import defpackage.cr4;
import defpackage.ik2;
import defpackage.kp6;
import defpackage.q07;
import defpackage.sq3;
import defpackage.wo5;
import kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns;
import kotlin.reflect.jvm.internal.impl.builtins.StandardNames;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.name.ClassId;
import kotlin.reflect.jvm.internal.impl.name.FqName;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.resolve.constants.AnnotationValue;
import kotlin.reflect.jvm.internal.impl.resolve.constants.ArrayValue;
import kotlin.reflect.jvm.internal.impl.resolve.constants.EnumValue;
import kotlin.reflect.jvm.internal.impl.resolve.constants.StringValue;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
import kotlin.reflect.jvm.internal.impl.types.Variance;

/* JADX INFO: loaded from: classes3.dex */
public final class AnnotationUtilKt {

    @kp6
    private static final Name DEPRECATED_LEVEL_NAME;

    @kp6
    private static final Name DEPRECATED_MESSAGE_NAME;

    @kp6
    private static final Name DEPRECATED_REPLACE_WITH_NAME;

    @kp6
    private static final Name REPLACE_WITH_EXPRESSION_NAME;

    @kp6
    private static final Name REPLACE_WITH_IMPORTS_NAME;

    static {
        Name nameIdentifier = Name.identifier("message");
        cr4.f(nameIdentifier, "identifier(...)");
        DEPRECATED_MESSAGE_NAME = nameIdentifier;
        Name nameIdentifier2 = Name.identifier("replaceWith");
        cr4.f(nameIdentifier2, "identifier(...)");
        DEPRECATED_REPLACE_WITH_NAME = nameIdentifier2;
        Name nameIdentifier3 = Name.identifier("level");
        cr4.f(nameIdentifier3, "identifier(...)");
        DEPRECATED_LEVEL_NAME = nameIdentifier3;
        Name nameIdentifier4 = Name.identifier("expression");
        cr4.f(nameIdentifier4, "identifier(...)");
        REPLACE_WITH_EXPRESSION_NAME = nameIdentifier4;
        Name nameIdentifier5 = Name.identifier("imports");
        cr4.f(nameIdentifier5, "identifier(...)");
        REPLACE_WITH_IMPORTS_NAME = nameIdentifier5;
    }

    @kp6
    public static final AnnotationDescriptor createDeprecatedAnnotation(@kp6 final KotlinBuiltIns kotlinBuiltIns, @kp6 String str, @kp6 String str2, @kp6 String str3, boolean z) {
        cr4.g(kotlinBuiltIns, "<this>");
        cr4.g(str, "message");
        cr4.g(str2, "replaceWith");
        cr4.g(str3, "level");
        BuiltInAnnotationDescriptor builtInAnnotationDescriptor = new BuiltInAnnotationDescriptor(kotlinBuiltIns, StandardNames.FqNames.replaceWith, wo5.j(new q07(REPLACE_WITH_EXPRESSION_NAME, new StringValue(str2)), new q07(REPLACE_WITH_IMPORTS_NAME, new ArrayValue(ik2.a, new sq3(kotlinBuiltIns) { // from class: kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationUtilKt$$Lambda$0
            private final KotlinBuiltIns arg$0;

            {
                this.arg$0 = kotlinBuiltIns;
            }

            @Override // defpackage.sq3
            public Object invoke(Object obj) {
                return AnnotationUtilKt.createDeprecatedAnnotation$lambda$0(this.arg$0, (ModuleDescriptor) obj);
            }
        }))), false, 8, null);
        FqName fqName = StandardNames.FqNames.deprecated;
        q07 q07Var = new q07(DEPRECATED_MESSAGE_NAME, new StringValue(str));
        q07 q07Var2 = new q07(DEPRECATED_REPLACE_WITH_NAME, new AnnotationValue(builtInAnnotationDescriptor));
        Name name = DEPRECATED_LEVEL_NAME;
        ClassId classId = ClassId.Companion.topLevel(StandardNames.FqNames.deprecationLevel);
        Name nameIdentifier = Name.identifier(str3);
        cr4.f(nameIdentifier, "identifier(...)");
        return new BuiltInAnnotationDescriptor(kotlinBuiltIns, fqName, wo5.j(q07Var, q07Var2, new q07(name, new EnumValue(classId, nameIdentifier))), z);
    }

    public static /* synthetic */ AnnotationDescriptor createDeprecatedAnnotation$default(KotlinBuiltIns kotlinBuiltIns, String str, String str2, String str3, boolean z, int i, Object obj) {
        if ((i & 2) != 0) {
            str2 = "";
        }
        if ((i & 4) != 0) {
            str3 = "WARNING";
        }
        if ((i & 8) != 0) {
            z = false;
        }
        return createDeprecatedAnnotation(kotlinBuiltIns, str, str2, str3, z);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final KotlinType createDeprecatedAnnotation$lambda$0(KotlinBuiltIns kotlinBuiltIns, ModuleDescriptor moduleDescriptor) {
        cr4.g(moduleDescriptor, "module");
        SimpleType arrayType = moduleDescriptor.getBuiltIns().getArrayType(Variance.INVARIANT, kotlinBuiltIns.getStringType());
        cr4.f(arrayType, "getArrayType(...)");
        return arrayType;
    }
}
