93 lines
3.9 KiB
TypeScript
93 lines
3.9 KiB
TypeScript
// Module ID: 13055
|
|
// Function ID: 13056
|
|
// Name: BoostedGuildTierProgressCircle
|
|
// Dependencies: [19, 17, 676, 21, 4444, 712, 13056, 13060, 13061, 13062, 4350, 4335, 12222, 4440, 2]
|
|
// Exports: default
|
|
|
|
// Module 13055 (BoostedGuildTierProgressCircle)
|
|
import noopAll from "noop" /* 19 */;
|
|
import ThemesDefault from "Themes" /* 712 */;
|
|
import getGuildTierFromGuild from "getGuildTierFromGuild" /* 4335 */;
|
|
import useGuildAppliedBoostCountDefault from "useGuildAppliedBoostCount" /* 4350 */;
|
|
import getTier048PxSource from "getTier048PxSource" /* 13056 */;
|
|
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
|
|
import ME from "ME" /* 676 */;
|
|
import jsxProd from "jsxProd" /* 21 */;
|
|
import createCacheKey from "createCacheKey" /* 4444 */;
|
|
|
|
require = arg1;
|
|
noopAll;
|
|
({ View: c3, Image: c4 } = get_ActivityIndicator);
|
|
({ AppliedGuildBoostsRequiredForBoostedGuildTier: c5, BoostedGuildTiers: closure_6 } = ME);
|
|
({ jsx: error, jsxs: closure_8 } = jsxProd);
|
|
createCacheKey = { guildTierProgressCircle: { position: "relative", width: 70, height: 70 }, guildTierBackground: null, guildTierNoneIcon: null, guildTierIcon: null, guildTierName: null };
|
|
createCacheKey = { backgroundColor: ThemesDefault.colors.BACKGROUND_SURFACE_HIGH, width: 64, height: 64, alignItems: "center", justifyContent: "center", borderRadius: ThemesDefault.radii.xxl };
|
|
createCacheKey[1] = createCacheKey;
|
|
createCacheKey[2] = { width: 18, height: 30 };
|
|
createCacheKey[3] = { width: 24, height: 24 };
|
|
createCacheKey[4] = { lineHeight: 16, marginTop: 2 };
|
|
let closure_9 = createCacheKey.createStyles(createCacheKey);
|
|
const result = require("set").fileFinishedImporting("modules/premium/native/BoostedGuildTierProgressCircle.tsx");
|
|
|
|
export default function BoostedGuildTierProgressCircle(arg0) {
|
|
({ guild, theme } = arg0);
|
|
const tmp = callback2();
|
|
useGuildAppliedBoostCountDefault;
|
|
if (guild != null) {
|
|
const id = guild.id;
|
|
}
|
|
if (null == guild) {
|
|
let obj = { style: null, children: null };
|
|
obj[0] = tmp.guildTierBackground;
|
|
obj = { source: null, style: null, accessibilityElementsHidden: true, importantForAccessibility: "no" };
|
|
obj[0] = getTier048PxSource.getTier048PxSource(theme);
|
|
obj[1] = tmp.guildTierNoneIcon;
|
|
obj[1] = callback(closure_4, obj);
|
|
return callback(closure_3, obj);
|
|
} else {
|
|
const nextGuildTierFromGuild = getGuildTierFromGuild.getNextGuildTierFromGuild(guild.id);
|
|
let tmp7 = null;
|
|
if (null != nextGuildTierFromGuild) {
|
|
tmp7 = table[nextGuildTierFromGuild];
|
|
}
|
|
let num2 = 100;
|
|
if (null != tmp7) {
|
|
num2 = 100;
|
|
if (tmp7 > 0) {
|
|
num2 = tmp5 / tmp7 * 100;
|
|
}
|
|
}
|
|
obj = { style: null, percent: null, children: null };
|
|
obj[0] = tmp.guildTierProgressCircle;
|
|
obj[1] = num2;
|
|
obj1 = { style: null, children: null };
|
|
obj1[0] = tmp.guildTierBackground;
|
|
if (null != guild) {
|
|
if (guild.premiumTier !== constants.NONE) {
|
|
const premiumTier = guild.premiumTier;
|
|
if (tmp13.TIER_1 === premiumTier) {
|
|
let tier048PxSource = tmp2(13060);
|
|
} else if (tmp13.TIER_2 === premiumTier) {
|
|
tier048PxSource = tmp2(13061);
|
|
} else if (tmp13.TIER_3 === premiumTier) {
|
|
tier048PxSource = tmp2(13062);
|
|
}
|
|
}
|
|
const obj2 = { source: null, style: null, accessibilityElementsHidden: true, importantForAccessibility: "no" };
|
|
obj2[0] = tier048PxSource;
|
|
obj2[1] = tmp.guildTierIcon;
|
|
const items = [tmp8(tmp12, obj2), ];
|
|
const obj3 = { style: null, variant: "text-xs/semibold", color: "interactive-text-active", children: null };
|
|
obj3[0] = tmp.guildTierName;
|
|
let tmp19Result = tmp19(4335);
|
|
obj3[3] = tmp19Result.getTierName(guild.premiumTier);
|
|
items[1] = tmp8(tmp19(4440).Text, obj3);
|
|
obj1[1] = items;
|
|
obj[2] = tmp10(tmp11, obj1);
|
|
return tmp8(tmp9, obj);
|
|
}
|
|
tmp19Result = tmp19(13056);
|
|
tier048PxSource = tmp19Result.getTier048PxSource(theme);
|
|
const obj10 = getGuildTierFromGuild;
|
|
}
|
|
};
|