local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_Parent_2 = l_Parent_1.Parent;
local v3 = require(l_Parent_2.Roact);
local _ = require(l_Parent_2.t);
local l_FitFrameVertical_0 = require(l_Parent_2.RoactFitComponents).FitFrameVertical;
local v6 = require(l_Parent_2.UIBlox);
local l_PartialPageModal_0 = v6.App.Dialog.Modal.PartialPageModal;
local l_ButtonType_0 = v6.App.Button.Enum.ButtonType;
local l_Images_0 = v6.App.ImageSet.Images;
local l_ImageSetLabel_0 = v6.Core.ImageSet.ImageSetLabel;
local l_withStyle_0 = v6.Style.withStyle;
local v12 = require(l_Parent_1.Locale.MultiTextLocalizer);
local v13 = require(l_Parent_0.BulletPoint);
local v14 = v3.Component:extend(script.Name);
v14.init = function(v15)
    v15.isCondensed = false;
    v15.contentSize = Vector2.new(0, 0);
    v15.state = {
        padding = UDim.new(0, 24),
        iconSize = UDim2.new(1, 0, 0, 80)
    };
    v15.updateContentSizes = function(v16, v17)
        if not (v17.X >= 200) or v17.Y > 1000 then
            return ;
        else
            local l_contentSize_0 = v15.contentSize;
            v15.contentSize = v17;
            if v17.X == 0 and v17.Y == 0 then
                return ;
            elseif v16.X == 0 and v16.Y == 0 then
                return ;
            elseif v17 == l_contentSize_0 and v16 == v15.props.screenSize then
                return ;
            else
                local v19 = if not v15.isCondensed then v16.Y < v17.Y + 120 else v16.Y < (((v17.Y + 120) + 80) - 48) + 24;
                v15.isCondensed = v19;
                v15:setState({
                    padding = UDim.new(0, not v19 and 24 or 12),
                    iconSize = UDim2.new(1, 0, 0, not v19 and 80 or 48)
                });
                return ;
            end;
        end;
    end;
end;
v14.willUpdate = function(v20, v21)
    if v20.props.screenSize ~= v21.screenSize then
        v20.updateContentSizes(v21.screenSize, v20.contentSize);
    end;
end;
v14.render = function(v22)
    local l_props_0 = v22.props;
    return v3.createElement(v12, {
        keys = {
            titleLocalizedText = if not l_props_0.isCatalog then {
                key = ("IAPExperience.PremiumUpsell.%s"):format("Title.PremiumRequired")
            } else {
                key = ("IAPExperience.PremiumUpsell.%s"):format("Title.GetPremium")
            },
            monthlyLocalizedText = {
                key = ("IAPExperience.PremiumUpsell.%s"):format("Action.Subscribe")
            },
            descLocalizedText = {
                key = ("IAPExperience.PremiumUpsell.%s"):format("Label.PremiumBenefitListDesc")
            },
            bulletPoint1Text = {
                key = ("IAPExperience.PremiumUpsell.%s"):format("Label.RobuxPerMonth")
            },
            bulletPoint2Text = {
                key = ("IAPExperience.PremiumUpsell.%s"):format("Label.PremiumOnlyBenefits")
            },
            bulletPoint3Text = if not l_props_0.isCatalog then {
                key = ("IAPExperience.PremiumUpsell.%s"):format("Body.RobuxDiscount")
            } else {
                key = ("IAPExperience.PremiumUpsell.%s"):format("Label.AvatarShopBenefits")
            },
            disclosure = {
                key = ("IAPExperience.PremiumUpsell.%s"):format("Label.Disclosure"),
                params = {
                    currencySymbol = l_props_0.currencySymbol,
                    price = tostring(l_props_0.robuxPrice)
                }
            }
        },
        render = function(v24)
            return v22:renderPrompt(v24);
        end
    });
end;
v14.renderPrompt = function(v25, v26)
    local l_props_1 = v25.props;
    return l_withStyle_0(function(v28)
        local l_Theme_0 = v28.Theme;
        local l_Font_0 = v28.Font;
        local v31 = l_PartialPageModal_0:getMiddleContentWidth(v25.props.screenSize.X);
        return v3.createElement(l_PartialPageModal_0, {
            title = v26.titleLocalizedText,
            screenSize = l_props_1.screenSize,
            buttonStackProps = {
                buttons = {
                    {
                        buttonType = l_ButtonType_0.PrimarySystem,
                        props = {
                            onActivated = l_props_1.purchasePremiumActivated,
                            text = v26.monthlyLocalizedText,
                            inputIcon = l_props_1.acceptControllerIcon
                        }
                    }
                },
                buttonHeight = 48
            },
            onCloseClicked = l_props_1.cancelPurchaseActivated
        }, {
            v3.createElement(l_FitFrameVertical_0, {
                BackgroundTransparency = 1,
                width = UDim.new(1, 0),
                contentPadding = UDim.new(0, 24),
                margin = {
                    top = 24,
                    bottom = 24
                },
                [v3.Change.AbsoluteSize] = function(v32)
                    local _ = v32.AbsoluteSize;
                    if not (v25.contentSize.X == v32.AbsoluteSize.X) or v25.contentSize.Y ~= v32.AbsoluteSize.Y then
                        v25.updateContentSizes(v25.props.screenSize, v32.AbsoluteSize);
                    end;
                end
            }, {
                Icon = v3.createElement(l_ImageSetLabel_0, {
                    LayoutOrder = 1,
                    BackgroundTransparency = 1,
                    Size = v25.state.iconSize,
                    ScaleType = Enum.ScaleType.Fit,
                    Image = l_Images_0["icons/graphic/premium_large"]
                }),
                BulletListText = v3.createElement("TextLabel", {
                    LayoutOrder = 2,
                    BackgroundTransparency = 1,
                    Size = UDim2.new(0, v31, 0, 0),
                    AutomaticSize = Enum.AutomaticSize.Y,
                    TextXAlignment = Enum.TextXAlignment.Left,
                    Font = l_Font_0.Body.Font,
                    Text = v26.descLocalizedText,
                    TextSize = l_Font_0.BaseSize * l_Font_0.Body.RelativeSize,
                    TextColor3 = l_Theme_0.TextDefault.Color,
                    TextTransparency = l_Theme_0.TextDefault.Transparency
                }),
                BulletList = v3.createElement(l_FitFrameVertical_0, {
                    LayoutOrder = 3,
                    BackgroundTransparency = 1,
                    width = UDim.new(1, 0),
                    contentPadding = v25.state.padding
                }, {
                    BulletText1 = v3.createElement(v13, {
                        text = v26.bulletPoint1Text:gsub("{robux}", utf8.char(57346) .. tostring(l_props_1.robuxAmount)),
                        width = v31,
                        layoutOrder = 1
                    }),
                    BulletText2 = v3.createElement(v13, {
                        text = v26.bulletPoint2Text,
                        width = v31,
                        layoutOrder = 2
                    }),
                    BulletText3 = v3.createElement(v13, {
                        text = v26.bulletPoint3Text,
                        width = v31,
                        layoutOrder = 3
                    })
                }),
                Disclosure = v3.createElement("TextLabel", {
                    LayoutOrder = 4,
                    BackgroundTransparency = 1,
                    AutomaticSize = Enum.AutomaticSize.XY,
                    TextXAlignment = Enum.TextXAlignment.Left,
                    RichText = true,
                    TextWrapped = true,
                    Font = l_Font_0.Body.Font,
                    Text = v26.disclosure,
                    TextSize = l_Font_0.BaseSize * l_Font_0.Body.RelativeSize,
                    TextColor3 = l_Theme_0.TextDefault.Color,
                    TextTransparency = l_Theme_0.TextDefault.Transparency
                })
            })
        });
    end);
end;
return v14;


local _ = game:GetService("RunService");
local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v3 = require(l_Parent_1.Roact);
local v4 = require(l_Parent_1.t);
local v5 = require(l_Parent_1.RoactFitComponents);
local l_FitFrameVertical_0 = v5.FitFrameVertical;
local l_FitTextLabel_0 = v5.FitTextLabel;
local v8 = require(l_Parent_1.UIBlox);
local l_InteractiveAlert_0 = v8.App.Dialog.Alert.InteractiveAlert;
local l_ButtonType_0 = v8.App.Button.Enum.ButtonType;
local l_Images_0 = v8.App.ImageSet.Images;
local l_ImageSetLabel_0 = v8.Core.ImageSet.ImageSetLabel;
local l_IconSize_0 = v8.App.Constant.IconSize;
local l_withStyle_0 = v8.Core.Style.withStyle;
local v15 = require(script.Parent.Parent.Generic.HumanoidViewport);
local v16 = require(l_Parent_0.Locale.MultiTextLocalizer);
local v17 = require(l_Parent_0.Flags.getEnableHumanoidViewportItemIcon);
local v18 = l_Images_0["icons/common/robux_small"];
local v19 = l_Images_0["icons/common/robux"];
local v20 = v3.Component:extend(script.Name);
v20.validateProps = v4.strictInterface({
    anchorPoint = v4.optional(v4.Vector2),
    position = v4.optional(v4.UDim2),
    screenSize = v4.Vector2,
    isLoading = v4.optional(v4.boolean),
    isDisabled = v4.optional(v4.boolean),
    isDelayedInput = v4.optional(v4.boolean),
    enableInputDelayed = v4.optional(v4.boolean),
    itemIcon = v4.table,
    model = v4.optional(v4.table),
    itemName = v4.string,
    itemRobuxCost = v4.number,
    currentBalance = v4.number,
    isGamePass = v4.optional(v4.boolean),
    testPurchase = v4.optional(v4.boolean),
    buyItemControllerIcon = v4.optional(v4.table),
    cancelControllerIcon = v4.optional(v4.table),
    buyItemActivated = v4.callback,
    cancelPurchaseActivated = v4.callback,
    isLuobu = v4.optional(v4.boolean)
});
v20.defaultProps = {
    anchorPoint = Vector2.new(0.5, 0.5),
    position = UDim2.new(0.5, 0, 0.5, 0),
    isLoading = false,
    isDisabled = false,
    testPurchase = false,
    isDelayedInput = false,
    enableInputDelayed = false,
    isLuobu = false,
    isGamePass = false
};
v20.init = function(v21)
    v21.contentRef = v3.createRef();
    v21.footerRef = v3.createRef();
    v21.state = {
        contentSize = Vector2.new(0, 0),
        footerSize = Vector2.new(0, 0)
    };
    v21.changeContentSize = function(v22)
        if v21.state.contentSize ~= v22.AbsoluteSize then
            v21:setState({
                contentSize = v22.AbsoluteSize
            });
        end;
    end;
    v21.changeFooterSize = function(v23)
        if v21.state.footerSize ~= v23.AbsoluteSize then
            v21:setState({
                footerSize = v23.AbsoluteSize
            });
        end;
    end;
end;
v20.render = function(v24)
    return v3.createElement(v16, {
        keys = {
            BuyItemTitle = {
                key = not not v24.props.isGamePass and ("IAPExperience.PurchasePrompt.%s"):format("Title.BuyGamepass") or ("IAPExperience.PurchasePrompt.%s"):format("Title.BuyItem")
            },
            BuyItemQuestion = {
                key = ("IAPExperience.PurchasePrompt.%s"):format(not v24.props.isLuobu and "Text.BuyItemQuestion" or "Text.BuyItemQuestionWithWarning"),
                params = {
                    name = v24.props.itemName
                }
            },
            RemainingBalance = {
                key = ("IAPExperience.PurchasePrompt.%s"):format("Text.RemainingBalance")
            },
            TestPurchaseText = {
                key = ("IAPExperience.PurchasePrompt.%s"):format("Text.TestPurchase")
            },
            ButtonCancel = {
                key = ("IAPExperience.PurchasePrompt.%s"):format("Action.Cancel")
            },
            LoadingText = {
                key = ("IAPExperience.PurchasePrompt.%s"):format("Text.Loading")
            }
        },
        render = function(v25)
            return v24:renderAlert(v25);
        end
    });
