/* Metro module 12266; source: components_native/premium/PremiumSubscriptionUpsell.tsx; dependencies: [31, 27, 1949, 1878, 661, 7047, 1880, 33, 4501, 697, 4064, 1244, 1856, 566, 3802, 4589, 676, 4573, 12267, 12268, 7971, 4578, 2] */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import LocaleStore from '../../modules/user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as ConstantsIOSModule from '../../ConstantsIOS.tsx'; /* Metro dependency 676 */
import * as CheckmarkLargeIconModule from '../../design/components/Icon/native/redesign/generated/CheckmarkLargeIcon.tsx'; /* Metro dependency 4064 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ColorConstantsModule from '../../modules/colors/native/ColorConstants.tsx'; /* Metro dependency 7047 */
function _fun93740(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12452:6, offset: 0x020c16f1, size: 692 bytes, params: 8, frame: 26
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.View;
const env0_4 = value.Image;
const StyleSheet = value.StyleSheet;
const Fonts = (ConstantsModule).Fonts;
value = require(1880) /* metro dependency 1880: PremiumConstants */;
const env0_8 = value.NUM_FREE_GUILD_BOOSTS_WITH_PREMIUM;
const env0_9 = value.GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.Fragment;
const env0_12 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object = {};
object.title = {textAlign: 'center'};
object.subtitle = {'lineHeight': 20, 'marginTop': 8, 'textAlign': 'center'};
const object3 = {paddingTop: 32};
object3.borderTopWidth = 2 * StyleSheet.hairlineWidth;
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object3.borderTopColor = BORDER_SUBTLE;
object.upsell = object3;
const object4 = {'borderRadius': null, 'padding': 16, 'alignItems': 'center'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.upsellCard = object4;
const object5 = {'borderRadius': null, 'padding': 16, 'marginTop': 12, 'alignSelf': 'stretch'};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object5.backgroundColor = BORDER_SUBTLE;
object.upsellFeatures = object5;
object.upsellFeatureSubLogo = {'alignSelf': 'center', 'height': 10, 'width': 54};
object.upsellFeatureList = {marginTop: 8};
object.upsellButton = {marginTop: 16};
object.upsellFeatureLogoTier2 = {'alignSelf': 'center', 'height': 20, 'marginTop': 6, 'width': 84};
let WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
object.upsellLabel = {color: WHITE, fontFamily: PRIMARY_SEMIBOLD, fontSize: 16, lineHeight: 20};
WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
object.upsellRow = {'paddingVertical': 0, 'marginTop': 8, color: WHITE};
const env0_13 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/PremiumSubscriptionUpsell.tsx');
exports.default = PremiumSubscriptionUpsell;
function PremiumSubscriptionUpsell({onLearnMorePremium, style}) { // fn#93741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12452:1155, offset: 0x020c19a5, size: 1263 bytes, params: 2, frame: 43
var r9;
var r0;
var defaultImport2;
const HorizontalGradient = (ConstantsIOSModule).HorizontalGradient;
var defaultImport3;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var jsxRuntimeEnv0_11Binding;
var items2;
var items3;
var items4;
var PremiumFeatureList;
var object3;
const CheckmarkLargeIcon = (CheckmarkLargeIconModule).CheckmarkLargeIcon;
var formatToPlainString;
var P3aEj6;
var moduleValue2;
var unsafe_rawColors;
var WHITE;
var items5;
var object4;
const styles = useStyles();
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
if ((importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUsePremiumGuildMemberProfile(currentUser)) {
r0 = null;
} else {
var viewBindingProps = {style: [styles.upsell, style]};
defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
var defaultImport2Props2 = {style: styles.upsellCard, start: HorizontalGradient.START,
end: HorizontalGradient.END,
colors: Gradients.PREMIUM_GUILD};
defaultImport3 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
if (defaultImport3.isPremium(currentUser)) {
jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
items2 = [
{intl.string(t.YYfHlx)}
,
];
items2[1] = (
{intl.format(t.Af0zEZ, {numFreeGuildSubscriptions: NUM_FREE_GUILD_BOOSTS_WITH_PREMIUM})}
);
r9 = (
<>
{items2}
>
);
} else {
r9 = (
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['qUl+K4'])}
);
}
items3 = [r9];
var viewBinding2Props = {style: styles.upsellFeatures};
items4 = [
,
];
items4[1] = ;
PremiumFeatureList = importDefault(7971) /* metro dependency 7971: PremiumFeatureList */;
var defaultImport4Props = {style: styles.upsellFeatureList};
object3 = {};
object3.IconComponent = CheckmarkLargeIcon;
formatToPlainString = intl.formatToPlainString;
P3aEj6 = t.P3aEj6;
moduleValue2 = require(1856) /* metro dependency 1856: NumberUtils */;
object3.label = Reflect.apply(formatToPlainString, intl, [P3aEj6,
{discountPercentage: moduleValue2.formatPercent(LocaleStore.locale,
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100)}]);
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
WHITE = unsafe_rawColors.WHITE;
object3.color = WHITE;
items5 = [object3];
object4 = {};
object4.IconComponent = CheckmarkLargeIcon;
object4.label = intl.formatToPlainString(t.Ntlzbd,
{numFreeGuildSubscriptions: NUM_FREE_GUILD_BOOSTS_WITH_PREMIUM});
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
WHITE = unsafe_rawColors.WHITE;
object4.color = WHITE;
items5[1] = object4;
defaultImport4Props.features = items5;
defaultImport4Props.labelStyle = styles.upsellLabel;
defaultImport4Props.rowStyle = styles.upsellRow;
items4[2] = ;
items3[1] = (
{items4}
);
items3[2] = (
{((Button) => )((require(4578) /* metro dependency 4578: ButtonNative */).Button)}
);
r0 = (
{((Component) => {items3})(defaultImport2)}
);
}
return r0;
}
}
global.__d(_fun93740, 12266, [31, 27, 1949, 1878, 661, 7047, 1880, 33, 4501, 697, 4064, 1244, 1856, 566, 3802, 4589,
676, 4573, 12267, 12268, 7971, 4578,
2]) /* metro module 12266, dependencies: [31, 27, 1949, 1878, 661, 7047, 1880, 33, 4501, 697, 4064, 1244, 1856, 566, 3802, 4589, 676, 4573, 12267, 12268, 7971, 4578, 2] */;