package k7;

import android.content.Context;
import android.view.View;
import android.widget.FrameLayout;
import androidx.compose.ui.platform.ComposeView;
import androidx.compose.ui.platform.u2;
import androidx.fragment.app.f;
import androidx.lifecycle.n;
import androidx.lifecycle.u;
import dn.p;
import kotlin.jvm.internal.t;

/* loaded from: classes.dex */
public abstract class a {

    /* renamed from: k7.a$a, reason: collision with other inner class name */
    /* loaded from: classes.dex */
    public static final class C0532a extends FrameLayout implements u {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ f f25421p;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        C0532a(p pVar, f fVar, Context context) {
            super(context);
            this.f25421p = fVar;
            Context context2 = getContext();
            t.f(context2, "getContext(...)");
            ComposeView composeView = new ComposeView(context2, null, 0, 6, null);
            composeView.setViewCompositionStrategy(u2.c.f2712b);
            composeView.setContent(pVar);
            addView(composeView);
        }

        @Override // androidx.lifecycle.u
        public n getLifecycle() {
            return this.f25421p.getViewLifecycleOwner().getLifecycle();
        }
    }

    public static final View a(f fragment, p content) {
        t.g(fragment, "fragment");
        t.g(content, "content");
        return new C0532a(content, fragment, fragment.requireContext());
    }
}
