decord/source/modules/guilds_bar/native/GuildsBarGeoRestrictedGuild.tsx
github-actions da5b5e5efe chore: update source for alpha 346.6
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-12 13:45:10 +00:00

73 lines
5.5 KiB
TypeScript

// Module ID: 16442
// Function ID: 16443
// Name: GuildsBarGeoRestrictedGuild
// Dependencies: [19, 16377, 21, 4636, 576, 16393, 16389, 1396, 5665, 4980, 1114, 9192, 16443, 16412, 5668, 2]
// Module 16442 (GuildsBarGeoRestrictedGuild)
import nativeDefault from "native" /* 576 */;
import AvatarUtilsDefault from "AvatarUtils" /* 1396 */;
import AlertActionCreatorsDefault from "AlertActionCreators" /* 4980 */;
import GuildIcon from "GuildIcon" /* 5665 */;
import GuildsBarAnimatedItemWrapperDefault from "GuildsBarAnimatedItemWrapper" /* 16389 */;
import computeGuildsBarCutoutDefault from "computeGuildsBarCutout" /* 16393 */;
import HomeDrawerGuildRowDefault from "HomeDrawerGuildRow" /* 16412 */;
import GuildsBarGeoRestrictedBadgeDefault from "GuildsBarGeoRestrictedBadge" /* 16443 */;
import noop from "module_19" /* 19 */;
require = fn;
const GUILD_ITEM_BADGE_SIZE = fn(16377).GUILD_ITEM_BADGE_SIZE;
const jsx = fn(21).jsx;
const createStyles = fn(4636);
let obj = { guildIcon: null, geoRestrictedBadge: null };
let size = { width: nativeDefault.modules.mobile.GUILD_BAR_ITEM_SIZE, height: nativeDefault.modules.mobile.GUILD_BAR_ITEM_SIZE };
obj.guildIcon = size;
obj.geoRestrictedBadge = { borderColor: "transparent", width: GUILD_ITEM_BADGE_SIZE, height: GUILD_ITEM_BADGE_SIZE, bottom: 4, right: 12 };
let closure_5 = createStyles.createStyles(obj);
let items = [computeGuildsBarCutoutDefault({ position: "bottom-right" })];
size = fn(2);
const result = size.fileFinishedImporting("modules/guilds_bar/native/GuildsBarGeoRestrictedGuild.tsx");
export default noop.memo(function GuildsBarGeoRestrictedGuild(restrictedGuild) {
restrictedGuild = restrictedGuild.restrictedGuild;
const tmp = closure_5();
let animatableSourceWithFallback = null;
let obj = restrictedGuild(16389);
const tmp2 = restrictedGuild;
if (null != restrictedGuild.icon) {
animatableSourceWithFallback = AvatarUtilsDefault.getAnimatableSourceWithFallback(false, (canAnimate) => {
const obj = AvatarUtilsDefault;
return obj.getGuildIconSource({ id: restrictedGuild.id, size: GuildIcon.ImageSizes[GuildIcon.GuildIconSizes.LARGE], icon: restrictedGuild.icon, canAnimate });
});
}
items = [, ];
({ id: arr[0], name: arr[1] } = restrictedGuild);
const memo = noop.useMemo(() => ({
onPress() {
const obj2 = { title: null, body: null, cancelText: null, onCancel: null };
const intl = restrictedGuild(1114).intl;
obj2.title = intl.string(restrictedGuild(1114).t.aCAiGl);
const intl2 = restrictedGuild(1114).intl;
obj2.body = intl2.format(restrictedGuild(1114).t["4cJV9S"], { serverName: name.name });
const intl3 = restrictedGuild(1114).intl;
obj2.cancelText = intl3.string(restrictedGuild(1114).t.J2TBi3);
obj2.onCancel = function onCancel() {
closure_2_1(dependencyMap[11]).leaveGuild(id.id);
};
AlertActionCreatorsDefault.show(obj2);
}
}), items);
const obj3 = { selected: false, unread: false, circle: false, styles: restrictedGuild(16389).useGuildsBarAnimatedWrapperStyles({ disableSelectedColor: true, disableBGColor: true }), label: restrictedGuild.name, isDragTarget: false, config: memo, cutouts: items, overState: "a", externalChildren: "function pnpm_useGestureHandlerTs1(event){const{state,State,gestureSource,source,onStart}=this.__closure;state.value=State.BEGAN;gestureSource.value=source;onStart(source,event);return;}", expandedChildren: "function pnpm_useGestureHandlerTs2(event){const{gestureSource,source,state,onChange}=this.__closure;if(gestureSource.value!==source){return;}state.value=event.state;onChange(source,event);}", children: "function pnpm_useGestureHandlerTs3(event){const{gestureSource,source,state,GESTURE_SOURCE,onEnd}=this.__closure;if(gestureSource.value!==source){return;}state.value=event.state;gestureSource.value=GESTURE_SOURCE.UNDETERMINED;onEnd(source,event);}" };
const guildsBarAnimatedWrapperStyles = restrictedGuild(16389).useGuildsBarAnimatedWrapperStyles({ disableSelectedColor: true, disableBGColor: true });
obj3.externalChildren = jsx(GuildsBarGeoRestrictedBadgeDefault, { style: tmp.geoRestrictedBadge });
obj3.expandedChildren = jsx(HomeDrawerGuildRowDefault, { guildId: restrictedGuild.id });
if (null != animatableSourceWithFallback) {
const obj6 = { source: animatableSourceWithFallback, style: tmp.guildIcon, fadeDuration: 0 };
let tmp8Result = tmp8(tmp9(5668), obj6);
} else {
const obj7 = { value: restrictedGuild.name, selected: false, animate: false, size: tmp2(5665).GuildIconSizes.LARGE };
tmp8Result = tmp8(tmp9(5665), obj7);
const tmp9Result = tmp9(5665);
}
obj3.children = tmp8Result;
return jsx(GuildsBarAnimatedItemWrapperDefault, { selected: false, unread: false, circle: false, styles: restrictedGuild(16389).useGuildsBarAnimatedWrapperStyles({ disableSelectedColor: true, disableBGColor: true }), label: restrictedGuild.name, isDragTarget: false, config: memo, cutouts: items, overState: "a", externalChildren: "function pnpm_useGestureHandlerTs1(event){const{state,State,gestureSource,source,onStart}=this.__closure;state.value=State.BEGAN;gestureSource.value=source;onStart(source,event);return;}", expandedChildren: "function pnpm_useGestureHandlerTs2(event){const{gestureSource,source,state,onChange}=this.__closure;if(gestureSource.value!==source){return;}state.value=event.state;onChange(source,event);}", children: "function pnpm_useGestureHandlerTs3(event){const{gestureSource,source,state,GESTURE_SOURCE,onEnd}=this.__closure;if(gestureSource.value!==source){return;}state.value=event.state;gestureSource.value=GESTURE_SOURCE.UNDETERMINED;onEnd(source,event);}" });
});