end;
v20.renderAlert = function(v26, v27)
    return l_withStyle_0(function(v28)
        local l_Theme_0 = v28.Theme;
        local l_Font_0 = v28.Font;
        local v31 = if not not v17() and v26.props.model then v3.createElement(v15, {
            model = v26.props.model,
            LayoutOrder = 1,
            Size = UDim2.fromOffset(85, 85),
            Position = UDim2.fromOffset(5, 5)
        }) else v3.createElement(l_ImageSetLabel_0, {
            LayoutOrder = 1,
            BackgroundTransparency = 1,
            Position = UDim2.new(0, 5, 0, 5),
            Size = UDim2.new(0, 85, 0, 85),
            ScaleType = Enum.ScaleType.Stretch,
            Image = v26.props.itemIcon,
            ImageTransparency = 0
        });
        return v3.createElement(l_InteractiveAlert_0, {
            screenSize = v26.props.screenSize,
            position = v26.props.position,
            anchorPoint = v26.props.anchorPoint,
            title = v27.BuyItemTitle,
            middleContent = function()
                return v3.createElement(l_FitFrameVertical_0, {
                    BackgroundTransparency = 1,
                    width = UDim.new(1, 0),
                    FillDirection = Enum.FillDirection.Vertical,
                    HorizontalAlignment = Enum.HorizontalAlignment.Center,
                    VerticalAlignment = Enum.VerticalAlignment.Center,
                    contentPadding = UDim.new(0, 24),
                    [v3.Ref] = v26.contentRef,
                    [v3.Change.AbsoluteSize] = v26.changeContentSize
                }, {
                    ItemIcon = v31,
                    ItemName = v3.createElement(l_FitTextLabel_0, {
                        LayoutOrder = 2,
                        BackgroundTransparency = 1,
                        TextWrapped = true,
                        width = l_FitTextLabel_0.Width.FitToText,
                        maximumWidth = v26.state.contentSize.X,
                        Font = l_Font_0.Footer.Font,
                        Text = v27.BuyItemQuestion,
                        TextSize = l_Font_0.BaseSize * l_Font_0.Body.RelativeSize,
                        TextColor3 = l_Theme_0.TextDefault.Color
                    })
                });
            end,
            buttonStackInfo = {
                buttons = {
                    {
                        props = {
                            isDisabled = v26.props.isDisabled or v26.props.isLoading,
                            onActivated = v26.props.cancelPurchaseActivated,
                            text = v27.ButtonCancel,
                            inputIcon = v26.props.cancelControllerIcon
                        }
                    },
                    {
                        buttonType = l_ButtonType_0.PrimarySystem,
                        props = {
                            isLoading = v26.props.isLoading,
                            isDisabled = v26.props.isDisabled,
                            isDelayedInput = v26.props.isDelayedInput,
                            enableInputDelayed = v26.props.enableInputDelayed,
                            delayInputSeconds = 3,
                            onActivated = v26.props.buyItemActivated,
                            icon = v19,
                            text = tostring(v26.props.itemRobuxCost),
                            inputIcon = v26.props.buyItemControllerIcon
                        }
                    }
                }
            },
            footerContent = function()
                if v26.props.testPurchase then
                    return v3.createElement(l_FitFrameVertical_0, {
                        BackgroundTransparency = 1,
                        width = UDim.new(1, 0),
                        FillDirection = Enum.FillDirection.Horizontal,
                        HorizontalAlignment = Enum.HorizontalAlignment.Center,
                        VerticalAlignment = Enum.VerticalAlignment.Center,
                        contentPadding = UDim.new(0, 2),
                        [v3.Ref] = v26.footerRef,
                        [v3.Change.AbsoluteSize] = v26.changeFooterSize
                    }, {
                        TestPurchaseTest = v3.createElement(l_FitTextLabel_0, {
                            LayoutOrder = 1,
                            BackgroundTransparency = 1,
                            width = l_FitTextLabel_0.Width.FitToText,
                            Font = l_Font_0.Footer.Font,
                            Text = v27.TestPurchaseText,
                            TextSize = l_Font_0.BaseSize * l_Font_0.Footer.RelativeSize,
                            TextColor3 = l_Theme_0.TextDefault.Color
                        })
                    });
                else
                    return v3.createElement(l_FitFrameVertical_0, {
                        BackgroundTransparency = 1,
                        width = UDim.new(1, 0),
                        FillDirection = Enum.FillDirection.Horizontal,
                        HorizontalAlignment = Enum.HorizontalAlignment.Center,
                        VerticalAlignment = Enum.VerticalAlignment.Center,
                        contentPadding = UDim.new(0, 2),
                        [v3.Ref] = v26.footerRef,
                        [v3.Change.AbsoluteSize] = v26.changeFooterSize
                    }, {
                        RemainingBalanceText = v3.createElement(l_FitTextLabel_0, {
                            LayoutOrder = 1,
                            BackgroundTransparency = 1,
                            width = l_FitTextLabel_0.Width.FitToText,
                            Font = l_Font_0.Footer.Font,
                            Text = v27.RemainingBalance,
                            TextSize = l_Font_0.BaseSize * l_Font_0.Footer.RelativeSize,
                            TextColor3 = l_Theme_0.TextDefault.Color
                        }),
                        RobuxIcon = v3.createElement(l_ImageSetLabel_0, {
                            LayoutOrder = 2,
                            BackgroundTransparency = 1,
                            Position = UDim2.new(0, 5, 0, 5),
                            Size = UDim2.new(0, l_IconSize_0.Small, 0, l_IconSize_0.Small),
                            ScaleType = Enum.ScaleType.Stretch,
                            Image = v18,
                            ImageColor3 = l_Theme_0.IconEmphasis.Color,
                            ImageTransparency = l_Theme_0.IconEmphasis.Transparency
                        }),
                        BalanceAmount = v3.createElement(l_FitTextLabel_0, {
                            LayoutOrder = 3,
                            BackgroundTransparency = 1,
                            width = l_FitTextLabel_0.Width.FitToText,
                            Font = l_Font_0.Footer.Font,
                            Text = tostring(v26.props.currentBalance - v26.props.itemRobuxCost),
                            TextSize = l_Font_0.BaseSize * l_Font_0.Footer.RelativeSize,
                            TextColor3 = l_Theme_0.TextDefault.Color
                        })
                    });
                end;
            end
        });
    end);
end;
return v20;


local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_Parent_2 = l_Parent_1.Parent;
local v3 = require(l_Parent_2.Roact);
local l_FitFrameVertical_0 = require(l_Parent_2.RoactFitComponents).FitFrameVertical;
local v5 = require(l_Parent_2.UIBlox);
local l_InteractiveAlert_0 = v5.App.Dialog.Alert.InteractiveAlert;
local l_ButtonType_0 = v5.App.Button.Enum.ButtonType;
local l_withStyle_0 = v5.Core.Style.withStyle;
local v9 = require(l_Parent_1.Locale.MultiTextLocalizer);
local v10 = require(l_Parent_0.ProductDetails);
local v11 = v3.Component:extend(script.Name);
v11.defaultProps = {
    anchorPoint = Vector2.new(0.5, 0.5),
    position = UDim2.new(0.5, 0, 0.5, 0)
};
v11.init = function(v12)
    v12.contentRef = v3.createRef();
    v12.state = {
        contentSize = Vector2.new(0, 0),
        footerSize = Vector2.new(0, 0)
    };
    v12.changeContentSize = function(v13)
        if v12.state.contentSize ~= v13.AbsoluteSize then
            v12:setState({
                contentSize = v13.AbsoluteSize
            });
        end;
    end;
end;
v11.render = function(v14)
    return v3.createElement(v9, {
        keys = {
            InsufficientRobuxTitle = {
                key = ("IAPExperience.InsufficientRobux.%s"):format("Title.InsufficientRobux")
            },
            YouNeed = {
                key = ("IAPExperience.InsufficientRobux.%s"):format("Text.YouNeed")
            },
            RobuxStore = {
                key = ("IAPExperience.InsufficientRobux.%s"):format("Action.RobuxStore")
            },
            ButtonCancel = {
                key = ("IAPExperience.InsufficientRobux.%s"):format("Action.Cancel")
            }
        },
        render = function(v15)
            return v14:renderAlert(v15);
        end
    });
end;
v11.renderAlert = function(v16, v17)
    local l_props_0 = v16.props;
    return l_withStyle_0(function(v19)
        local l_Theme_0 = v19.Theme;
        local l_Font_0 = v19.Font;
        local v22 = v17.YouNeed:gsub("{robux}", (string.format("%s%s", tostring((Color3.new(math.round(l_Theme_0.TextEmphasis.Color.R * 255), math.round(l_Theme_0.TextEmphasis.Color.G * 255), (math.round(l_Theme_0.TextEmphasis.Color.B * 255))))), utf8.char(57346), (tostring(l_props_0.itemRobuxCost - l_props_0.balanceAmount)))));
        return v3.createElement(l_InteractiveAlert_0, {
            screenSize = l_props_0.screenSize,
            position = l_props_0.position,
            anchorPoint = l_props_0.anchorPoint,
            title = v17.InsufficientRobuxTitle,
            middleContent = function()
                return v3.createElement(l_FitFrameVertical_0, {
                    BackgroundTransparency = 1,
                    width = UDim.new(1, 0),
                    FillDirection = Enum.FillDirection.Vertical,
                    HorizontalAlignment = Enum.HorizontalAlignment.Center,
                    VerticalAlignment = Enum.VerticalAlignment.Center,
                    contentPadding = UDim.new(0, 15),
                    [v3.Ref] = v16.contentRef,
                    [v3.Change.AbsoluteSize] = v16.changeContentSize
                }, {
                    ProductDetails = v3.createElement(v10, {
                        layoutOrder = 1,
                        model = l_props_0.model,
                        itemIcon = l_props_0.itemIcon,
                        itemName = l_props_0.itemName,
                        itemRobuxCost = l_props_0.itemRobuxCost
                    }),
                    Underline = v3.createElement("Frame", {
                        LayoutOrder = 2,
                        BorderSizePixel = 0,
                        BackgroundColor3 = l_Theme_0.Divider.Color,
                        BackgroundTransparency = l_Theme_0.Divider.Transparency,
                        Size = UDim2.new(1, 0, 0, 1)
                    }),
                    AdditionalBuyText = v3.createElement("TextLabel", {
                        LayoutOrder = 3,
                        BackgroundTransparency = 1,
                        Size = UDim2.new(0, v16.state.contentSize.X, 0, 0),
                        RichText = true,
                        AutomaticSize = Enum.AutomaticSize.Y,
                        TextWrapped = true,
                        Font = l_Font_0.Body.Font,
                        Text = v22,
                        TextSize = l_Font_0.BaseSize * l_Font_0.Body.RelativeSize,
                        TextColor3 = l_Theme_0.TextDefault.Color,
                        TextTransparency = l_Theme_0.TextDefault.Transparency
                    })
                });
            end,
            buttonStackInfo = {
                buttons = {
                    {
                        props = {
                            onActivated = l_props_0.cancelPurchaseActivated,
                            text = v17.ButtonCancel,
                            inputIcon = l_props_0.cancelControllerIcon
                        }
                    },
                    {
                        buttonType = l_ButtonType_0.PrimarySystem,
                        props = {
                            onActivated = l_props_0.robuxStoreActivated,
                            text = v17.RobuxStore,
                            inputIcon = l_props_0.acceptControllerIcon
                        }
                    }
                }
            }
        });
    end);
end;
return v11;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v2 = require(l_Parent_1.Roact);
local _ = require(l_Parent_1.t);
local v4 = require(l_Parent_1.RoactFitComponents);
local l_FitFrameVertical_0 = v4.FitFrameVertical;
local l_FitTextLabel_0 = v4.FitTextLabel;
local v7 = require(l_Parent_1.UIBlox);
local l_Images_0 = v7.App.ImageSet.Images;
local l_ImageSetLabel_0 = v7.Core.ImageSet.ImageSetLabel;
local l_IconSize_0 = v7.App.Constant.IconSize;
local l_withStyle_0 = v7.Core.Style.withStyle;
local v12 = require(l_Parent_0.Generic.HumanoidViewport);
local v13 = require(l_Parent_0.Generic.Constants);
local v14 = require(l_Parent_0.Flags.getEnableCondenseRobuxUpsell);
local v15 = require(l_Parent_0.Flags.getEnableHumanoidViewportItemIcon);
local v16 = l_Images_0["icons/common/robux"];
local v17 = l_Images_0["icons/status/imageunavailable"];
local v18 = v2.Component:extend(script.Name);
v18.init = function(v19)
    v19.contentRef = v2.createRef();
    v19.state = {
        contentSize = Vector2.new(0, 0)
    };
    v19.changeContentSize = function(v20)
        if v19.state.contentSize ~= v20.AbsoluteSize then
            v19:setState({
                contentSize = v20.AbsoluteSize
            });
        end;
    end;
