2026-07-27 11:26:19 +00:00
|
|
|
// Module ID: 12366
|
|
|
|
|
// Function ID: 96150
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: useFormatStringWithCommonPremiumParams
|
2026-07-25 08:10:48 +00:00
|
|
|
// Dependencies: [3782, 1852, 566, 3777, 5616, 1212, 1921, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: getHelpArticleLinkProps, useFormatStringWithCommonPremiumParams
|
|
|
|
|
|
2026-07-27 11:26:19 +00:00
|
|
|
// Module 12366 (useFormatStringWithCommonPremiumParams)
|
2026-07-23 10:11:24 +00:00
|
|
|
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
|
|
|
|
|
import GuildFeatures from "GuildFeatures";
|
|
|
|
|
|
|
|
|
|
let closure_4;
|
|
|
|
|
let closure_5;
|
|
|
|
|
const require = arg1;
|
|
|
|
|
({ PremiumSubscriptionSKUs: closure_4, SubscriptionPlans: closure_5 } = GuildFeatures);
|
|
|
|
|
const result = require("initialize").fileFinishedImporting("modules/premium/promotions/PromotionStringUtils.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export const useFormatStringWithCommonPremiumParams = function useFormatStringWithCommonPremiumParams(body) {
|
|
|
|
|
let str = "...";
|
2026-07-23 10:11:24 +00:00
|
|
|
const items = [_isNativeReflectConstruct];
|
|
|
|
|
const stateFromStores = require(566) /* initialize */.useStateFromStores(items, () => outer1_3.isLoadedForSKU(outer1_4.TIER_2));
|
2026-07-20 16:05:17 +00:00
|
|
|
if (-1 !== body.indexOf("{price}")) {
|
|
|
|
|
if (stateFromStores) {
|
2026-07-25 08:10:48 +00:00
|
|
|
const defaultPrice = importDefault(3777).getDefaultPrice(PREMIUM_MONTH_TIER_2.PREMIUM_MONTH_TIER_2);
|
|
|
|
|
const obj2 = importDefault(3777);
|
2026-07-24 07:16:23 +00:00
|
|
|
str = require(5616) /* formatSingleCurrencyPrice */.formatPrice(defaultPrice.amount, defaultPrice.currency);
|
|
|
|
|
const obj3 = require(5616) /* formatSingleCurrencyPrice */;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const replaced = body.replace(/\{price\}/g, str);
|
|
|
|
|
};
|
|
|
|
|
export const getHelpArticleLinkProps = function getHelpArticleLinkProps(helpArticle, helpArticleId) {
|
|
|
|
|
let id;
|
|
|
|
|
if (null != helpArticle) {
|
|
|
|
|
id = helpArticle.id;
|
|
|
|
|
}
|
|
|
|
|
id = helpArticleId;
|
|
|
|
|
if (null != id) {
|
|
|
|
|
id = helpArticleId;
|
|
|
|
|
if ("" !== helpArticle.id) {
|
|
|
|
|
id = helpArticle.id;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ("" === id) {
|
|
|
|
|
return null;
|
|
|
|
|
} else {
|
|
|
|
|
let linkText;
|
|
|
|
|
if (null != helpArticle) {
|
|
|
|
|
linkText = helpArticle.linkText;
|
|
|
|
|
}
|
|
|
|
|
if (null != linkText) {
|
|
|
|
|
if ("" !== helpArticle.linkText) {
|
|
|
|
|
linkText = helpArticle.linkText;
|
|
|
|
|
}
|
2026-07-25 08:10:48 +00:00
|
|
|
const obj = { url: importDefault(1921).getArticleURL(id), linkText };
|
2026-07-20 16:05:17 +00:00
|
|
|
return obj;
|
|
|
|
|
}
|
2026-07-23 10:11:24 +00:00
|
|
|
const intl = require(1212) /* getSystemLocale */.intl;
|
|
|
|
|
linkText = intl.string(require(1212) /* getSystemLocale */.t["sBp+u0"]);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
};
|