/* Metro module 15934; source: modules/guild_settings/native/GuildSettingsModalChannels.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 1379, 1867, 3784, 3793, 1878, 15860, 661, 33, 4501, 6597, 697, 1244, 4002, 673, 7972, 1305, 15935, 3868, 566, 6647, 4805, 5278, 1585, 4578, 6802, 9087, 10083, 15936, 15937, 15858, 11427, 13761, 3789, 6593, 4647, 5277, 15938, 5462, 8148, 1484, 44, 4584, 2] */ function _fun122895(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:6, offset: 0x02579a95, size: 996 bytes, params: 8, frame: 33 var object3; const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_4 = importDefault(6) /* metro dependency 6 */; const env0_5 = importDefault(7) /* metro dependency 7 */; const env0_6 = importDefault(15) /* metro dependency 15 */; const env0_7 = importDefault(17) /* metro dependency 17 */; const env0_8 = importDefault(18) /* metro dependency 18 */; const value = importAll(31) /* metro dependency 31 */; const value2 = require(27) /* metro dependency 27 */; const env0_10 = value2.View; const StyleSheet = value2.StyleSheet; const env0_11 = value2.TouchableHighlight; const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */; const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */; const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */; const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */; const userStore = importDefault(1878) /* metro dependency 1878: UserStore */; const guildSettingsModalChannelsStore = importDefault(15860) /* metro dependency 15860: GuildSettingsModalChannelsStore */; const constantsModule = require(661) /* metro dependency 661: Constants */; const env0_18 = constantsModule.ChannelTypes; const env0_19 = constantsModule.Permissions; const Fonts = constantsModule.Fonts; const env0_20 = constantsModule.NULL_STRING_CHANNEL_ID; const value4 = require(33) /* metro dependency 33 */; const env0_21 = value4.jsx; const env0_22 = value4.jsxs; const createStylesModule = require(4501) /* metro dependency 4501: createStyles */; const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles; object3 = {}; const object5 = {}; const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */; let PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD; const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY; copyDataProperties(object5, textStyles(PRIMARY_SEMIBOLD, MOBILE_TEXT_HEADING_PRIMARY, 16), undefined); object5['textTransform'] = 'capitalize'; object3.headerRight = object5; const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW; object3.containerView = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW}; const object6 = {}; const value7 = textStyles; const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD; let TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE; copyDataProperties(object6, value7(DISPLAY_EXTRABOLD, TEXT_SUBTLE, 12, {uppercase: true}), 12); object3.categoryText = object6; object3.categoryView = {'paddingTop': 36, 'paddingBottom': 8}; object3.sortingCategoryView = {paddingTop: 16}; const object8 = {}; const value8 = textStyles; PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD; TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE; copyDataProperties(object8, value8(PRIMARY_SEMIBOLD, TEXT_SUBTLE, 14), 12); object3.edit = object8; object3.row = {marginTop: -StyleSheet.hairlineWidth}; object3.formRowStyle = {paddingVertical: 12}; const GREEN_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360; object3.dropHighlight = {backgroundColor: GREEN_360, opacity: 0.3}; object3.floatingActionButtonContainer = {'position': 'absolute', 'bottom': 16, 'right': 0, 'left': 0, 'flexDirection': 'row', 'justifyContent': 'center'}; const env0_23 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object3]); let PureComponent = value.PureComponent; const value9 = _fun122909(PureComponent); const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext; value9.contextType = ThemeContext; PureComponent = value.PureComponent; _fun122914(PureComponent).contextType = ThemeContext; PureComponent = value.PureComponent; _fun122917(PureComponent).contextType = ThemeContext; (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModalChannels.tsx'); exports.default = GuildSettingsModalChannelsConnected; } function _callSuper_122896(a0, a1, a2) { // fn#122896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:387, offset: 0x02579e79, size: 100 bytes, params: 4, frame: 20 var r0; var Reflect; let value = a2; const value3 = env0_7(a1); const binding = env0_6; if (_isNativeReflectConstruct_122897()) { Reflect = global.Reflect; value = Reflect.construct(value3, value || [], env0_7(a0).constructor); r0 = value; } else { value = value3.apply(a0, value); r0 = value; } return binding(a0, r0); } function _isNativeReflectConstruct_122897() { // fn#122897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:518, offset: 0x02579edd, size: 98 bytes, params: 1, frame: 18 var Boolean; var prototype; var valueOf; var call; var Reflect; var construct; var closure; var value; var error; try { Boolean = global.Boolean; prototype = Boolean.prototype; valueOf = prototype.valueOf; call = valueOf.call; Reflect = global.Reflect; construct = Reflect.construct; Boolean = global.Boolean; closure = function() { }; value = Reflect.apply(construct, Reflect, [Boolean, [], closure]); value = Reflect.apply(call, valueOf, [value]); var result = !value; } catch (error) { } return (_isNativeReflectConstruct_122897_isNativeReflectConstruct = function() { return !!result; })(); } function ChannelItem({style, channelIconStyle, actionIconStyle, channel, sortingEnabled, onPress, sortHandlers}) { // fn#122900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:2482, offset: 0x02579f3f, size: 783 bytes, params: 2, frame: 38 var object2; const value3 = (require(4501) /* metro dependency 4501: createStyles */).useLegacyClassComponentStyles(env0_23); const sharedModule = require(4002) /* metro dependency 4002: shared */; const useThemeContext = sharedModule.useThemeContext; const theme = Reflect.apply(useThemeContext, sharedModule, []).theme; const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun122901, [channel]); sortHandlers = !value4 ? undefined : sortHandlers; const channelIcon = (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIcon(channel); const channelIconComponent = (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIconComponent(channel); object2 = {accessibilityRole: 'button'}; const isThemeDark2 = sharedModule.isThemeDark(theme); const colorUtilsModule = require(673) /* metro dependency 673: ColorUtils */; const hex2rgb = colorUtilsModule.hex2rgb; const unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors; let r7 = isThemeDark2 ? Reflect.apply(hex2rgb, colorUtilsModule, [unsafe_rawColors.PRIMARY_700, 0.6]) : Reflect.apply(hex2rgb, colorUtilsModule, [unsafe_rawColors.PRIMARY_200, 0.6]); object2.underlayColor = r7 ?? undefined; object2.style = style; copyDataProperties(object2, sortHandlers, undefined); r7 = sortingEnabled ? value4 ? null : {opacity: 0.3} : null; const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow; const formRowProps = {leading: channelIconComponent != null ? ((Component) => )(channelIconComponent) : ((Icon) => )((require(7972) /* metro dependency 7972: native */).FormRow.Icon), style: value3.formRowStyle}; const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */; formRowProps.label = useChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore); formRowProps.onPress = sortingEnabled ? undefined : function() { return onPress(channel.id); }; formRowProps.trailing = value4 && sortingEnabled ? ((Icon) => )((require(7972) /* metro dependency 7972: native */).FormRow.Icon) : null; formRowProps.numberOfLines = sortingEnabled ? 1 : undefined; return ( ); } function isValidDrop(a0, a1) { // fn#122903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:4048, offset: 0x0257a2be, size: 110 bytes, params: 3, frame: 16 return a0 != null && (a0.parentId == null ? PermissionStore.can(Permissions.MANAGE_CHANNELS, a1) : PermissionStore.can(Permissions.MANAGE_CHANNELS, ChannelStore.getChannel(a0.parentId))); } function CreateButton({guild}) { // fn#122904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16142:4186, offset: 0x0257a32c, size: 332 bytes, params: 2, frame: 24 var r0; var Button; var intl; const value2 = (require(4501) /* metro dependency 4501: createStyles */).useLegacyClassComponentStyles(env0_23); const value3 = env0_9.useMemo(function() { return {bottom: 16 + bottom}; }, [(importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom]); const can = PermissionStore.can; const MANAGE_CHANNELS = Permissions.MANAGE_CHANNELS; if (Reflect.apply(can, PermissionStore, [MANAGE_CHANNELS, guild])) { var viewBindingProps = {style: [value2.floatingActionButtonContainer, value3]}; Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button; intl = (require(1244) /* metro dependency 1244: indexNative */).intl; r0 =