end;
v18.render = function(v21)
    local l_props_0 = v21.props;
    return l_withStyle_0(function(v23)
        local l_Theme_0 = v23.Theme;
        local l_Font_0 = v23.Font;
        local v26 = l_props_0.itemIcon ~= nil and v13.NORMAL_ICON_SIZE or l_IconSize_0.Large;
        if v15() and l_props_0.model ~= nil then
            v26 = v13.NORMAL_ICON_SIZE;
        end;
        local l_v26_0 = v26;
        local l_v26_1 = v26;
        if v14() then
            l_v26_0 = l_props_0.itemIconWidth == nil and v26 or l_props_0.itemIconWidth;
            l_v26_1 = l_props_0.itemIconHeight == nil and v26 or l_props_0.itemIconHeight;
        end;
        local v29 = if not l_props_0.itemIcon then v2.createElement(l_ImageSetLabel_0, {
            BackgroundTransparency = 1,
            Position = UDim2.new(0, 5, 0, 5),
            Size = UDim2.new(0, l_v26_0, 0, l_v26_1),
            ScaleType = Enum.ScaleType.Stretch,
            Image = v17,
            ImageColor3 = l_Theme_0.UIDefault.Color,
            ImageTransparency = l_Theme_0.UIDefault.Transparency
        }) else v2.createElement(l_ImageSetLabel_0, {
            BackgroundTransparency = 1,
            Position = UDim2.new(0, 5, 0, 5),
            Size = UDim2.new(0, l_v26_0, 0, l_v26_1),
            ScaleType = Enum.ScaleType.Stretch,
            Image = l_props_0.itemIcon,
            ImageTransparency = 0
        });
        if v15() and l_props_0.model ~= nil then
            v29 = v2.createElement(v12, {
                model = l_props_0.model,
                Position = UDim2.fromOffset(5, 5),
                Size = UDim2.fromOffset(l_v26_0, l_v26_1)
            });
        end;
        return v2.createElement(l_FitFrameVertical_0, {
            LayoutOrder = l_props_0.layoutOrder,
            BackgroundTransparency = 1,
            width = UDim.new(1, 0),
            FillDirection = Enum.FillDirection.Horizontal,
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            VerticalAlignment = Enum.VerticalAlignment.Center,
            contentPadding = UDim.new(0, 6),
            [v2.Ref] = v21.contentRef,
            [v2.Change.AbsoluteSize] = v21.changeContentSize
        }, {
            ItemIconFrame = v2.createElement(l_FitFrameVertical_0, {
                LayoutOrder = 1,
                BackgroundTransparency = 1,
                width = UDim.new(0.45, 0),
                HorizontalAlignment = Enum.HorizontalAlignment.Right,
                VerticalAlignment = Enum.VerticalAlignment.Center,
                margin = {
                    top = 0,
                    bottom = 0,
                    left = 0,
                    right = 20
                }
            }, {
                ItemIcon = v29
            }),
            ItemDetailsFrame = v2.createElement(l_FitFrameVertical_0, {
                LayoutOrder = 2,
                BackgroundTransparency = 1,
                width = UDim.new(0.55, 0),
                FillDirection = Enum.FillDirection.Vertical,
                HorizontalAlignment = Enum.HorizontalAlignment.Left,
                VerticalAlignment = Enum.VerticalAlignment.Center,
                contentPadding = UDim.new(0, 5)
            }, {
                ItemName = v2.createElement(l_FitTextLabel_0, {
                    LayoutOrder = 1,
                    BackgroundTransparency = 1,
                    width = l_FitTextLabel_0.Width.FitToText,
                    maximumWidth = v21.state.contentSize.X * 0.55,
                    Font = l_Font_0.Header2.Font,
                    Text = l_props_0.itemName,
                    TextSize = l_Font_0.BaseSize * l_Font_0.Header2.RelativeSize,
                    TextColor3 = l_Theme_0.TextEmphasis.Color,
                    TextWrapped = true,
                    TextXAlignment = Enum.TextXAlignment.Left
                }),
                ItemCostFrame = v2.createElement(l_FitFrameVertical_0, {
                    LayoutOrder = 2,
                    BackgroundTransparency = 1,
                    width = UDim.new(0.5, 0),
                    FillDirection = Enum.FillDirection.Horizontal,
                    HorizontalAlignment = Enum.HorizontalAlignment.Left,
                    VerticalAlignment = Enum.VerticalAlignment.Top,
                    contentPadding = UDim.new(0, 2)
                }, {
                    RobuxIcon = v2.createElement(l_ImageSetLabel_0, {
                        LayoutOrder = 1,
                        BackgroundTransparency = 1,
                        Position = UDim2.new(0, 5, 0, 5),
                        Size = UDim2.new(0, 24, 0, 24),
                        ScaleType = Enum.ScaleType.Stretch,
                        Image = v16,
                        ImageColor3 = l_Theme_0.IconEmphasis.Color,
                        ImageTransparency = l_Theme_0.IconEmphasis.Transparency
                    }),
                    ItemCost = v2.createElement(l_FitTextLabel_0, {
                        LayoutOrder = 2,
                        BackgroundTransparency = 1,
                        TextWrapped = true,
                        width = l_FitTextLabel_0.Width.FitToText,
                        maximumWidth = v21.state.contentSize.X,
                        Font = l_Font_0.Header2.Font,
                        Text = tostring(l_props_0.itemRobuxCost),
                        TextSize = l_Font_0.BaseSize * l_Font_0.Header2.RelativeSize,
                        TextColor3 = l_Theme_0.TextEmphasis.Color
                    })
                })
            })
        });
    end);
end;
return v18;


local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_Parent_2 = l_Parent_1.Parent;
local v3 = require(l_Parent_2.Roact);
local v4 = require(l_Parent_2.t);
local v5 = require(l_Parent_2.RoactFitComponents);
local l_FitFrameVertical_0 = v5.FitFrameVertical;
local l_FitTextLabel_0 = v5.FitTextLabel;
local v8 = require(l_Parent_2.UIBlox);
local l_InteractiveAlert_0 = v8.App.Dialog.Alert.InteractiveAlert;
local l_ButtonType_0 = v8.App.Button.Enum.ButtonType;
local l_Images_0 = v8.App.ImageSet.Images;
local l_ImageSetLabel_0 = v8.Core.ImageSet.ImageSetLabel;
local l_IconSize_0 = v8.App.Constant.IconSize;
local l_withStyle_0 = v8.Core.Style.withStyle;
local v15 = require(l_Parent_1.Locale.MultiTextLocalizer);
local v16 = require(l_Parent_0.ProductDetails);
local v17 = l_Images_0["icons/common/robux"];
local v18 = v3.Component:extend(script.Name);
v18.validateProps = v4.strictInterface({
    anchorPoint = v4.optional(v4.Vector2),
    position = v4.optional(v4.UDim2),
    screenSize = v4.Vector2,
    isLoading = v4.optional(v4.boolean),
    isDisabled = v4.optional(v4.boolean),
    isDelayedInput = v4.optional(v4.boolean),
    enableInputDelayed = v4.optional(v4.boolean),
    model = v4.optional(v4.table),
    itemIcon = v4.table,
    itemName = v4.string,
    itemRobuxCost = v4.number,
    robuxPurchaseAmount = v4.number,
    balanceAmount = v4.number,
    buyItemControllerIcon = v4.optional(v4.table),
    cancelControllerIcon = v4.optional(v4.table),
    buyItemActivated = v4.callback,
    cancelPurchaseActivated = v4.callback,
    isLuobu = v4.optional(v4.boolean)
});
v18.defaultProps = {
    anchorPoint = Vector2.new(0.5, 0.5),
    position = UDim2.new(0.5, 0, 0.5, 0),
    isLoading = false,
    isDisabled = false,
    isDelayedInput = false,
    enableInputDelayed = false,
    isLuobu = false
};
v18.init = function(v19)
    v19.contentRef = v3.createRef();
    v19.footerRef = v3.createRef();
    v19.state = {
        contentSize = Vector2.new(0, 0),
        footerSize = Vector2.new(0, 0)
    };
    v19.changeContentSize = function(v20)
        if v19.state.contentSize ~= v20.AbsoluteSize then
            v19:setState({
                contentSize = v20.AbsoluteSize
            });
        end;
    end;
    v19.changeFooterSize = function(v21)
        if v19.state.footerSize ~= v21.AbsoluteSize then
            v19:setState({
                footerSize = v21.AbsoluteSize
            });
        end;
    end;
end;
v18.render = function(v22)
    return v3.createElement(v15, {
        keys = {
            InsufficientFundsTitle = {
                key = ("IAPExperience.RobuxUpsell.%s"):format("Title.InsufficientFunds")
            },
            BuyRobuxQuestion = {
                key = ("IAPExperience.RobuxUpsell.%s"):format(not v22.props.isLuobu and "Text.BuyRobuxQuestion" or "Text.BuyRobuxQuestionWithWarning")
            },
            DisclosurePayment = {
                key = ("IAPExperience.RobuxUpsell.%s"):format("Text.DisclosurePayment")
            },
            DisclosureTerms = {
                key = ("IAPExperience.RobuxUpsell.%s"):format("Text.DisclosureTerms")
            },
            RemainingBalance = {
                key = ("IAPExperience.RobuxUpsell.%s"):format("Text.RemainingBalance")
            },
            BuyRobuxButton = {
                key = ("IAPExperience.RobuxUpsell.%s"):format("Action.BuyRobux")
            },
            ButtonCancel = {
                key = ("IAPExperience.RobuxUpsell.%s"):format("Action.Cancel")
            },
            LoadingText = {
                key = ("IAPExperience.RobuxUpsell.%s"):format("Text.Loading")
            }
        },
        render = function(v23)
            return v22:renderAlert(v23);
        end
    });
