package com.revenuecat.purchases.ui.revenuecatui.components.video;

import com.revenuecat.purchases.paywalls.components.PartialVideoComponent;
import com.revenuecat.purchases.paywalls.components.properties.Size;
import com.revenuecat.purchases.ui.revenuecatui.components.PresentedVideoPartial;
import kotlin.jvm.internal.p;

/* JADX INFO: loaded from: classes3.dex */
public final class VideoComponentState$size$2 extends p implements J4.a {
    final /* synthetic */ VideoComponentState this$0;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public VideoComponentState$size$2(VideoComponentState videoComponentState) {
        super(0);
        this.this$0 = videoComponentState;
    }

    @Override // J4.a
    public final Size invoke() {
        Size size;
        PartialVideoComponent partial;
        VideoComponentState videoComponentState = this.this$0;
        PresentedVideoPartial presentedPartial = videoComponentState.getPresentedPartial();
        if (presentedPartial == null || (partial = presentedPartial.getPartial()) == null || (size = partial.getSize()) == null) {
            size = this.this$0.style.getSize();
        }
        return videoComponentState.adjustForVideo(size, this.this$0.getVideoUrls(), this.this$0.getDensity());
    }
}
