91 lines
6.9 KiB
TypeScript
91 lines
6.9 KiB
TypeScript
/* Metro module 14597; source: modules/premium/powerups/native/GuildPowerupsChannelRow.tsx; dependencies: [31, 27, 10980, 33, 14598, 7684, 697, 1305, 4501, 14599, 6789, 14607, 14681, 11846, 1244, 2256, 14687, 2] */
|
|
import AnalyticsLocation from '../../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
|
|
import BaseChannelItem from '../../../guild_sidebar/native/BaseChannelItem.tsx'; /* Metro dependency 11846 */
|
|
import UseGuildPowerupsNotifications from '../hooks/useGuildPowerupsNotifications.tsx'; /* Metro dependency 14607 */
|
|
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 */
|
|
import * as RedesignChannelListConstantsModule from '../../../channel_list_v2/native/RedesignChannelListConstants.tsx'; /* Metro dependency 10980 */
|
|
import * as BoostTier2IconModule from '../../../../design/components/Icon/native/redesign/generated/BoostTier2Icon.tsx'; /* Metro dependency 14687 */
|
|
|
|
function _fun110373(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14794:6, offset: 0x02376f0a, size: 263 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const CHANNEL_MARGIN_VERTICAL = (RedesignChannelListConstantsModule).CHANNEL_MARGIN_VERTICAL;
|
|
const createStyles = CreateStylesModule.createStyles;
|
|
const object2 = {marginVertical: CHANNEL_MARGIN_VERTICAL, marginHorizontal: 8};
|
|
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
|
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [{container: object2}]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/premium/powerups/native/GuildPowerupsChannelRow.tsx');
|
|
exports.default = GuildPowerupsChannelRow;
|
|
function GuildPowerupsChannelRowIndicator({indicator}) { // fn#110374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14794:169, offset: 0x02377011, size: 236 bytes, params: 2, frame: 17
|
|
if (indicator != null) {
|
|
var type = indicator.type;
|
|
var GuildPowerupNotificationIndicatorType = (require(14598) /* metro dependency 14598: GuildPowerupsNotification */).GuildPowerupNotificationIndicatorType;
|
|
var WARNING = GuildPowerupNotificationIndicatorType.WARNING;
|
|
if (WARNING === type) {
|
|
const CircleErrorIcon = (require(7684) /* metro dependency 7684: CircleErrorIcon */).CircleErrorIcon;
|
|
return (
|
|
<CircleErrorIcon color={(importDefault(697) /* metro dependency 697: native */).colors.STATUS_WARNING} size="sm" />
|
|
);
|
|
}
|
|
GuildPowerupNotificationIndicatorType = (require(14598) /* metro dependency 14598: GuildPowerupsNotification */).GuildPowerupNotificationIndicatorType;
|
|
var UNREAD = GuildPowerupNotificationIndicatorType.UNREAD;
|
|
if (UNREAD === type) {
|
|
const Badge = (require(1305) /* metro dependency 1305: native */).Badge;
|
|
return <Badge value={indicator.count} isMentionLowImportance />;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
function GuildPowerupsChannelRow({guildId}) { // fn#110375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14794:762, offset: 0x023770fd, size: 564 bytes, params: 2, frame: 31
|
|
const styles = useStyles();
|
|
const value3 = ReactModule.useRef(null);
|
|
const value4 = ReactModule.useCallback(_fun110376, [guildId]);
|
|
const value5 = (UseGuildPowerupsNotifications)(guildId);
|
|
(importDefault(14681) /* metro dependency 14681: useGuildPowerupsCoachmark */)(value3, guildId, value5?.popout);
|
|
const r13 = value5 == null ? (require(11846) /* metro dependency 11846: BaseChannelItem */).ChannelModes.DEFAULT : value5.showUnread ? (require(11846) /* metro dependency 11846: BaseChannelItem */).ChannelModes.UNREAD_IMPORTANT : (require(11846) /* metro dependency 11846: BaseChannelItem */).ChannelModes.DEFAULT;
|
|
const defaultImport2Props = {onPress: value4, style: styles.container, accessible: true, mode: r13,
|
|
unread: value5?.showUnread};
|
|
const intl = (IndexNativeModule).intl;
|
|
defaultImport2Props.accessibilityLabel = intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).yv3DJJ);
|
|
defaultImport2Props.accessibilityState = {selected: false};
|
|
const BaseChannelName = (require(11846) /* metro dependency 11846: BaseChannelItem */).BaseChannelName;
|
|
defaultImport2Props.name = (
|
|
<BaseChannelName
|
|
name={intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).yv3DJJ)}
|
|
mode={r13}
|
|
/>
|
|
);
|
|
const BaseChannelIcon = (require(11846) /* metro dependency 11846: BaseChannelItem */).BaseChannelIcon;
|
|
const BoostTier2Icon = (BoostTier2IconModule).BoostTier2Icon;
|
|
defaultImport2Props.icon = <BaseChannelIcon mode={r13} IconComponent={BoostTier2Icon} />;
|
|
defaultImport2Props.channelInfo = <GuildPowerupsChannelRowIndicator indicator={value5?.indicator} />;
|
|
return (
|
|
<View ref={value3} collapsable={false}>
|
|
<BaseChannelItem {...defaultImport2Props} />
|
|
</View>
|
|
);
|
|
function _fun110376() { // fn#110376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14794:852, offset: 0x02377331, size: 68 bytes, params: 1, frame: 14
|
|
let value = environment.__proto__;
|
|
value = importDefault(14599) /* metro dependency 14599: openGuildPowerupsModal */;
|
|
const object = {};
|
|
object.guildId = guildId;
|
|
const GUILD_POWERUPS_CHANNEL_LIST_ROW = (AnalyticsLocation).GUILD_POWERUPS_CHANNEL_LIST_ROW;
|
|
object.analyticsLocation = GUILD_POWERUPS_CHANNEL_LIST_ROW;
|
|
value(object);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun110373, 14597, [31, 27, 10980, 33, 14598, 7684, 697, 1305, 4501, 14599, 6789, 14607, 14681, 11846,
|
|
1244, 2256, 14687,
|
|
2]) /* metro module 14597, dependencies: [31, 27, 10980, 33, 14598, 7684, 697, 1305, 4501, 14599, 6789, 14607, 14681, 11846, 1244, 2256, 14687, 2] */;
|