end;
v18.renderAlert = function(v24, v25)
    return l_withStyle_0(function(v26)
        local l_Theme_0 = v26.Theme;
        local l_Font_0 = v26.Font;
        local v29 = (v24.props.balanceAmount + v24.props.robuxPurchaseAmount) - v24.props.itemRobuxCost;
        return v3.createElement(l_InteractiveAlert_0, {
            screenSize = v24.props.screenSize,
            position = v24.props.position,
            anchorPoint = v24.props.anchorPoint,
            title = v25.InsufficientFundsTitle,
            middleContent = function()
                return v3.createElement(l_FitFrameVertical_0, {
                    BackgroundTransparency = 1,
                    width = UDim.new(1, 0),
                    FillDirection = Enum.FillDirection.Vertical,
                    HorizontalAlignment = Enum.HorizontalAlignment.Center,
                    VerticalAlignment = Enum.VerticalAlignment.Center,
                    contentPadding = UDim.new(0, 15),
                    [v3.Ref] = v24.contentRef,
                    [v3.Change.AbsoluteSize] = v24.changeContentSize
                }, {
                    ItemDetails = v3.createElement(v16, {
                        layoutOrder = 1,
                        model = v24.props.model,
                        itemIcon = v24.props.itemIcon,
                        itemName = v24.props.itemName,
                        itemRobuxCost = v24.props.itemRobuxCost
                    }),
                    Underline = v3.createElement("Frame", {
                        LayoutOrder = 2,
                        BorderSizePixel = 0,
                        BackgroundColor3 = l_Theme_0.Divider.Color,
                        BackgroundTransparency = l_Theme_0.Divider.Transparency,
                        Size = UDim2.new(1, 0, 0, 1)
                    }),
                    ConfirmationFrame = v3.createElement(l_FitFrameVertical_0, {
                        LayoutOrder = 3,
                        BackgroundTransparency = 1,
                        width = UDim.new(1, 0),
                        FillDirection = Enum.FillDirection.Horizontal,
                        HorizontalAlignment = Enum.HorizontalAlignment.Center,
                        VerticalAlignment = Enum.VerticalAlignment.Center,
                        contentPadding = UDim.new(0, 1)
                    }, {
                        WouldYouLikeText = v3.createElement(l_FitTextLabel_0, {
                            LayoutOrder = 1,
                            BackgroundTransparency = 1,
                            width = l_FitTextLabel_0.Width.FitToText,
                            TextWrapped = true,
                            maximumWidth = v24.state.contentSize.X * 0.8,
                            Font = l_Font_0.Body.Font,
                            Text = v25.BuyRobuxQuestion,
                            TextSize = l_Font_0.BaseSize * l_Font_0.Body.RelativeSize,
                            TextColor3 = l_Theme_0.TextDefault.Color
                        }),
                        RobuxIcon = v3.createElement(l_ImageSetLabel_0, {
                            LayoutOrder = 2,
                            BackgroundTransparency = 1,
                            Position = UDim2.new(0, 5, 0, 5),
                            Size = UDim2.new(0, 24, 0, 24),
                            ScaleType = Enum.ScaleType.Stretch,
                            Image = v17,
                            ImageColor3 = l_Theme_0.IconEmphasis.Color,
                            ImageTransparency = l_Theme_0.IconEmphasis.Transparency
                        }),
                        RemainingRobux = v3.createElement(l_FitTextLabel_0, {
                            LayoutOrder = 3,
                            BackgroundTransparency = 1,
                            width = l_FitTextLabel_0.Width.FitToText,
                            Font = l_Font_0.Body.Font,
                            Text = tostring(v24.props.robuxPurchaseAmount),
                            TextSize = l_Font_0.BaseSize * l_Font_0.Body.RelativeSize,
                            TextColor3 = l_Theme_0.TextEmphasis.Color
                        })
                    }),
                    DisclosureFrame = v3.createElement(l_FitFrameVertical_0, {
                        LayoutOrder = 4,
                        BackgroundTransparency = 1,
                        width = UDim.new(1, 0),
                        FillDirection = Enum.FillDirection.Vertical,
                        HorizontalAlignment = Enum.HorizontalAlignment.Center,
                        VerticalAlignment = Enum.VerticalAlignment.Center,
                        contentPadding = UDim.new(0, 1)
                    }, {
                        DisclosurePayment = v3.createElement(l_FitTextLabel_0, {
                            LayoutOrder = 1,
                            BackgroundTransparency = 1,
                            width = l_FitTextLabel_0.Width.FitToText,
                            Font = l_Font_0.Footer.Font,
                            Text = v25.DisclosurePayment,
                            TextSize = l_Font_0.BaseSize * l_Font_0.Footer.RelativeSize,
                            TextColor3 = l_Theme_0.TextDefault.Color
                        }),
                        DisclosureTerms = v3.createElement(l_FitTextLabel_0, {
                            LayoutOrder = 2,
                            BackgroundTransparency = 1,
                            width = l_FitTextLabel_0.Width.FitToText,
                            Font = l_Font_0.Footer.Font,
                            Text = v25.DisclosureTerms,
                            TextSize = l_Font_0.BaseSize * l_Font_0.Footer.RelativeSize,
                            TextColor3 = l_Theme_0.TextDefault.Color
                        })
                    })
                });
            end,
            buttonStackInfo = {
                buttons = {
                    {
                        props = {
                            isDisabled = v24.props.isDisabled,
                            onActivated = v24.props.cancelPurchaseActivated,
                            text = v25.ButtonCancel,
                            inputIcon = v24.props.cancelControllerIcon
                        }
                    },
                    {
                        buttonType = l_ButtonType_0.PrimarySystem,
                        props = {
                            isLoading = v24.props.isLoading,
                            isDisabled = v24.props.isDisabled,
                            isDelayedInput = v24.props.isDelayedInput,
                            enableInputDelayed = v24.props.enableInputDelayed,
                            delayInputSeconds = 3,
                            onActivated = v24.props.buyItemActivated,
                            text = v25.BuyRobuxButton,
                            inputIcon = v24.props.buyItemControllerIcon
                        }
                    }
                }
            },
            footerContent = function()
                local v30 = string.split(v25.RemainingBalance, " {robux} ");
                return v3.createElement(l_FitFrameVertical_0, {
                    BackgroundTransparency = 1,
                    width = UDim.new(1, 0),
                    FillDirection = Enum.FillDirection.Horizontal,
                    HorizontalAlignment = Enum.HorizontalAlignment.Center,
                    VerticalAlignment = Enum.VerticalAlignment.Center,
                    contentPadding = UDim.new(0, 1),
                    [v3.Ref] = v24.footerRef,
                    [v3.Change.AbsoluteSize] = v24.changeFooterSize
                }, {
                    RemainingBalanceBefore = v3.createElement(l_FitTextLabel_0, {
                        LayoutOrder = 1,
                        BackgroundTransparency = 1,
                        width = l_FitTextLabel_0.Width.FitToText,
                        Font = l_Font_0.Footer.Font,
                        Text = v30[1],
                        TextSize = l_Font_0.BaseSize * l_Font_0.Footer.RelativeSize,
                        TextColor3 = l_Theme_0.TextDefault.Color
                    }),
                    RobuxIcon = v3.createElement(l_ImageSetLabel_0, {
                        LayoutOrder = 2,
                        BackgroundTransparency = 1,
                        Position = UDim2.new(0, 5, 0, 5),
                        Size = UDim2.new(0, l_IconSize_0.Small, 0, l_IconSize_0.Small),
                        ScaleType = Enum.ScaleType.Stretch,
                        Image = v17,
                        ImageColor3 = l_Theme_0.IconEmphasis.Color,
                        ImageTransparency = l_Theme_0.IconEmphasis.Transparency
                    }),
                    RemainingRobux = v3.createElement(l_FitTextLabel_0, {
                        LayoutOrder = 3,
                        BackgroundTransparency = 1,
                        width = l_FitTextLabel_0.Width.FitToText,
                        Font = l_Font_0.Footer.Font,
                        Text = v29,
                        TextSize = l_Font_0.BaseSize * l_Font_0.Footer.RelativeSize,
                        TextColor3 = l_Theme_0.TextDefault.Color
                    }),
                    RemainingBalanceAfter = v3.createElement(l_FitTextLabel_0, {
                        LayoutOrder = 4,
                        BackgroundTransparency = 1,
                        width = l_FitTextLabel_0.Width.FitToText,
                        Font = l_Font_0.Footer.Font,
                        Text = v30[2],
                        TextSize = l_Font_0.BaseSize * l_Font_0.Footer.RelativeSize,
                        TextColor3 = l_Theme_0.TextDefault.Color
                    })
                });
            end
        });
    end);
end;
return v18;


local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_Parent_2 = l_Parent_1.Parent;
local v3 = require(l_Parent_2.Roact);
local l_FitFrameVertical_0 = require(l_Parent_2.RoactFitComponents).FitFrameVertical;
local v5 = require(l_Parent_2.UIBlox);
local l_InteractiveAlert_0 = v5.App.Dialog.Alert.InteractiveAlert;
local l_ButtonType_0 = v5.App.Button.Enum.ButtonType;
local l_withStyle_0 = v5.Core.Style.withStyle;
local v9 = require(l_Parent_1.Locale.MultiTextLocalizer);
local v10 = require(l_Parent_0.ProductDetails);
local v11 = require(l_Parent_1.Generic.Constants);
local v12 = require(l_Parent_1.Flags.getEnableCondenseRobuxUpsell);
local v13 = v3.Component:extend(script.Name);
v13.defaultProps = {
    anchorPoint = Vector2.new(0.5, 0.5),
    position = UDim2.new(0.5, 0, 0.5, 0),
    isLoading = false,
    isDisabled = false,
    isDelayedInput = false,
    isQuest = false,
    enableInputDelayed = false,
    inputDelaySec = 3
};
v13.init = function(v14)
    v14.contentRef = v3.createRef();
    v14.state = {
        contentSize = Vector2.new(0, 0),
        footerSize = Vector2.new(0, 0),
        isCondensed = false
    };
    v14.validateCondensedCondition = function(v15)
        if v12() then
            local v16 = ((v15.AbsoluteSize.Y + v11.MODAL_HEIGHT_WITHOUT_CONTENT) + v11.MODAL_NORMAL_SECTION_PADDING * 2) + v11.MODAL_NORMAL_BUTTON_HEIGHT * 2;
            if not v14.state.isCondensed then
                v14:setState({
                    isCondensed = v14.props.screenSize.Y < v16 + v11.MODAL_NORMAL_BUTTON_MARGIN
                });
                return ;
            else
                v14:setState({
                    isCondensed = v14.props.screenSize.Y < ((v16 + (v11.MODAL_NORMAL_CONTENT_PADDING - v11.MODAL_CONDENSED_CONTENT_PADDING) * 6) + (v11.MODAL_NORMAL_BUTTON_MARGIN - v11.MODAL_CONDENSED_BUTTON_MARGIN)) + (v11.NORMAL_ICON_SIZE - v11.CONDENSED_ICON_SIZE)
                });
                return ;
            end;
        else
            return ;
        end;
    end;
    v14.changeContentSize = function(v17)
        v14.validateCondensedCondition(v17);
        if v14.state.contentSize ~= v17.AbsoluteSize then
            v14:setState({
                contentSize = v17.AbsoluteSize
            });
        end;
    end;
end;
v13.render = function(v18)
    return v3.createElement(v9, {
        keys = {
            InsufficientRobuxTitle = {
                key = ("IAPExperience.RobuxUpsell.%s"):format("Title.InsufficientRobux")
            },
            AdditionalRobux = {
                key = ("IAPExperience.RobuxUpsell.%s"):format("Text.AdditionalRobux")
            },
            WouldYouBuy = {
                key = ("IAPExperience.RobuxUpsell.%s"):format("Text.WouldYouBuy")
            },
            DisclosurePayment = {
                key = ("IAPExperience.RobuxUpsell.%s"):format("Text.DisclosurePayment")
            },
            DisclosureTermsURL = {
                key = ("IAPExperience.RobuxUpsell.%s"):format("Text.DisclosureTermsURL")
            },
            TermsOfUse = {
                key = ("IAPExperience.RobuxUpsell.%s"):format("Text.TermsOfUse")
            },
            BuyRobuxButton = {
                key = ("IAPExperience.RobuxUpsell.%s"):format("Action.BuyRobuxAndItem")
            },
            ButtonCancel = {
                key = ("IAPExperience.RobuxUpsell.%s"):format("Action.Cancel")
            },
            LoadingText = {
                key = ("IAPExperience.RobuxUpsell.%s"):format("Text.Loading")
            },
            PurchaseNotAvialableForQuest = {
                key = ("IAPExperience.RobuxUpsell.%s"):format("Text.PurchaseNotAvailableOnHeadSet")
            }
        },
        render = function(v19)
            return v18:renderAlert(v19);
        end
    });
