decord/source/modules/guilds_bar/native/GuildsBarGeoRestrictedGuild.tsx

83 lines
4.1 KiB
TypeScript
Raw Normal View History

// Module ID: 16270
// Function ID: 16271
2026-07-29 08:29:29 +00:00
// Name: items
// Dependencies: [19, 16209, 21, 4481, 709, 16221, 16218, 1431, 5539, 4865, 1233, 8993, 16271, 16240, 5542, 2]
2026-07-20 16:05:17 +00:00
// Module 16270 (items)
2026-09-02 09:53:35 +00:00
import ThemesDefault from "Themes" /* 709 */;
import getAvatarURLDefault from "getAvatarURL" /* 1431 */;
import UnreadIndicatorDefault from "UnreadIndicator" /* 16218 */;
import computeGuildsBarCutoutDefault from "computeGuildsBarCutout" /* 16221 */;
import GuildRowWrapperDefault from "GuildRowWrapper" /* 16240 */;
import _modDef16271 from "module_16271" /* 16271 */;
2026-08-24 06:08:38 +00:00
import importAllResult from "noop" /* 19 */;
import { GUILD_ITEM_BADGE_SIZE } from "GUILD_ITEM_SIZE" /* 16209 */;
2026-08-24 06:08:38 +00:00
import { jsx } from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4481 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
let c3 = importAllResult;
let obj = { guildIcon: null, geoRestrictedBadge: null };
2026-08-24 06:08:38 +00:00
obj = { width: ThemesDefault.modules.mobile.GUILD_BAR_ITEM_SIZE, height: ThemesDefault.modules.mobile.GUILD_BAR_ITEM_SIZE };
2026-07-29 08:29:29 +00:00
obj[0] = obj;
obj[1] = { borderColor: "transparent", width: GUILD_ITEM_BADGE_SIZE, height: GUILD_ITEM_BADGE_SIZE, bottom: 4, right: 12 };
let closure_5 = createCacheKey.createStyles(obj);
2026-08-24 06:08:38 +00:00
let items = [computeGuildsBarCutoutDefault({ position: "bottom-right" })];
2026-07-20 16:05:17 +00:00
const memoResult = importAllResult.memo(function GuildsBarGeoRestrictedGuild(restrictedGuild) {
restrictedGuild = restrictedGuild.restrictedGuild;
2026-08-31 15:47:37 +00:00
const tmp = callback();
let obj = restrictedGuild(16218);
2026-07-20 16:05:17 +00:00
let animatableSourceWithFallback = null;
if (null != restrictedGuild.icon) {
2026-08-31 15:47:37 +00:00
obj1 = getAvatarURLDefault;
animatableSourceWithFallback = obj1.getAnimatableSourceWithFallback(false, (canAnimate) => {
let obj = closure_1_1(closure_1_2[7]);
obj = { id: restrictedGuild.id, size: restrictedGuild(closure_1_2[8]).ImageSizes[restrictedGuild(undefined, closure_1_2[8]).GuildIconSizes.LARGE], icon: restrictedGuild.icon, canAnimate };
2026-07-20 16:05:17 +00:00
return obj.getGuildIconSource(obj);
});
}
2026-08-24 06:08:38 +00:00
items = [, ];
2026-07-20 16:05:17 +00:00
({ id: arr[0], name: arr[1] } = restrictedGuild);
const memo = importAllResult.useMemo(() => ({
onPress() {
2026-08-31 15:47:37 +00:00
let obj = closure_1_1(closure_1_2[9]);
2026-07-29 08:29:29 +00:00
obj = { title: null, body: null, cancelText: null, onCancel: null };
2026-08-31 15:47:37 +00:00
const intl = closure_1_0(closure_1_2[10]).intl;
obj[0] = intl.string(closure_1_0(closure_1_2[10]).t.aCAiGl);
const intl2 = closure_1_0(closure_1_2[10]).intl;
2026-07-29 08:29:29 +00:00
obj = { serverName: name.name };
2026-08-31 15:47:37 +00:00
obj[1] = intl2.format(closure_1_0(closure_1_2[10]).t["4cJV9S"], obj);
const intl3 = closure_1_0(closure_1_2[10]).intl;
obj[2] = intl3.string(closure_1_0(closure_1_2[10]).t.J2TBi3);
2026-07-29 08:29:29 +00:00
obj[3] = function onCancel() {
2026-08-31 15:47:37 +00:00
closure_1_1(closure_1_2[11]).leaveGuild(id.id);
2026-07-20 16:05:17 +00:00
};
obj.show(obj);
}
}), items);
obj = { selected: false, unread: false, circle: false, styles: obj.useGuildsBarAnimatedWrapperStyles({ disableSelectedColor: true, disableBGColor: true }), label: restrictedGuild.name, isDragTarget: false, config: memo, cutouts: items, overState: "a", externalChildren: 0.021, expandedChildren: 0.826, children: 44.088 };
2026-08-31 15:47:37 +00:00
const guildsBarAnimatedWrapperStyles = obj.useGuildsBarAnimatedWrapperStyles({ disableSelectedColor: true, disableBGColor: true });
const tmp2 = restrictedGuild;
obj = { style: tmp.geoRestrictedBadge };
obj[9] = jsx(_modDef16271, { style: tmp.geoRestrictedBadge });
2026-08-31 15:47:37 +00:00
obj1 = { guildId: restrictedGuild.id };
2026-08-24 06:08:38 +00:00
obj[10] = jsx(GuildRowWrapperDefault, { guildId: restrictedGuild.id });
2026-07-20 16:05:17 +00:00
if (null != animatableSourceWithFallback) {
2026-07-29 08:29:29 +00:00
const obj2 = { source: null, style: null, fadeDuration: 0 };
obj2[0] = animatableSourceWithFallback;
2026-08-31 15:47:37 +00:00
obj2[1] = tmp.guildIcon;
let tmp8Result = tmp8(tmp9(5542), obj2);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const obj3 = { value: null, selected: false, animate: false, size: null };
obj3[0] = restrictedGuild.name;
obj3[3] = tmp2(5539).GuildIconSizes.LARGE;
tmp8Result = tmp8(tmp9(5539), obj3);
const tmp9Result = tmp9(5539);
2026-07-20 16:05:17 +00:00
}
2026-08-31 15:47:37 +00:00
obj[11] = tmp8Result;
return jsx(UnreadIndicatorDefault, { style: tmp.geoRestrictedBadge });
2026-07-20 16:05:17 +00:00
});
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/guilds_bar/native/GuildsBarGeoRestrictedGuild.tsx");
2026-07-20 16:05:17 +00:00
export default memoResult;