/* Metro module 11846; source: modules/guild_sidebar/native/BaseChannelItem.tsx; dependencies: [31, 27, 10980, 4865, 33, 4501, 697, 4573, 478, 1305, 10957, 8554, 11847, 2] */ function _fun90765(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12032:6, offset: 0x020448db, size: 420 bytes, params: 8, frame: 21 const env0_0 = require; const closure = BaseChannelSubtitle; const closure2 = useChannelNameTextProps; const closure3 = getChannelSubtitleTextProps; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importAll(31) /* metro dependency 31 */; const env0_4 = (require(27) /* metro dependency 27 */).View; const env0_5 = (require(10980) /* metro dependency 10980: RedesignChannelListConstants */).CHANNEL_TITLE_LINE_HEIGHT; const env0_6 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting; const value = require(33) /* metro dependency 33 */; const env0_7 = value.jsx; const env0_8 = value.jsxs; const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun90769); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_sidebar/native/BaseChannelItem.tsx'); exports.default = BaseChannelItem; exports.ChannelModes = {SELECTED: 'Selected', LOCKED: 'Locked', MUTED: 'Muted', RELEVANT: 'Relevant', UNREAD_LESS_IMPORTANT: 'UnreadLessImportant', UNREAD_IMPORTANT: 'UnreadImportant', DEFAULT: 'Default'}; exports.BaseChannelSubtitle = closure; exports.BaseChannelIcon = BaseChannelIcon; exports.useChannelNameTextProps = closure2; exports.getChannelSubtitleTextProps = closure3; exports.BaseChannelName = BaseChannelName; } function BaseChannelSubtitle({mode, subtitle}) { // fn#90766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12032:1276, offset: 0x02044a7f, size: 133 bytes, params: 2, frame: 19 var r0; var Text; var value; if (subtitle == null) { r0 = null; } else { Text = (require(4573) /* metro dependency 4573: Text */).Text; value = require(478) /* metro dependency 478: PlatformUtils */; value = {subtitle}; r0 = value; } return r0; } function useChannelNameTextProps(a0) { // fn#90767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12032:1477, offset: 0x02044b04, size: 156 bytes, params: 2, frame: 3 const UNREAD_IMPORTANT = env0_10.UNREAD_IMPORTANT; return a0 === UNREAD_IMPORTANT || a0 === env0_10.RELEVANT ? {'variant': 'text-md/semibold', 'color': 'redesign-channel-name-text'} : a0 === env0_10.UNREAD_LESS_IMPORTANT ? {'variant': 'text-md/medium', 'color': 'redesign-channel-name-muted-text'} : a0 === env0_10.MUTED ? {'variant': 'text-md/medium', 'color': 'text-muted'} : a0 === env0_10.SELECTED ? {'variant': 'text-md/medium', 'color': 'redesign-channel-name-text'} : {'variant': 'text-md/medium', 'color': 'redesign-channel-name-muted-text'}; } function getChannelSubtitleTextProps(a0) { // fn#90768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12032:1922, offset: 0x02044ba0, size: 86 bytes, params: 2, frame: 3 var object; const UNREAD_IMPORTANT = env0_10.UNREAD_IMPORTANT; if (a0 === UNREAD_IMPORTANT) { object = {'variant': 'text-xs/medium', 'color': 'redesign-channel-name-text'}; } else if (a0 === env0_10.RELEVANT) { object = {'variant': 'text-xs/medium', 'color': 'redesign-channel-name-text'}; } else if (a0 === env0_10.SELECTED) { object = {'variant': 'text-xs/medium', 'color': 'redesign-channel-name-text'}; } else { env0_10.MUTED; object = {'variant': 'text-xs/medium', 'color': 'text-muted'}; } return object; } function _fun90769(a0) { // fn#90769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12032:232, offset: 0x02044bf6, size: 425 bytes, params: 2, frame: 18 const object2 = {}; object2.rowPaddingNoIcon = {paddingHorizontal: 6}; const object4 = {}; const CHANNEL_ITEM_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHANNEL_ITEM_RADIUS; object4.borderRadius = CHANNEL_ITEM_RADIUS; const MOBILE_CHANNEL_ITEM_BACKGROUND_SELECTED = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_CHANNEL_ITEM_BACKGROUND_SELECTED; object4.backgroundColor = MOBILE_CHANNEL_ITEM_BACKGROUND_SELECTED; object2.rowSelected = object4; const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object2.unreadIndicator = {left: -PX_8}; let MUTED = env0_10.MUTED; const value2 = 1; object2.channelIcon = {'width': 16, 'height': 16, 'marginRight': 8, opacity: a0 !== MUTED ? value2 : 0.5}; MUTED = env0_10.MUTED; object2.redesignedChannelIcon = {marginRight: 8, opacity: a0 !== MUTED ? value2 : 0.5}; const CHANNEL_ICON = (importDefault(697) /* metro dependency 697: native */).colors.CHANNEL_ICON; object2.channelIconNormal = {tintColor: CHANNEL_ICON}; const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE; object2.channelIconUnread = {tintColor: INTERACTIVE_TEXT_ACTIVE}; const ICON_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED; object2.channelIconMuted = {tintColor: ICON_MUTED}; object2.channel = {'paddingHorizontal': 8, 'paddingVertical': 8, 'flexDirection': 'row', 'alignItems': 'center', 'position': 'relative'}; object2.channelNameContainer = {'flex': 1, 'flexDirection': 'column', 'alignItems': 'stretch', 'justifyContent': 'center'}; MUTED = env0_10.MUTED; object2.channelName = {'flexGrow': 1, 'textAlign': 'left', lineHeight: CHANNEL_TITLE_LINE_HEIGHT, opacity: a0 !== MUTED ? value2 : 0.5}; return object2; } function BaseChannelItem(a0) { // fn#90770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12032:2235, offset: 0x02044d9f, size: 407 bytes, params: 2, frame: 30 const icon = a0.icon; const name = a0.name; const mode = a0.mode; const hideIcon = a0.hideIcon; let disableHighlightOnPress = a0.disableHighlightOnPress; disableHighlightOnPress = !(disableHighlightOnPress === undefined) && disableHighlightOnPress; const channelInfo = a0.channelInfo; const children = a0.children; let unread = a0.unread; unread = !(unread === undefined) && unread; const object2 = {'icon': 0, 'name': 0, 'mode': 0, 'hideIcon': 0, 'disableHighlightOnPress': 0, 'channelInfo': 0, 'children': 0, 'unread': 0}; silentSetPrototypeOf(object2, null, undefined); const value = copyDataProperties({}, a0, object2, undefined); const styles = useStyles(mode); const value3 = env0_3.useMemo(_fun90771, [hideIcon, mode, styles]); const value4 = !hideIcon; return ((Component) => {hideIcon ? value4 : ((Component) => )(importDefault(10957) /* metro dependency 10957: StaticChannelIndicator */)}{hideIcon ? value4 : icon}{name}{channelInfo}{children})(disableHighlightOnPress ? importDefault(11847) /* metro dependency 11847: TouchableBackground */ : (require(8554) /* metro dependency 8554: native */).AnimatedPressableHighlight); } function BaseChannelIcon({disableColor, mode, source, IconComponent, style, isChannelLive}) { // fn#90772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12032:2795, offset: 0x02044f87, size: 332 bytes, params: 2, frame: 26 var r0; var value; const styles = useStyles(mode); const MUTED = env0_10.MUTED; const value2 = mode === MUTED; const UNREAD_IMPORTANT = env0_10.UNREAD_IMPORTANT; const value3 = mode === UNREAD_IMPORTANT; const SELECTED = env0_10.SELECTED; const value4 = mode === SELECTED; const items = [styles.channelIcon]; if (disableColor !== true) { items.push(value2 ? styles.channelIconMuted : value3 || value4 ? styles.channelIconUnread : styles.channelIconNormal); } if (style != null) { items.push(style); } if (IconComponent != null) { value = 'status-positive'; value = ; r0 = value; } else { const Icon = (require(1305) /* metro dependency 1305: native */).Icon; r0 = ; } return r0; } function BaseChannelName({mode, name, subtitle, textStyle}) { // fn#90773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12032:3436, offset: 0x020450d3, size: 216 bytes, params: 2, frame: 24 const styles = useStyles(mode); const Text = (require(4573) /* metro dependency 4573: Text */).Text; const textProps = {experimental_useNativeText: true, ...useChannelNameTextProps(mode)}; textProps['lineClamp'] = 1; textProps['style'] = [styles.channelName, textStyle]; return ( {name} ); } function _fun90771() { // fn#90771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12032:2390, offset: 0x02044f36, size: 81 bytes, params: 1, frame: 4 const hideIconBinding = hideIcon; const modeBinding = mode; const SELECTED = env1_10.SELECTED; return [styles.channel, hideIconBinding && styles.rowPaddingNoIcon, modeBinding === SELECTED && styles.rowSelected]; }