end;
v13.renderAlert = function(v20, v21)
    local l_props_0 = v20.props;
    local l_state_0 = v20.state;
    return l_withStyle_0(function(v24)
        local l_Theme_0 = v24.Theme;
        local l_Font_0 = v24.Font;
        local v27 = l_Font_0.BaseSize * l_Font_0.Body.RelativeSize;
        if v12() then
            v27 = not not l_state_0.isCondensed and v27 * 0.9 or v27;
        end;
        local v28 = v21.AdditionalRobux:gsub("{robux}", utf8.char(57346) .. tostring(l_props_0.itemRobuxCost - l_props_0.balanceAmount));
        local v29 = v21.WouldYouBuy:gsub("{robux}", (string.format("%s%s", tostring((Color3.new(math.round(l_Theme_0.TextEmphasis.Color.R * 255), math.round(l_Theme_0.TextEmphasis.Color.G * 255), (math.round(l_Theme_0.TextEmphasis.Color.B * 255))))), utf8.char(57346), (tostring(l_props_0.robuxPurchaseAmount)))));
        local v30 = string.split(v21.DisclosureTermsURL, "{termsofuse}");
        local l_TermsOfUse_0 = v21.TermsOfUse;
        if l_props_0.termsOfUseActivated then
            l_TermsOfUse_0 = "" .. l_TermsOfUse_0 .. "";
        end;
        return v3.createElement(l_InteractiveAlert_0, {
            screenSize = l_props_0.screenSize,
            position = l_props_0.position,
            anchorPoint = l_props_0.anchorPoint,
            title = v21.InsufficientRobuxTitle,
            middleContent = function()
                return v3.createElement(l_FitFrameVertical_0, {
                    BackgroundTransparency = 1,
                    width = UDim.new(1, 0),
                    FillDirection = Enum.FillDirection.Vertical,
                    HorizontalAlignment = Enum.HorizontalAlignment.Center,
                    VerticalAlignment = Enum.VerticalAlignment.Center,
                    contentPadding = if not v12() then UDim.new(0, v11.MODAL_NORMAL_CONTENT_PADDING) else UDim.new(0, not not l_state_0.isCondensed and v11.MODAL_CONDENSED_CONTENT_PADDING or v11.MODAL_NORMAL_CONTENT_PADDING),
                    [v3.Ref] = v20.contentRef,
                    [v3.Change.AbsoluteSize] = v20.changeContentSize
                }, {
                    ProductDetails = v3.createElement(v10, {
                        layoutOrder = 1,
                        model = l_props_0.model,
                        itemIcon = l_props_0.itemIcon,
                        itemName = l_props_0.itemName,
                        itemRobuxCost = l_props_0.itemRobuxCost,
                        itemIconWidth = if not v12() then nil else l_state_0.isCondensed and v11.CONDENSED_ICON_SIZE or nil,
                        itemIconHeight = if not v12() then nil else l_state_0.isCondensed and v11.CONDENSED_ICON_SIZE or nil
                    }),
                    Underline = v3.createElement("Frame", {
                        LayoutOrder = 2,
                        BorderSizePixel = 0,
                        BackgroundColor3 = l_Theme_0.Divider.Color,
                        BackgroundTransparency = l_Theme_0.Divider.Transparency,
                        Size = UDim2.new(1, 0, 0, 1)
                    }),
                    AdditionalBuyText = v3.createElement("TextLabel", {
                        LayoutOrder = 3,
                        BackgroundTransparency = 1,
                        Size = UDim2.new(0, v20.state.contentSize.X, 0, 0),
                        RichText = true,
                        AutomaticSize = Enum.AutomaticSize.Y,
                        TextWrapped = true,
                        Font = l_Font_0.Body.Font,
                        Text = if not v20.props.isQuest then v28 .. " " .. v29 else v28,
                        TextSize = v27,
                        TextColor3 = l_Theme_0.TextDefault.Color,
                        TextTransparency = l_Theme_0.TextDefault.Transparency
                    }),
                    Underline2 = v3.createElement("Frame", {
                        LayoutOrder = 4,
                        BorderSizePixel = 0,
                        BackgroundColor3 = l_Theme_0.Divider.Color,
                        BackgroundTransparency = l_Theme_0.Divider.Transparency,
                        Size = UDim2.new(1, 0, 0, 1)
                    }),
                    DisclosureFrame = v3.createElement(l_FitFrameVertical_0, {
                        LayoutOrder = 5,
                        BackgroundTransparency = 1,
                        width = UDim.new(1, 0),
                        FillDirection = Enum.FillDirection.Vertical,
                        HorizontalAlignment = Enum.HorizontalAlignment.Center,
                        VerticalAlignment = Enum.VerticalAlignment.Center,
                        contentPadding = UDim.new(0, 1)
                    }, {
                        DisclosurePayment = v3.createElement("TextLabel", {
                            LayoutOrder = 1,
                            BackgroundTransparency = 1,
                            AutomaticSize = Enum.AutomaticSize.XY,
                            Font = l_Font_0.Body.Font,
                            Text = if not v20.props.isQuest then v21.DisclosurePayment else v21.PurchaseNotAvailableOnHeadSet,
                            TextSize = v27,
                            TextColor3 = l_Theme_0.TextDefault.Color,
                            TextTransparency = l_Theme_0.TextDefault.Transparency
                        }),
                        DisclosureTermsFrame = if not v20.props.isQuest then v3.createElement(l_FitFrameVertical_0, {
                            LayoutOrder = 2,
                            BackgroundTransparency = 1,
                            width = UDim.new(1, 0),
                            FillDirection = Enum.FillDirection.Horizontal,
                            HorizontalAlignment = Enum.HorizontalAlignment.Center,
                            VerticalAlignment = Enum.VerticalAlignment.Center,
                            contentPadding = UDim.new(0, 1)
                        }, {
                            BeforeDisclosureText = v3.createElement("TextLabel", {
                                LayoutOrder = 0,
                                BackgroundTransparency = 1,
                                AutomaticSize = Enum.AutomaticSize.XY,
                                Font = l_Font_0.Body.Font,
                                Text = v30[1],
                                TextSize = v27,
                                TextColor3 = l_Theme_0.TextDefault.Color,
                                TextTransparency = l_Theme_0.TextDefault.Transparency
                            }),
                            TermsOfUse = v3.createElement("TextButton", {
                                LayoutOrder = 1,
                                BackgroundTransparency = 1,
                                RichText = true,
                                AutomaticSize = Enum.AutomaticSize.XY,
                                Font = l_Font_0.Body.Font,
                                Text = l_TermsOfUse_0,
                                TextSize = v27,
                                TextColor3 = l_Theme_0.TextDefault.Color,
                                TextTransparency = l_Theme_0.TextDefault.Transparency,
                                Selectable = l_props_0.termsOfUseActivated ~= nil,
                                [v3.Event.Activated] = l_props_0.termsOfUseActivated
                            }),
                            AfterDisclosureText = v3.createElement("TextLabel", {
                                LayoutOrder = 2,
                                BackgroundTransparency = 1,
                                AutomaticSize = Enum.AutomaticSize.XY,
                                Font = l_Font_0.Body.Font,
                                Text = v30[2],
                                TextSize = v27,
                                TextColor3 = l_Theme_0.TextDefault.Color,
                                TextTransparency = l_Theme_0.TextDefault.Transparency
                            })
                        }) else nil
                    })
                });
            end,
            buttonStackInfo = {
                forcedFillDirection = Enum.FillDirection.Vertical,
                marginBetween = if not v12() then v11.MODAL_NORMAL_BUTTON_MARGIN else l_state_0.isCondensed and v11.MODAL_CONDENSED_BUTTON_MARGIN or v11.MODAL_NORMAL_BUTTON_MARGIN,
                buttons = if not v20.props.isQuest then {
                    {
                        props = {
                            isDisabled = l_props_0.isDisabled,
                            onActivated = l_props_0.cancelPurchaseActivated,
                            text = v21.ButtonCancel,
                            inputIcon = l_props_0.cancelControllerIcon
                        }
                    },
                    {
                        buttonType = l_ButtonType_0.PrimarySystem,
                        props = {
                            isLoading = l_props_0.isLoading,
                            isDisabled = l_props_0.isDisabled,
                            isDelayedInput = l_props_0.isDelayedInput,
                            enableInputDelayed = l_props_0.enableInputDelayed,
                            delayInputSeconds = l_props_0.inputDelaySec,
                            onActivated = l_props_0.buyItemActivated,
                            text = if not l_props_0.enableInputDelayed then if l_props_0.robuxCostStr ~= nil then l_props_0.robuxCostStr else v21.BuyRobuxButton else v21.LoadingText,
                            inputIcon = l_props_0.buyItemControllerIcon
                        }
                    }
                } else {
                    {
                        props = {
                            isDisabled = l_props_0.isDisabled,
                            onActivated = l_props_0.cancelPurchaseActivated,
                            text = v21.ButtonCancel,
                            inputIcon = l_props_0.cancelControllerIcon
                        }
                    }
                }
            }
        });
    end);
end;
return v13;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v2 = require(l_Parent_1.Roact);
local v3 = require(l_Parent_1.RoactFitComponents);
local l_FitFrameVertical_0 = v3.FitFrameVertical;
local l_FitTextLabel_0 = v3.FitTextLabel;
local v6 = require(l_Parent_1.UIBlox);
local l_InteractiveAlert_0 = v6.App.Dialog.Alert.InteractiveAlert;
local l_ButtonType_0 = v6.App.Button.Enum.ButtonType;
local l_Images_0 = v6.App.ImageSet.Images;
local l_ImageSetLabel_0 = v6.Core.ImageSet.ImageSetLabel;
local l_IconSize_0 = v6.App.Constant.IconSize;
local l_withStyle_0 = v6.Core.Style.withStyle;
local v13 = require(l_Parent_0.Locale.MultiTextLocalizer);
local v14 = require(l_Parent_0.Generic.HumanoidViewport);
local v15 = require(l_Parent_0.Flags.getEnableHumanoidViewportItemIcon);
local v16 = l_Images_0["icons/status/imageunavailable"];
local v17 = v2.Component:extend(script.Name);
v17.defaultProps = {
    anchorPoint = Vector2.new(0.5, 0.5),
    position = UDim2.new(0.5, 0, 0.5, 0)
};
v17.init = function(v18)
    v18.contentRef = v2.createRef();
    v18.state = {
        contentSize = Vector2.new(0, 0)
    };
    v18.changeContentSize = function(v19)
        if v18.state.contentSize ~= v19.AbsoluteSize then
            v18:setState({
                contentSize = v19.AbsoluteSize
            });
        end;
    end;
end;
v17.render = function(v20)
    return v2.createElement(v13, {
        keys = {
            PurchaseSucceededTitle = {
                key = ("IAPExperience.PurchaseSuccess.%s"):format("Title.PurchaseSucceeded")
            },
            YouOwnText = {
                key = ("IAPExperience.PurchaseSuccess.%s"):format("Text.YouOwn"),
                params = {
                    name = v20.props.itemName
                }
            },
            BalanceNow = {
                key = ("IAPExperience.PurchaseSuccess.%s"):format("Text.BalanceNow")
            },
            BackToGameButtonText = {
                key = ("IAPExperience.PurchaseSuccess.%s"):format("Action.BackToGame")
            },
            EquipText = {
                key = ("IAPExperience.PurchaseSuccess.%s"):format("Action.Equip")
            },
            BackToShopText = {
                key = ("IAPExperience.PurchaseSuccess.%s"):format("Action.BackToShop")
            }
        },
        render = function(v21)
            return v20:renderAlert(v21);
        end
    });
end;
v17.renderAlert = function(v22, v23)
    local l_props_0 = v22.props;
    return l_withStyle_0(function(v25)
        local l_Theme_0 = v25.Theme;
        local l_Font_0 = v25.Font;
        local v28 = v23.YouOwnText .. " " .. v23.BalanceNow:gsub("{robux}", utf8.char(57346) .. tostring(l_props_0.balance));
        local v29 = nil;
        v29 = if not v22.props.equipActivated then {
            buttons = {
                {
                    buttonType = l_ButtonType_0.PrimarySystem,
                    props = {
                        onActivated = l_props_0.doneActivated,
                        text = v23.BackToGameButtonText,
                        inputIcon = l_props_0.confirmControllerIcon
                    }
                }
            }
        } else {
            buttons = {
                {
                    props = {
                        onActivated = l_props_0.doneActivated,
                        text = v23.BackToShopText,
                        inputIcon = l_props_0.cancelControllerIcon
                    }
                },
                {
                    buttonType = l_ButtonType_0.PrimarySystem,
                    props = {
                        onActivated = l_props_0.equipActivated,
                        text = v23.EquipText,
                        inputIcon = l_props_0.confirmControllerIcon
                    }
                }
            }
        };
        local v30 = if not l_props_0.itemIcon then v2.createElement(l_ImageSetLabel_0, {
            BackgroundTransparency = 1,
            Position = UDim2.new(0, 5, 0, 5),
            Size = UDim2.new(0, l_IconSize_0.Large, 0, l_IconSize_0.Large),
            ScaleType = Enum.ScaleType.Stretch,
            Image = v16,
            ImageColor3 = l_Theme_0.UIDefault.Color,
            ImageTransparency = l_Theme_0.UIDefault.Transparency
        }) else v2.createElement(l_ImageSetLabel_0, {
            BackgroundTransparency = 1,
            Position = UDim2.new(0, 5, 0, 5),
            Size = UDim2.new(0, 85, 0, 85),
            ScaleType = Enum.ScaleType.Stretch,
            Image = l_props_0.itemIcon,
            ImageTransparency = 0
        });
        if not (not v15() or not l_props_0.model) then
            v30 = v2.createElement(v14, {
                model = l_props_0.model,
                Position = UDim2.fromOffset(5, 5),
                Size = UDim2.fromOffset(85, 85)
            });
        end;
        return v2.createElement(l_InteractiveAlert_0, {
            screenSize = l_props_0.screenSize,
            position = l_props_0.position,
            anchorPoint = l_props_0.anchorPoint,
            title = v23.PurchaseSucceededTitle,
            middleContent = function()
                return v2.createElement(l_FitFrameVertical_0, {
                    BackgroundTransparency = 1,
                    width = UDim.new(1, 0),
                    FillDirection = Enum.FillDirection.Vertical,
                    HorizontalAlignment = Enum.HorizontalAlignment.Center,
                    VerticalAlignment = Enum.VerticalAlignment.Center,
                    contentPadding = UDim.new(0, 24),
                    [v2.Ref] = v22.contentRef,
                    [v2.Change.AbsoluteSize] = v22.changeContentSize
                }, {
                    ItemIconFrame = v2.createElement(l_FitFrameVertical_0, {
                        LayoutOrder = 0,
                        BackgroundTransparency = 1,
                        width = UDim.new(1, 0),
                        HorizontalAlignment = Enum.HorizontalAlignment.Center,
                        VerticalAlignment = Enum.VerticalAlignment.Center
                    }, {
                        ItemIcon = v30
                    }),
                    YouOwnText = v2.createElement(l_FitTextLabel_0, {
                        LayoutOrder = 1,
                        BackgroundTransparency = 1,
                        TextWrapped = true,
                        width = l_FitTextLabel_0.Width.FitToText,
                        maximumWidth = v22.state.contentSize.X,
                        Font = l_Font_0.Body.Font,
                        Text = v28,
                        TextSize = l_Font_0.BaseSize * l_Font_0.Body.RelativeSize,
                        TextColor3 = l_Theme_0.TextDefault.Color
                    })
                });
            end,
            buttonStackInfo = v29
        });
    end);
