75 lines
4.7 KiB
TypeScript
75 lines
4.7 KiB
TypeScript
/* Metro module 14442; source: modules/guilds_bar/native/GuildsBarItemUnavailableGuilds.tsx; dependencies: [31, 27, 4646, 33, 4501, 697, 4647, 1244, 566, 14433, 2] */
|
|
import GuildAvailabilityStore from '../../../stores/GuildAvailabilityStore.tsx'; /* Metro dependency 4646 */
|
|
import AlertActionCreators from '../../../actions/AlertActionCreators.tsx'; /* Metro dependency 4647 */
|
|
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
|
|
function _fun109287(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14639:6, offset: 0x023449d4, size: 348 bytes, params: 8, frame: 23
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
const createStyles = CreateStylesModule.createStyles;
|
|
object = {};
|
|
const GUILD_BAR_ITEM_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_PADDING;
|
|
object.unavailableGuilds = {'marginTop': null, 'justifyContent': 'center', 'alignItems': 'center',
|
|
marginTop: GUILD_BAR_ITEM_PADDING};
|
|
const object3 = {};
|
|
let GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
|
|
object3.width = GUILD_BAR_ITEM_SIZE;
|
|
GUILD_BAR_ITEM_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.GUILD_BAR_ITEM_SIZE;
|
|
object3.height = GUILD_BAR_ITEM_SIZE;
|
|
object.unavailableGuildsIcon = object3;
|
|
const env0_7 = Reflect.apply(createStyles, CreateStylesModule, [object]);
|
|
value = value.memo(GuildsBarItemUnavailableGuilds);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/guilds_bar/native/GuildsBarItemUnavailableGuilds.tsx');
|
|
exports.default = value;
|
|
function GuildsBarItemUnavailableGuilds() { // fn#109288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14639:447, offset: 0x02344b30, size: 244 bytes, params: 1, frame: 23
|
|
var r0;
|
|
var intl;
|
|
const styles = useStyles();
|
|
const totalUnavailableGuilds = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildAvailabilityStore],
|
|
function() {
|
|
return GuildAvailabilityStore.totalUnavailableGuilds;
|
|
});
|
|
if (totalUnavailableGuilds <= 0) {
|
|
r0 = null;
|
|
} else {
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
r0 = (
|
|
<Pressable
|
|
accessibilityRole="button"
|
|
accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['MEpX+2'],
|
|
|
|
{count: totalUnavailableGuilds})}
|
|
onPress={onPress_109290}
|
|
style={styles.unavailableGuilds}
|
|
>
|
|
<Image style={styles.unavailableGuildsIcon} source={importDefault(14433) /* metro dependency 14433 */} />
|
|
</Pressable>
|
|
);
|
|
}
|
|
return r0;
|
|
function GuildsBarItemUnavailableGuildsOnPress() { // fn#109290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14639:704, owner: GuildsBarItemUnavailableGuilds.onPress, offset: 0x02344c33, size: 159 bytes, params: 1, frame: 20
|
|
const totalUnavailableGuildsBinding = totalUnavailableGuilds;
|
|
const defaultImport = AlertActionCreators;
|
|
const show = defaultImport.show;
|
|
const intl = (IndexNativeModule).intl;
|
|
const string = intl.string;
|
|
const t = (IndexNativeModule).t;
|
|
const R0RpRX = t.R0RpRX;
|
|
Reflect.apply(show, defaultImport, [{title: Reflect.apply(string, intl, [R0RpRX]), body: intl.format(t['TnH05/'],
|
|
{count: totalUnavailableGuildsBinding})}]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun109287, 14442, [31, 27, 4646, 33, 4501, 697, 4647, 1244, 566, 14433,
|
|
2]) /* metro module 14442, dependencies: [31, 27, 4646, 33, 4501, 697, 4647, 1244, 566, 14433, 2] */;
|