/* Metro module 12250; source: components_native/premium/GuildBoostingUpsell.tsx; dependencies: [31, 27, 4896, 1880, 33, 4501, 697, 12229, 1244, 7958, 12251, 12252, 12254, 9097, 12255, 7950, 12256, 10976, 12257, 10319, 12258, 7948, 12259, 8633, 566, 7563, 12260, 4048, 7522, 4002, 7531, 7532, 4573, 7971, 12264, 12265, 12266, 2] */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseTheme from '../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import SortedGuildStore from '../../stores/SortedGuildStore.tsx'; /* Metro dependency 4896 */
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 IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as PremiumConstantsModule from '../../modules/premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as UseSubscriptionPlansLoadedModule from '../../modules/billing/hooks/useSubscriptionPlansLoaded.tsx'; /* Metro dependency 7563 */
import * as BoostGemIconModule from '../../design/components/Icon/native/redesign/generated/BoostGemIcon.tsx'; /* Metro dependency 7958 */
import * as ShieldUserIconModule from '../../design/components/Icon/native/redesign/generated/ShieldUserIcon.tsx'; /* Metro dependency 9097 */
import * as BoostTier3IconModule from '../../design/components/Icon/native/redesign/generated/BoostTier3Icon.tsx'; /* Metro dependency 12252 */
import * as GuildSubscriptionNoGuildsModule from '../../design/components/Illustration/native/redesign/generated/GuildSubscriptionNoGuilds.tsx'; /* Metro dependency 12260 */
function _fun93697(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12436:6, offset: 0x020bf57b, size: 489 bytes, params: 8, frame: 25
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
ReactModule;
let value = ReactNativeModule;
const StyleSheet = value.StyleSheet;
const env0_3 = value.View;
const env0_4 = value.Image;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object2 = {'marginTop': 32, 'paddingTop': 16};
object2.borderTopWidth = 2 * StyleSheet.hairlineWidth;
const BORDER_SUBTLE = (Native).colors.BORDER_SUBTLE;
object2.borderTopColor = BORDER_SUBTLE;
const env0_9 = Reflect.apply(createStyles, value, [{root: {'paddingHorizontal': 16, 'paddingVertical': 32},
title: {marginTop: 16}, features: {marginTop: 16}, cardText: {'lineHeight': 20, 'marginTop': 8,
'textAlign': 'center'}, guildList: {marginTop: 16}, logoPremiumGuild: {'resizeMode': 'contain', 'width': '100%',
'height': 34, 'maxWidth': 320, 'marginTop': 16}, imgPremiumGuild: {'width': 95, 'height': 65},
imgNoGuilds: {'width': 178, 'height': 112, 'marginTop': 32}, header: {alignItems: 'center'}, upsell: object2,
subscriptionUpsell: {marginTop: 32}}]);
const FEATURES_PREMIUM_GUILD_USER2 = FEATURES_PREMIUM_GUILD_USER;
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/GuildBoostingUpsell.tsx');
exports.default = GuildBoostingUpsell;
exports.FEATURES_PREMIUM_GUILD_USER = FEATURES_PREMIUM_GUILD_USER2;
function FEATURES_PREMIUM_GUILD_USER() { // fn#93698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12436:796, offset: 0x020bf764, size: 350 bytes, params: 1, frame: 19
let object = {};
object.icon = importDefault(12229) /* metro dependency 12229 */;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
object.label = Reflect.apply(string, intl, [t['GS+bL0']]);
const BoostGemIcon = (BoostGemIconModule).BoostGemIcon;
object.IconComponent = BoostGemIcon;
const GUILD_BOOSTING_PINK = (Native).unsafe_rawColors.GUILD_BOOSTING_PINK;
object.color = GUILD_BOOSTING_PINK;
const items2 = [object];
object = {icon: importDefault(12251) /* metro dependency 12251 */};
object.label = intl.string(t.a7LWeM);
object.IconComponent = IconComponent;
items2[1] = object;
object = {icon: importDefault(12254) /* metro dependency 12254 */};
string = intl.string;
const E76jz8 = t.E76jz8;
object.label = Reflect.apply(string, intl, [E76jz8]);
const YELLOW_300 = (Native).unsafe_rawColors.YELLOW_300;
object.color = YELLOW_300;
const ShieldUserIcon = (ShieldUserIconModule).ShieldUserIcon;
object.IconComponent = ShieldUserIcon;
items2[2] = object;
return items2;
function IconComponent(a0) { // fn#93699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12436:1022, owner: FEATURES_PREMIUM_GUILD_USER.IconComponent, offset: 0x020bf8c2, size: 91 bytes, params: 2, frame: 16
const BoostTier3Icon = (BoostTier3IconModule).BoostTier3Icon;
const boostTier3IconProps = {...a0};
const GUILD_BOOSTING_PINK = (Native).unsafe_rawColors.GUILD_BOOSTING_PINK;
boostTier3IconProps['color'] = GUILD_BOOSTING_PINK;
return ;
}
}
function GuildBoostingUpsell({onLearnMorePremium, fractionalState, isInReverseTrial, hasAvailableSlots}) { // fn#93700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12436:1258, offset: 0x020bf91d, size: 2157 bytes, params: 2, frame: 40
var r10;
var r13;
var r0;
var items6;
const Text = (TextModule).Text;
var title;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var cardText;
var items2;
var defaultImport3;
var features;
var defaultImport4;
var object8;
var object9;
var unsafe_rawColors;
var items3;
var object10;
var object11;
var object12;
var object13;
var value9;
var items4;
var object14;
var items5;
var items7;
var value;
const styles = useStyles();
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SortedGuildStore], function() {
return SortedGuildStore.getFlattenedGuildIds().length > 0;
});
const value3 = (UseSubscriptionPlansLoadedModule).useSubscriptionPlansLoaded();
const value4 = (GuildSubscriptionNoGuildsModule).useGuildSubscriptionNoGuildsSource();
const value5 = (UseTheme)();
const NONE = FractionalPremiumStates.NONE;
if (fractionalState === NONE) {
var viewBindingProps = {style: styles.root};
var viewBindingProps2 = {style: styles.header};
items6 = [
,
];
var imageBindingProps = {style: styles.logoPremiumGuild};
r10 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(value5) ? importDefault(7531) /* metro dependency 7531 */ : importDefault(7532) /* metro dependency 7532 */;
imageBindingProps.source = r10;
items6[1] = ;
title = styles.title;
string = intl.string;
items6[2] = (
{Reflect.apply(string, intl, [t.hw6WTd])}
);
cardText = styles.cardText;
string = intl.string;
items6[3] = (
{Reflect.apply(string, intl, [t.K5jBdG])}
);
items2 = [
{items6}
,
];
title = styles.title;
string = intl.string;
items2[1] = (
{Reflect.apply(string, intl, [t.RvfRTB])}
);
defaultImport3 = importDefault(7971) /* metro dependency 7971: PremiumFeatureList */;
features = styles.features;
items2[2] = ((Component) => )(defaultImport3);
title = styles.title;
string = intl.string;
items2[3] = (
{Reflect.apply(string, intl, [t['/pVhjb']])}
);
defaultImport4 = importDefault(7971) /* metro dependency 7971: PremiumFeatureList */;
object8 = {};
features = styles.features;
object8.style = features;
object9 = {icon: importDefault(12255) /* metro dependency 12255 */};
object9.label = intl.string(t.Ts7BVI);
object9.IconComponent = (require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon;
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
object9.color = unsafe_rawColors.PREMIUM_PERK_YELLOW;
items3 = [object9];
object10 = {icon: importDefault(12256) /* metro dependency 12256 */};
object10.label = intl.string(t.QcJbt6);
object10.IconComponent = (require(10976) /* metro dependency 10976: StickerIcon */).StickerIcon;
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
object10.color = unsafe_rawColors.PREMIUM_PERK_PURPLE;
items3[1] = object10;
object11 = {icon: importDefault(12257) /* metro dependency 12257 */};
object11.label = intl.string(t.rFNkf5);
object11.color = '#4173da';
object11.IconComponent = (require(10319) /* metro dependency 10319: HeadphonesIcon */).HeadphonesIcon;
items3[2] = object11;
object12 = {icon: importDefault(12258) /* metro dependency 12258 */};
object12.label = intl.string(t['BpjjS/']);
object12.IconComponent = (require(7948) /* metro dependency 7948: UploadIcon */).UploadIcon;
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
object12.color = unsafe_rawColors.GUILD_BOOSTING_PINK;
items3[3] = object12;
object13 = {icon: importDefault(12259) /* metro dependency 12259 */};
object13.label = intl.string(t['9g5Lgb']);
object13.IconComponent = (require(8633) /* metro dependency 8633: StarIcon */).StarIcon;
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
object13.color = unsafe_rawColors.PREMIUM_PERK_GOLD;
items3[4] = object13;
object8.features = items3;
items2[4] = ((Component) => )(defaultImport4);
var viewBinding2Props = {style: styles.upsell};
value9 = null;
r13 = (
value3
? (
fractionalState !== FractionalPremiumStates.NONE
? value9
: ((Component) => )(importDefault(12264) /* metro dependency 12264: PremiumSubscriptionPricingUpsell */)
)
: value9
);
items4 = [r13];
if (isInReverseTrial) {
r13 = value9;
} else {
object14 = {};
if (value2) {
cardText = styles.cardText;
string = intl.string;
items7 = [
{Reflect.apply(string, intl, [t.WRzob8])}
,
];
cardText = styles.cardText;
string = intl.string;
items7[1] = (
{Reflect.apply(string, intl, [t.j4bXcm])}
);
items7[2] = ((Component) => )(importDefault(12265) /* metro dependency 12265: GuildBoostingGuildList */);
object14.children = items7;
} else {
items5 = [
,
];
cardText = styles.cardText;
string = intl.string;
items5[1] = (
{Reflect.apply(string, intl, [t.FHm4bZ])}
);
cardText = styles.cardText;
string = intl.string;
items5[2] = (
{Reflect.apply(string, intl, [t.PSLiiu])}
);
object14.children = items5;
}
r13 = ;
}
items4[1] = r13;
if (value3) {
value = importDefault(12266) /* metro dependency 12266: PremiumSubscriptionUpsell */;
value = ((Component) => )(value);
r10 = value;
} else {
r10 = value9;
}
items4[2] = r10;
items2[5] = (
{items4}
);
value = (
{items2}
);
r0 = value;
} else if (isInReverseTrial) {
var viewBindingProps = {style: styles.root};
var viewBindingProps2 = {style: styles.header};
items6 = [
,
];
var imageBindingProps = {style: styles.logoPremiumGuild};
r10 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(value5) ? importDefault(7531) /* metro dependency 7531 */ : importDefault(7532) /* metro dependency 7532 */;
imageBindingProps.source = r10;
items6[1] = ;
title = styles.title;
string = intl.string;
items6[2] = (
{Reflect.apply(string, intl, [t.hw6WTd])}
);
cardText = styles.cardText;
string = intl.string;
items6[3] = (
{Reflect.apply(string, intl, [t.K5jBdG])}
);
items2 = [
{items6}
,
];
title = styles.title;
string = intl.string;
items2[1] = (
{Reflect.apply(string, intl, [t.RvfRTB])}
);
defaultImport3 = importDefault(7971) /* metro dependency 7971: PremiumFeatureList */;
features = styles.features;
items2[2] = ((Component) => )(defaultImport3);
title = styles.title;
string = intl.string;
items2[3] = (
{Reflect.apply(string, intl, [t['/pVhjb']])}
);
defaultImport4 = importDefault(7971) /* metro dependency 7971: PremiumFeatureList */;
object8 = {};
features = styles.features;
object8.style = features;
object9 = {icon: importDefault(12255) /* metro dependency 12255 */};
object9.label = intl.string(t.Ts7BVI);
object9.IconComponent = (require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon;
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
object9.color = unsafe_rawColors.PREMIUM_PERK_YELLOW;
items3 = [object9];
object10 = {icon: importDefault(12256) /* metro dependency 12256 */};
object10.label = intl.string(t.QcJbt6);
object10.IconComponent = (require(10976) /* metro dependency 10976: StickerIcon */).StickerIcon;
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
object10.color = unsafe_rawColors.PREMIUM_PERK_PURPLE;
items3[1] = object10;
object11 = {icon: importDefault(12257) /* metro dependency 12257 */};
object11.label = intl.string(t.rFNkf5);
object11.color = '#4173da';
object11.IconComponent = (require(10319) /* metro dependency 10319: HeadphonesIcon */).HeadphonesIcon;
items3[2] = object11;
object12 = {icon: importDefault(12258) /* metro dependency 12258 */};
object12.label = intl.string(t['BpjjS/']);
object12.IconComponent = (require(7948) /* metro dependency 7948: UploadIcon */).UploadIcon;
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
object12.color = unsafe_rawColors.GUILD_BOOSTING_PINK;
items3[3] = object12;
object13 = {icon: importDefault(12259) /* metro dependency 12259 */};
object13.label = intl.string(t['9g5Lgb']);
object13.IconComponent = (require(8633) /* metro dependency 8633: StarIcon */).StarIcon;
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
object13.color = unsafe_rawColors.PREMIUM_PERK_GOLD;
items3[4] = object13;
object8.features = items3;
items2[4] = ((Component) => )(defaultImport4);
var viewBinding2Props = {style: styles.upsell};
value9 = null;
r13 = (
value3
? (
fractionalState !== FractionalPremiumStates.NONE
? value9
: ((Component) => )(importDefault(12264) /* metro dependency 12264: PremiumSubscriptionPricingUpsell */)
)
: value9
);
items4 = [r13];
if (isInReverseTrial) {
r13 = value9;
} else {
object14 = {};
if (value2) {
cardText = styles.cardText;
string = intl.string;
items7 = [
{Reflect.apply(string, intl, [t.WRzob8])}
,
];
cardText = styles.cardText;
string = intl.string;
items7[1] = (
{Reflect.apply(string, intl, [t.j4bXcm])}
);
items7[2] = ((Component) => )(importDefault(12265) /* metro dependency 12265: GuildBoostingGuildList */);
object14.children = items7;
} else {
items5 = [
,
];
cardText = styles.cardText;
string = intl.string;
items5[1] = (
{Reflect.apply(string, intl, [t.FHm4bZ])}
);
cardText = styles.cardText;
string = intl.string;
items5[2] = (
{Reflect.apply(string, intl, [t.PSLiiu])}
);
object14.children = items5;
}
r13 = ;
}
items4[1] = r13;
if (value3) {
value = importDefault(12266) /* metro dependency 12266: PremiumSubscriptionUpsell */;
value = ((Component) => )(value);
r10 = value;
} else {
r10 = value9;
}
items4[2] = r10;
items2[5] = (
{items4}
);
value = (
{items2}
);
r0 = value;
} else if (hasAvailableSlots) {
var viewBindingProps = {style: styles.root};
var viewBindingProps2 = {style: styles.header};
items6 = [
,
];
var imageBindingProps = {style: styles.logoPremiumGuild};
r10 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(value5) ? importDefault(7531) /* metro dependency 7531 */ : importDefault(7532) /* metro dependency 7532 */;
imageBindingProps.source = r10;
items6[1] = ;
title = styles.title;
string = intl.string;
items6[2] = (
{Reflect.apply(string, intl, [t.hw6WTd])}
);
cardText = styles.cardText;
string = intl.string;
items6[3] = (
{Reflect.apply(string, intl, [t.K5jBdG])}
);
items2 = [
{items6}
,
];
title = styles.title;
string = intl.string;
items2[1] = (
{Reflect.apply(string, intl, [t.RvfRTB])}
);
defaultImport3 = importDefault(7971) /* metro dependency 7971: PremiumFeatureList */;
features = styles.features;
items2[2] = ((Component) => )(defaultImport3);
title = styles.title;
string = intl.string;
items2[3] = (
{Reflect.apply(string, intl, [t['/pVhjb']])}
);
defaultImport4 = importDefault(7971) /* metro dependency 7971: PremiumFeatureList */;
object8 = {};
features = styles.features;
object8.style = features;
object9 = {icon: importDefault(12255) /* metro dependency 12255 */};
object9.label = intl.string(t.Ts7BVI);
object9.IconComponent = (require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon;
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
object9.color = unsafe_rawColors.PREMIUM_PERK_YELLOW;
items3 = [object9];
object10 = {icon: importDefault(12256) /* metro dependency 12256 */};
object10.label = intl.string(t.QcJbt6);
object10.IconComponent = (require(10976) /* metro dependency 10976: StickerIcon */).StickerIcon;
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
object10.color = unsafe_rawColors.PREMIUM_PERK_PURPLE;
items3[1] = object10;
object11 = {icon: importDefault(12257) /* metro dependency 12257 */};
object11.label = intl.string(t.rFNkf5);
object11.color = '#4173da';
object11.IconComponent = (require(10319) /* metro dependency 10319: HeadphonesIcon */).HeadphonesIcon;
items3[2] = object11;
object12 = {icon: importDefault(12258) /* metro dependency 12258 */};
object12.label = intl.string(t['BpjjS/']);
object12.IconComponent = (require(7948) /* metro dependency 7948: UploadIcon */).UploadIcon;
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
object12.color = unsafe_rawColors.GUILD_BOOSTING_PINK;
items3[3] = object12;
object13 = {icon: importDefault(12259) /* metro dependency 12259 */};
object13.label = intl.string(t['9g5Lgb']);
object13.IconComponent = (require(8633) /* metro dependency 8633: StarIcon */).StarIcon;
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
object13.color = unsafe_rawColors.PREMIUM_PERK_GOLD;
items3[4] = object13;
object8.features = items3;
items2[4] = ((Component) => )(defaultImport4);
var viewBinding2Props = {style: styles.upsell};
value9 = null;
r13 = (
value3
? (
fractionalState !== FractionalPremiumStates.NONE
? value9
: ((Component) => )(importDefault(12264) /* metro dependency 12264: PremiumSubscriptionPricingUpsell */)
)
: value9
);
items4 = [r13];
if (isInReverseTrial) {
r13 = value9;
} else {
object14 = {};
if (value2) {
cardText = styles.cardText;
string = intl.string;
items7 = [
{Reflect.apply(string, intl, [t.WRzob8])}
,
];
cardText = styles.cardText;
string = intl.string;
items7[1] = (
{Reflect.apply(string, intl, [t.j4bXcm])}
);
items7[2] = ((Component) => )(importDefault(12265) /* metro dependency 12265: GuildBoostingGuildList */);
object14.children = items7;
} else {
items5 = [
,
];
cardText = styles.cardText;
string = intl.string;
items5[1] = (
{Reflect.apply(string, intl, [t.FHm4bZ])}
);
cardText = styles.cardText;
string = intl.string;
items5[2] = (
{Reflect.apply(string, intl, [t.PSLiiu])}
);
object14.children = items5;
}
r13 = ;
}
items4[1] = r13;
if (value3) {
value = importDefault(12266) /* metro dependency 12266: PremiumSubscriptionUpsell */;
value = ((Component) => )(value);
r10 = value;
} else {
r10 = value9;
}
items4[2] = r10;
items2[5] = (
{items4}
);
value = (
{items2}
);
r0 = value;
} else {
r0 = null;
}
return r0;
}
}
global.__d(_fun93697, 12250, [31, 27, 4896, 1880, 33, 4501, 697, 12229, 1244, 7958, 12251, 12252, 12254, 9097,
12255, 7950, 12256, 10976, 12257, 10319, 12258, 7948, 12259, 8633, 566, 7563, 12260, 4048, 7522, 4002, 7531,
7532, 4573, 7971, 12264, 12265, 12266,
2]) /* metro module 12250, dependencies: [31, 27, 4896, 1880, 33, 4501, 697, 12229, 1244, 7958, 12251, 12252, 12254, 9097, 12255, 7950, 12256, 10976, 12257, 10319, 12258, 7948, 12259, 8633, 566, 7563, 12260, 4048, 7522, 4002, 7531, 7532, 4573, 7971, 12264, 12265, 12266, 2] */;