end;
return v17;


local l_HttpService_0 = game:GetService("HttpService");
local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent.Parent;
local v3 = require(l_Parent_1.Parent.Roact);
local v4 = require(l_Parent_0.BuyRobuxFlowState);
local v5 = require(l_Parent_1.Generic.Constants);
local v6 = require(l_Parent_1.Generic.LoadingOverlay);
local v7 = require(l_Parent_1.Generic.LoadingOverlayState);
local v8 = require(l_Parent_1.BuyRobux.BuyRobuxPage);
local v9 = require(l_Parent_1.Generic.PurchaseErrorPrompt);
local v10 = require(l_Parent_1.Generic.U13ConfirmPrompt);
local v11 = require(l_Parent_1.Utility.getModalShownEventData);
local v12 = require(l_Parent_1.Utility.getUserInputEventData);
local v13 = v3.Component:extend(script.Name);
v13.init = function(v14)
    local _ = v14.props;
    v14.state = {
        analyticId = l_HttpService_0:GenerateGUID(false)
    };
end;
v13.didUpdate = function(v16, v17, _)
    local l_props_1 = v16.props;
    if v17.purchaseState ~= l_props_1.purchaseState then
        v16:reportModalShown();
        v16:dispatchAndRenderModal(l_props_1);
    end;
end;
v13.dispatchAndRenderModal = function(v20, v21)
    if v21.purchaseState == v4.Error then
        v21.dispatchCentralOverlay(v5.CENTRAL_OVERLAY_TYPE_ANIMATOR, {
            shouldAnimate = v21.shouldAnimate,
            shouldShow = v21.purchaseState == v4.Error,
            renderChildren = function()
                return v3.createElement(v9, {
                    screenSize = v21.screenSize,
                    errorType = v21.errorType,
                    doneControllerIcon = v21.acceptControllerIcon,
                    doneActivated = function()
                        v20:reportUserInput("Done");
                        v21.flowComplete();
                        v21.dispatchCentralOverlay();
                    end
                });
            end
        });
        return ;
    elseif v21.purchaseState == v4.PurchaseWarning then
        v21.dispatchCentralOverlay(v5.CENTRAL_OVERLAY_TYPE_ANIMATOR, {
            shouldAnimate = v21.shouldAnimate,
            shouldShow = v21.purchaseState == v4.PurchaseWarning,
            renderChildren = function()
                return v3.createElement(v10, {
                    screenSize = v21.screenSize,
                    modalType = v21.u13ConfirmType,
                    doneActivated = function()
                        v20:reportUserInput("Confirm");
                        v21.acceptPurchaseWarning();
                        v21.dispatchCentralOverlay();
                    end,
                    cancelActivated = function()
                        v20:reportUserInput("Cancel");
                        v21.cancelPurchase();
                        v21.dispatchCentralOverlay();
                    end
                });
            end
        });
        return ;
    else
        return ;
    end;
end;
v13.reportModalShown = function(v22)
    local l_props_2 = v22.props;
    local l_state_0 = v22.state;
    if v22.props.onAnalyticEvent then
        l_props_2.onAnalyticEvent("UserPurchaseFlow", (v11(l_state_0.analyticId, "", "BuyRobux", v4.toRawValue(l_props_2.purchaseState))));
        return ;
    else
        return ;
    end;
end;
v13.reportUserInput = function(v25, v26)
    local l_props_3 = v25.props;
    local l_state_1 = v25.state;
    if v25.props.onAnalyticEvent then
        l_props_3.onAnalyticEvent("UserPurchaseFlow", (v12(l_state_1.analyticId, "", "BuyRobux", v4.toRawValue(l_props_3.purchaseState), v26)));
        return ;
    else
        return ;
    end;
end;
v13.purchaseStateToOverlayState = function(_, v30)
    if v30 == v4.Loading then
        return v7.Loading;
    elseif v30 == v4.RobuxPurchasePending then
        return v7.PurchasingRobux;
    elseif v30 == v4.RobuxGrantPending then
        return v7.WaitingForRobux;
    elseif v30 == v4.PurchaseWarning then
        return v7.None;
    elseif v30 == v4.PurchaseWarning then
        return v7.None;
    elseif v30 == v4.None then
        return v7.None;
    else
        return nil;
    end;
end;
v13.render = function(v31)
    local l_props_4 = v31.props;
    local l_state_2 = v31.state;
    local l_purchaseState_0 = l_props_4.purchaseState;
    local v35 = v31:purchaseStateToOverlayState(l_props_4.purchaseState);
    return v3.createElement("Frame", {
        Size = UDim2.new(1, 0, 1, 0),
        BackgroundTransparency = 1
    }, {
        BuyRobuxFrame = v3.createElement(v8, {
            showCloseButton = l_props_4.showCloseButton,
            showBackground = l_props_4.showBackground,
            isConsoleSize = l_props_4.isConsoleSize,
            robuxBalance = l_props_4.robuxBalance,
            robuxPackages = l_props_4.robuxPackages,
            robuxPackageActivated = function(v36)
                v31:reportUserInput("Confirm");
                l_props_4.purchaseRobux(v36);
            end,
            onPageClose = l_props_4.onPageClose,
            hasNativePurchaseSucceeded = l_purchaseState_0 == v4.Succeed,
            shouldAnimate = l_props_4.shouldAnimate,
            analyticId = l_state_2.analyticId,
            onAnalyticEvent = l_props_4.onAnalyticEvent
        }),
        LoadingOverlay = v3.createElement(v6, {
            shouldAnimate = false,
            showOverlay = v35 ~= nil,
            loadingState = v35
        })
    });
end;
return v13;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v2 = require(l_Parent_0.Utility.addRawValueMethodToEnum);
local v3 = require(l_Parent_1.enumerate);
local v4 = {
    None = "None",
    Loading = "Loading",
    BuyRobux = "BuyRobux",
    PurchaseWarning = "PurchaseWarning",
    RobuxPurchasePending = "RobuxPurchasePending",
    RobuxGrantPending = "RobuxGrantPending",
    Error = "Error",
    Succeed = "Succeed"
};
local v5 = v3(script.Name, v4);
v2(v5, v4);
return v5;


local l_HttpService_0 = game:GetService("HttpService");
local l_ContextActionService_0 = game:GetService("ContextActionService");
local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent.Parent;
local l_Parent_2 = l_Parent_1.Parent;
local v5 = require(l_Parent_2.Roact);
local l_PartialPageModal_0 = require(l_Parent_2.UIBlox).App.Dialog.Modal.PartialPageModal;
local v7 = require(l_Parent_0.PremiumUpsellFlowState);
local v8 = require(l_Parent_1.Generic.Animator);
local v9 = require(l_Parent_1.Generic.Constants);
local v10 = require(l_Parent_1.Generic.PurchaseErrorPrompt);
local v11 = require(l_Parent_1.PremiumUpsell.PremiumUpsellPrompt);
local v12 = require(l_Parent_1.Utility.getModalShownEventData);
local v13 = require(l_Parent_1.Utility.getUserInputEventData);
local v14 = require(l_Parent_1.Flags.getEnableCentralOverlayForUpsellPrompt);
local v15 = game:DefineFastFlag("CompleteFlowInStudioAccept", false);
local v16 = v5.Component:extend(script.Name);
v16.init = function(v17)
    local _ = v17.props;
    v17.state = {
        analyticId = l_HttpService_0:GenerateGUID(false)
    };
    v17.closeModal = function()
        local l_props_1 = v17.props;
        v17:reportUserInput("Cancel");
        l_props_1.cancelPurchase();
        v17:closeCentralOverlay();
        v17:UnbindActions();
    end;
end;
v16.didUpdate = function(v20, v21, _)
    local l_props_2 = v20.props;
    if v21.purchaseState ~= l_props_2.purchaseState then
        v20:reportModalShown();
        v20:dispatchCentralOverlayAndRenderModal(l_props_2);
    end;
end;
v16.UnbindActions = function(v24)
    if not (not v14() or not v24.props.dispatchCentralOverlay) then
        l_ContextActionService_0:UnbindAction(v9.CLOSE_MODAL_ACTION);
    end;
end;
v16.BindCancelAction = function(v25)
    if not (not v14() or not v25.props.dispatchCentralOverlay) then
        l_ContextActionService_0:BindAction(v9.CLOSE_MODAL_ACTION, v25.closeModal, false, Enum.KeyCode.ButtonB, Enum.KeyCode.Escape);
    end;
end;
v16.closeCentralOverlay = function(v26)
    local l_props_3 = v26.props;
    if not (not v14() or not l_props_3.dispatchCentralOverlay) then
        l_props_3.dispatchCentralOverlay();
    end;
end;
v16.constructPremiumUpsellPromptAnimatorObj = function(v28)
    local l_props_4 = v28.props;
    return {
        shouldShow = l_props_4.purchaseState == v7.PurchaseModal,
        shouldAnimate = true,
        animateDown = l_PartialPageModal_0:getMiddleContentWidth(l_props_4.screenSize.X) == 492,
        renderChildren = function()
            return v5.createElement(v11, {
                screenSize = l_props_4.screenSize,
                isCatalog = l_props_4.isCatalog,
                currencySymbol = l_props_4.currencySymbol,
                robuxPrice = l_props_4.robuxPrice,
                robuxAmount = l_props_4.robuxAmount,
                acceptControllerIcon = l_props_4.acceptControllerIcon,
                purchasePremiumActivated = function()
                    v28:reportUserInput("Subscribe");
                    l_props_4.purchasePremium();
                    if not (not v15 or not game:GetService("RunService"):IsStudio()) then
                        l_props_4.flowComplete();
                    end;
                    v28:closeCentralOverlay();
                end,
                cancelPurchaseActivated = function()
                    v28:reportUserInput("Cancel");
                    l_props_4.cancelPurchase();
                    v28:closeCentralOverlay();
                end
            });
        end
    };
end;
v16.constructPurchaseErrorPromptAnimatorObj = function(v30)
    local l_props_5 = v30.props;
    return {
        shouldShow = l_props_5.purchaseState == v7.Error,
        shouldAnimate = true,
        renderChildren = function()
            return v5.createElement(v10, {
                screenSize = l_props_5.screenSize,
                errorType = l_props_5.errorType,
                doneControllerIcon = l_props_5.acceptControllerIcon,
                doneActivated = function()
                    v30:reportUserInput("Done");
                    l_props_5.flowComplete();
                    v30:closeCentralOverlay();
                end
            });
        end
    };
end;
v16.dispatchCentralOverlayAndRenderModal = function(v32, v33)
    if v14() and v33.dispatchCentralOverlay then
        local l_purchaseState_0 = v33.purchaseState;
        if l_purchaseState_0 == v7.PurchaseModal then
            v33.dispatchCentralOverlay(v9.CENTRAL_OVERLAY_TYPE_ANIMATOR, v32:constructPremiumUpsellPromptAnimatorObj());
        end;
        if l_purchaseState_0 == v7.Error then
            v33.dispatchCentralOverlay(v9.CENTRAL_OVERLAY_TYPE_ANIMATOR, v32:constructPurchaseErrorPromptAnimatorObj());
        end;
        return ;
    else
        return ;
    end;
end;
v16.reportModalShown = function(v35)
    local l_props_6 = v35.props;
    local l_state_0 = v35.state;
    if v35.props.onAnalyticEvent then
        l_props_6.onAnalyticEvent("UserPurchaseFlow", (v12(l_state_0.analyticId, l_props_6.eventPrefix, "PremiumUpsell", v7.toRawValue(l_props_6.purchaseState))));
        return ;
    else
        return ;
    end;
end;
v16.reportUserInput = function(v38, v39)
    local l_props_7 = v38.props;
    local l_state_1 = v38.state;
    if v38.props.onAnalyticEvent then
        l_props_7.onAnalyticEvent("UserPurchaseFlow", (v13(l_state_1.analyticId, l_props_7.eventPrefix, "PremiumUpsell", v7.toRawValue(l_props_7.purchaseState), v39)));
        return ;
    else
        return ;
    end;
end;
v16.getChildrenElements = function(v42)
    local _ = v42.props;
    return {
        PremiumUpsellPromptAnimator = v5.createElement(v8, v42:constructPremiumUpsellPromptAnimatorObj()),
        PurchaseErrorPromptAnimator = v5.createElement(v8, v42:constructPurchaseErrorPromptAnimatorObj())
    };
end;
v16.render = function(v44)
    local l_props_9 = v44.props;
    local v46 = {};
    if not (v14() and l_props_9.dispatchCentralOverlay) then
        v46 = v44:getChildrenElements();
    end;
    return v5.createElement("Frame", {
        Size = UDim2.new(1, 0, 1, 0),
        BackgroundTransparency = 1
    }, v46);
end;
return v16;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v2 = require(l_Parent_0.Utility.addRawValueMethodToEnum);
local v3 = require(l_Parent_1.enumerate);
local v4 = {
    None = "None",
    PurchaseModal = "PurchaseModal",
    Error = "Error"
};
local v5 = v3(script.Name, v4);
v2(v5, v4);
return v5;


local l_HttpService_0 = game:GetService("HttpService");
local l_ContextActionService_0 = game:GetService("ContextActionService");
local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent.Parent;
local v4 = require(l_Parent_1.Parent.Roact);
local v5 = require(l_Parent_0.RobuxUpsellFlowState);
local v6 = require(l_Parent_1.Generic.Animator);
local v7 = require(l_Parent_1.Generic.Constants);
local v8 = require(l_Parent_1.Generic.LoadingOverlay);
local v9 = require(l_Parent_1.Generic.LoadingOverlayState);
local v10 = require(l_Parent_1.Generic.PurchaseErrorPrompt);
local v11 = require(l_Parent_1.Generic.U13ConfirmPrompt);
local v12 = require(l_Parent_1.Generic.TwoStepReqPrompt);
local v13 = require(l_Parent_1.Generic.InsufficientRobuxPrompt);
local v14 = require(l_Parent_1.ProductPurchaseRobuxUpsell.InsufficientRobuxProductPrompt);
local v15 = require(l_Parent_1.Generic.LeaveRobloxPrompt);
local v16 = require(l_Parent_1.ProductPurchaseRobuxUpsell.RobuxUpsellSuccessPrompt);
local v17 = require(l_Parent_1.ProductPurchaseRobuxUpsell.RobuxUpsellPrompt);
local v18 = require(l_Parent_1.Utility.getModalShownEventData);
local v19 = require(l_Parent_1.Utility.getUserInputEventData);
local v20 = require(l_Parent_1.Flags.getEnableCentralOverlayForUpsellPrompt);
local v21 = v4.Component:extend(script.Name);
v21.init = function(v22)
    v22.state = {
        analyticId = l_HttpService_0:GenerateGUID(false),
        isDelayedInput = v22.props.isDelayedInput,
        enableInputDelayed = false
    };
    v22.closeModal = function()
        local l_props_0 = v22.props;
        v22:reportUserInput("Cancel");
        l_props_0.cancelPurchase();
        v22:closeCentralOverlay();
        v22:UnbindActions();
    end;
end;
v21.didUpdate = function(v24, v25, _)
    local l_props_1 = v24.props;
    if v25.purchaseState ~= l_props_1.purchaseState then
        v24:reportModalShown();
        v24:dispatchCentralOverlayAndRenderModal(l_props_1);
    end;
end;
v21.UnbindActions = function(v28)
    if not (not v20() or not v28.props.dispatchCentralOverlay) then
        l_ContextActionService_0:UnbindAction(v7.CLOSE_MODAL_ACTION);
    end;
end;
v21.BindCancelAction = function(v29)
    if not (not v20() or not v29.props.dispatchCentralOverlay) then
        l_ContextActionService_0:BindAction(v7.CLOSE_MODAL_ACTION, v29.closeModal, false, Enum.KeyCode.ButtonB, Enum.KeyCode.Escape);
    end;
end;
v21.closeCentralOverlay = function(v30)
    local l_props_2 = v30.props;
    if not (not v20() or not l_props_2.dispatchCentralOverlay) then
        l_props_2.dispatchCentralOverlay();
    end;
end;
v21.constructRobuxUpsellPromptAnimatorObj = function(v32)
    local l_props_3 = v32.props;
    local l_state_0 = v32.state;
    v32:BindCancelAction();
    return {
        shouldAnimate = l_props_3.shouldAnimate,
        shouldShow = l_props_3.purchaseState == v5.PurchaseModal,
        onShown = not not l_props_3.isDelayedInput and function()
            v32:setState({
                enableInputDelayed = true
            });
            delay(3, function()
                v32:setState({
                    isDelayedInput = false,
                    enableInputDelayed = false
                });
                if l_props_3.onDelayedInputComplete then
                    l_props_3.onDelayedInputComplete();
                end;
            end);
        end or nil,
        onHidden = not not l_props_3.isDelayedInput and function()
            v32:setState({
                isDelayedInput = l_props_3.isDelayedInput,
                enableInputDelayed = false
            });
        end or nil,
        renderChildren = function()
            return v4.createElement(v17, {
                screenSize = l_props_3.screenSize,
                isDelayedInput = l_state_0.isDelayedInput,
                enableInputDelayed = l_state_0.enableInputDelayed,
                model = l_props_3.model,
                itemIcon = l_props_3.itemIcon,
                itemName = l_props_3.itemName,
                itemRobuxCost = l_props_3.itemRobuxCost,
                robuxCostStr = l_props_3.iapCostStr,
                robuxPurchaseAmount = l_props_3.iapRobuxAmount,
                balanceAmount = l_props_3.beforeRobuxBalance,
                buyItemControllerIcon = l_props_3.acceptControllerIcon,
                cancelControllerIcon = l_props_3.cancelControllerIcon,
                buyItemActivated = function()
                    v32:reportUserInput("Buy");
                    l_props_3.purchaseRobux();
                    v32:closeCentralOverlay();
                end,
                cancelPurchaseActivated = function()
                    v32:reportUserInput("Cancel");
                    l_props_3.cancelPurchase();
                    v32:closeCentralOverlay();
                end,
                termsOfUseActivated = not not l_props_3.showTermsOfUse and function()
                    v32:reportUserInput("TermsOfService");
                    l_props_3.showTermsOfUse();
                end or nil,
                isQuest = v32.props.isQuest
            });
        end
    };
end;
v21.constructU13ConfirmPromptAnimatorObj = function(v35)
    local l_props_4 = v35.props;
    v35:BindCancelAction();
    return {
        shouldAnimate = l_props_4.shouldAnimate,
        shouldShow = l_props_4.purchaseState == v5.PurchaseWarning,
        renderChildren = function()
            return v4.createElement(v11, {
                screenSize = l_props_4.screenSize,
                modalType = l_props_4.u13ConfirmType,
                doneControllerIcon = l_props_4.acceptControllerIcon,
                cancelControllerIcon = l_props_4.cancelControllerIcon,
                doneActivated = function()
                    v35:reportUserInput("Confirm");
                    l_props_4.acceptPurchaseWarning();
                    v35:closeCentralOverlay();
                end,
                cancelActivated = function()
                    v35:reportUserInput("Cancel");
                    l_props_4.cancelPurchase();
                    v35:closeCentralOverlay();
                end
            });
        end
    };
end;
v21.constructPurchaseErrorPromptAnimatorObj = function(v37)
    local l_props_5 = v37.props;
    v37:BindCancelAction();
    return {
        shouldAnimate = l_props_5.shouldAnimate,
        shouldShow = l_props_5.purchaseState == v5.Error,
        renderChildren = function()
            return v4.createElement(v10, {
                screenSize = l_props_5.screenSize,
                errorType = l_props_5.errorType,
                doneControllerIcon = l_props_5.acceptControllerIcon,
                doneActivated = function()
                    v37:reportUserInput("Done");
                    l_props_5.flowComplete();
                    v37:closeCentralOverlay();
                end
            });
        end
    };
end;
v21.constructTwoStepRequiredAnimatorObj = function(v39)
    local l_props_6 = v39.props;
    v39:BindCancelAction();
    return {
        shouldAnimate = l_props_6.shouldAnimate,
        shouldShow = l_props_6.purchaseState == v5.TwoStepRequired,
        renderChildren = function()
            return v4.createElement(v12, {
                screenSize = l_props_6.screenSize,
                doneControllerIcon = l_props_6.acceptControllerIcon,
                openSecuritySettings = function()
                    v39:reportUserInput("GoToSecuritySettings");
                    l_props_6.openSecuritySettings();
                    l_props_6.flowComplete();
                    v39:closeCentralOverlay();
                end,
                closePrompt = function()
                    v39:reportUserInput("Cancel");
                    l_props_6.flowComplete();
                    v39:closeCentralOverlay();
                end
            });
        end
    };
end;
v21.constructRobuxUpsellSuccessPromptAnimatorObj = function(v41)
    local l_props_7 = v41.props;
    v41:BindCancelAction();
    return {
        shouldAnimate = l_props_7.shouldAnimate,
        shouldShow = l_props_7.purchaseState == v5.Success,
        renderChildren = function()
            return v4.createElement(v16, {
                screenSize = l_props_7.screenSize,
                model = l_props_7.model,
                itemIcon = l_props_7.itemIcon,
                itemName = l_props_7.itemName,
                balance = (l_props_7.iapRobuxAmount + l_props_7.beforeRobuxBalance) - l_props_7.itemRobuxCost,
                confirmControllerIcon = l_props_7.acceptControllerIcon,
                cancelControllerIcon = l_props_7.cancelControllerIcon,
                doneActivated = function()
                    v41:reportUserInput("Done");
                    l_props_7.flowComplete();
                    v41:closeCentralOverlay();
                end,
                equipActivated = not not l_props_7.equipItem and function()
                    v41:reportUserInput("Equip");
                    l_props_7.equipItem();
                    v41:closeCentralOverlay();
                end or nil
            });
        end
    };
end;
v21.constructInsufficientRobuxAnimatorObj = function(v43)
    local l_props_8 = v43.props;
    v43:BindCancelAction();
    return {
        shouldAnimate = l_props_8.shouldAnimate,
        shouldShow = l_props_8.purchaseState == v5.GenericPurchaseModal,
        renderChildren = function()
            return v4.createElement(v13, {
                screenSize = l_props_8.screenSize,
                robuxBalance = l_props_8.beforeRobuxBalance,
                buyRobux = function()
                    v43:reportUserInput("Buy Robux");
                    l_props_8.openBuyRobux();
                    l_props_8.flowComplete();
                    v43:closeCentralOverlay();
                end,
                closePrompt = function()
                    v43:reportUserInput("Cancel");
                    l_props_8.flowComplete();
                    v43:closeCentralOverlay();
                end
            });
        end
    };
end;
v21.constructInsufficientRobuxProductAnimatorObj = function(v45)
    local l_props_9 = v45.props;
    v45:BindCancelAction();
    return {
        shouldAnimate = l_props_9.shouldAnimate,
        shouldShow = l_props_9.purchaseState == v5.LargeRobuxPurchaseModal,
        renderChildren = function()
            return v4.createElement(v14, {
                screenSize = l_props_9.screenSize,
                model = l_props_9.model,
                itemIcon = l_props_9.itemIcon,
                itemName = l_props_9.itemName,
                itemRobuxCost = l_props_9.itemRobuxCost,
                balanceAmount = l_props_9.beforeRobuxBalance,
                acceptControllerIcon = l_props_9.acceptControllerIcon,
                cancelControllerIcon = l_props_9.cancelControllerIcon,
                robuxStoreActivated = function()
                    v45:reportUserInput("Go to Robux store");
                    l_props_9.openBuyRobux();
                    v45:closeCentralOverlay();
                end,
                cancelPurchaseActivated = function()
                    v45:reportUserInput("Cancel");
                    l_props_9.flowComplete();
                    v45:closeCentralOverlay();
                end
            });
        end
    };
end;
v21.constructLeaveRobloxPromptAnimatorObj = function(v47)
    local l_props_10 = v47.props;
    v47:BindCancelAction();
    return {
        shouldAnimate = l_props_10.shouldAnimate,
        shouldShow = l_props_10.purchaseState == v5.LeaveRobloxWarning,
        renderChildren = function()
            return v4.createElement(v15, {
                screenSize = l_props_10.screenSize,
                cancelActivated = function()
                    v47:closeCentralOverlay();
                end,
                continueActivated = function()
                    l_props_10.openVngShop();
                end
            });
        end
    };
end;
v21.dispatchCentralOverlayAndRenderModal = function(v49, v50)
    if v20() and v50.dispatchCentralOverlay then
        local l_purchaseState_0 = v50.purchaseState;
        if l_purchaseState_0 == v5.PurchaseModal then
            v50.dispatchCentralOverlay(v7.CENTRAL_OVERLAY_TYPE_ANIMATOR, v49:constructRobuxUpsellPromptAnimatorObj());
            return ;
        else
            if l_purchaseState_0 == v5.PurchaseWarning then
                v50.dispatchCentralOverlay(v7.CENTRAL_OVERLAY_TYPE_ANIMATOR, v49:constructU13ConfirmPromptAnimatorObj());
            end;
            if l_purchaseState_0 == v5.Error then
                v50.dispatchCentralOverlay(v7.CENTRAL_OVERLAY_TYPE_ANIMATOR, v49:constructPurchaseErrorPromptAnimatorObj());
            end;
            if l_purchaseState_0 == v5.TwoStepRequired then
                v50.dispatchCentralOverlay(v7.CENTRAL_OVERLAY_TYPE_ANIMATOR, v49:constructTwoStepRequiredAnimatorObj());
            end;
            if l_purchaseState_0 == v5.Success then
                v50.dispatchCentralOverlay(v7.CENTRAL_OVERLAY_TYPE_ANIMATOR, v49:constructRobuxUpsellSuccessPromptAnimatorObj());
            end;
            if l_purchaseState_0 == v5.GenericPurchaseModal then
                v50.dispatchCentralOverlay(v7.CENTRAL_OVERLAY_TYPE_ANIMATOR, v49:constructInsufficientRobuxAnimatorObj());
            end;
            if l_purchaseState_0 == v5.LargeRobuxPurchaseModal then
                v50.dispatchCentralOverlay(v7.CENTRAL_OVERLAY_TYPE_ANIMATOR, v49:constructInsufficientRobuxProductAnimatorObj());
            end;
            if l_purchaseState_0 == v5.LeaveRobloxWarning then
                v50.dispatchCentralOverlay(v7.CENTRAL_OVERLAY_TYPE_ANIMATOR, v49:constructLeaveRobloxPromptAnimatorObj());
            end;
            return ;
        end;
    else
        return ;
    end;
end;
v21.reportModalShown = function(v52)
    local l_props_11 = v52.props;
    local l_state_1 = v52.state;
    if v52.props.onAnalyticEvent then
        l_props_11.onAnalyticEvent("UserPurchaseFlow", (v18(l_state_1.analyticId, l_props_11.eventPrefix, "RobuxUpsell", v5.toRawValue(l_props_11.purchaseState))));
        return ;
    else
        return ;
    end;
end;
v21.reportUserInput = function(v55, v56)
    local l_props_12 = v55.props;
    local l_state_2 = v55.state;
    if v55.props.onAnalyticEvent then
        l_props_12.onAnalyticEvent("UserPurchaseFlow", (v19(l_state_2.analyticId, l_props_12.eventPrefix, "RobuxUpsell", v5.toRawValue(l_props_12.purchaseState), v56)));
        return ;
    else
        return ;
    end;
end;
v21.purchaseStateToOverlayState = function(_, v60)
    if v60 == v5.Loading then
        return v9.Loading;
    elseif v60 == v5.RobuxPurchasePending then
        return v9.PurchasingRobux;
    elseif v60 == v5.RobuxGrantPending then
        return v9.WaitingForRobux;
    elseif v60 == v5.ItemPurchasePending then
        return v9.PurchasingItem;
    elseif v60 == v5.None then
        return nil;
    else
        return v9.None;
    end;
end;
v21.getChildrenElements = function(v61)
    local _ = v61.props;
    return {
        RobuxUpsellPromptAnimator = v4.createElement(v6, v61:constructRobuxUpsellPromptAnimatorObj()),
        U13ConfirmPromptAnimator = v4.createElement(v6, v61:constructU13ConfirmPromptAnimatorObj()),
        PurchaseErrorPromptAnimator = v4.createElement(v6, v61:constructPurchaseErrorPromptAnimatorObj()),
        TwoStepRequiredAnimator = v4.createElement(v6, v61:constructTwoStepRequiredAnimatorObj()),
        RobuxUpsellSuccessPromptAnimator = v4.createElement(v6, v61:constructRobuxUpsellSuccessPromptAnimatorObj()),
        InsufficientRobuxAnimator = v4.createElement(v6, v61:constructInsufficientRobuxAnimatorObj()),
        InsufficientRobuxProductAnimator = v4.createElement(v6, v61:constructInsufficientRobuxProductAnimatorObj())
    };
end;
v21.render = function(v63)
    local l_props_14 = v63.props;
    local v65 = {};
    if not (v20() and l_props_14.dispatchCentralOverlay) then
        v65 = v63:getChildrenElements();
    end;
    return v4.createElement(v8, {
        shouldAnimate = l_props_14.shouldAnimate,
        loadingState = v63:purchaseStateToOverlayState(l_props_14.purchaseState)
    }, v65);
end;
return v21;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v2 = require(l_Parent_0.Utility.addRawValueMethodToEnum);
local v3 = require(l_Parent_1.enumerate);
local v4 = {
    None = "None",
    Loading = "Loading",
    PurchaseModal = "PurchaseModal",
    GenericPurchaseModal = "GenericPurchaseModal",
    LargeRobuxPurchaseModal = "LargeRobuxPurchaseModal",
    PurchaseWarning = "PurchaseWarning",
    TwoStepRequired = "TwoStepRequired",
    RobuxPurchasePending = "RobuxPurchasePending",
    RobuxGrantPending = "RobuxGrantPending",
    ItemPurchasePending = "ItemPurchasePending",
    Success = "Success",
    LeaveRobloxWarning = "LeaveRobloxWarning",
    Error = "Error"
};
local v5 = v3(script.Name, v4);
v2(v5, v4);
return v5;


local l_HttpService_0 = game:GetService("HttpService");
local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent.Parent;
local l_Parent_2 = l_Parent_1.Parent;
local v4 = require(l_Parent_2.Roact);
local l_PartialPageModal_0 = require(l_Parent_2.UIBlox).App.Dialog.Modal.PartialPageModal;
local v6 = require(l_Parent_0.SubscriptionPurchaseFlowState);
local v7 = require(l_Parent_1.Generic.Animator);
local v8 = require(l_Parent_1.Generic.PurchaseErrorPrompt);
local v9 = require(l_Parent_1.Subscription.SubscriptionPurchasePrompt);
local v10 = require(l_Parent_1.Flags.getEnableSubscriptionPurchaseInstrumentation);
local v11 = require(l_Parent_1.Utility.formatSubscriptionPurchaseEventData);
local v12 = require(l_Parent_1.Flags.GetFFlagEnableRobloxCreditPurchase);
local v13 = v4.Component:extend(script.Name);
local v14 = require(l_Parent_1.Generic.PurchaseFlowType);
v13.init = function(v15)
    v15.state = {
        analyticId = l_HttpService_0:GenerateGUID(false)
    };
end;
v13.didUpdate = function(v16, v17, _)
    if not (not (v17.purchaseState ~= v16.props.purchaseState) or not v10()) then
        v16:reportPurchaseEvent("ViewShown");
    end;
end;
v13.reportUserInput = function(v19, v20)
    if v10() then
        v19:reportPurchaseEvent("UserInput", v20);
        return ;
    else
        return ;
    end;
end;
v13.reportPurchaseEvent = function(v21, v22, v23)
    if v10() then
        local l_props_0 = v21.props;
        local _ = v21.state;
        if v21.props.onAnalyticEvent then
            l_props_0.onAnalyticEvent("SubscriptionPurchase", (v11(v21.state.analyticId, v22, v6.toRawValue(l_props_0.purchaseState), v23, l_props_0.subscriptionProviderId, l_props_0.subscriptionId, l_props_0.name, l_props_0.description, l_props_0.period, l_props_0.priceTier, l_props_0.displayPrice)));
            return ;
        else
            return ;
        end;
    else
        return ;
    end;
end;
v13.render = function(v26)
    local l_props_1 = v26.props;
    local l_purchaseState_0 = l_props_1.purchaseState;
    return v4.createElement("Frame", {
        Size = UDim2.new(1, 0, 1, 0),
        BackgroundTransparency = 1
    }, {
        SubscriptionPurchasePromptAnimator = v4.createElement(v7, {
            shouldShow = l_purchaseState_0 == v6.PurchaseModal,
            shouldAnimate = true,
            animateDown = l_PartialPageModal_0:getMiddleContentWidth(l_props_1.screenSize.X) == 492,
            renderChildren = function()
                return v4.createElement(v9, {
                    name = l_props_1.name,
                    subscriptionProviderName = l_props_1.subscriptionProviderName,
                    displayPrice = l_props_1.displayPrice,
                    period = l_props_1.period,
                    disclaimerText = l_props_1.disclaimerText,
                    description = l_props_1.description,
                    itemIcon = l_props_1.itemIcon,
                    primaryPaymentMethod = if not v12() then nil else l_props_1.primaryPaymentMethod,
                    secondaryPaymentMethod = if not v12() then nil else l_props_1.secondaryPaymentMethod,
                    isTestingMode = l_props_1.isTestingMode,
                    screenSize = l_props_1.screenSize,
                    purchaseSubscriptionActivated = function(v29)
                        v26:reportUserInput("Subscribe");
                        l_props_1.purchaseSubscription(v29);
                        if l_props_1.isTestingMode then
                            l_props_1.flowComplete();
                        end;
                    end,
                    cancelPurchaseActivated = function()
                        v26:reportUserInput("Cancel");
                        l_props_1.cancelPurchase();
                    end
                });
            end
        }),
        PurchaseErrorPromptAnimator = v4.createElement(v7, {
            shouldShow = l_purchaseState_0 == v6.Error,
            shouldAnimate = true,
            renderChildren = function()
                return v4.createElement(v8, {
                    screenSize = l_props_1.screenSize,
                    errorType = l_props_1.errorType,
                    flowType = v14.Subscription,
                    doneControllerIcon = l_props_1.acceptControllerIcon,
                    doneActivated = function()
                        v26:reportUserInput("Done");
                        l_props_1.flowComplete();
                    end
                });
            end
        })
    });
end;
return v13;