/* Metro module 15345; source: modules/launchpad/native/shared/renderChannelItem.tsx; dependencies: [31, 27, 1867, 3793, 1878, 4865, 33, 9122, 4501, 697, 15332, 566, 6819, 11727, 4788, 15334, 9719, 15337, 4805, 2] */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import GuildIcon from '../../../guild/native/GuildIcon.tsx'; /* Metro dependency 6819 */
import GetLayoutStyles from './getLayoutStyles.tsx'; /* Metro dependency 15332 */
import RenderChannelWrapper from './renderChannelWrapper.tsx'; /* Metro dependency 15334 */
import RenderChannelContent from './renderChannelContent.tsx'; /* Metro dependency 15337 */
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 ReadStateConstantsModule from '../../../read_states/ReadStateConstants.tsx'; /* Metro dependency 4865 */
import * as AppLauncherChannelListActionSheetModule from '../../../app_launcher/native/options/channel/AppLauncherChannelListActionSheet.tsx'; /* Metro dependency 11727 */
function _fun117291(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15542:6, offset: 0x024ad8d4, size: 305 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
ReactModule;
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
var object2 = {'position': 'absolute', 'zIndex': 1, 'bottom': -4, 'right': -4, 'borderColor': null,
'borderWidth': 2, 'borderRadius': 6};
object2.borderColor = importDefault(dependencyMap[9]).colors.BACKGROUND_BASE_LOW;
return {guildBadgeIcon: object2};
});
(FileImportTrackerModule).fileFinishedImporting('modules/launchpad/native/shared/renderChannelItem.tsx');
exports.default = renderChannelItem_117295;
exports.getChannelAccessibilityProps = getChannelAccessibilityProps_117296;
function LaunchpadChannelIcon_117292({channel}) { // fn#117292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15542:392, offset: 0x024ada05, size: 252 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = (GetLayoutStyles)();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(channel.guild_id);
});
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const view = (
{((Component) => )(GuildIcon)}
);
const ChannelIcon = (AppLauncherChannelListActionSheetModule).ChannelIcon;
return (
<>
{view}
>
);
}
function renderChannelItem_117295({channel, channelCategoryName, subtitle, unreadBadge, mentionBadge, locked, unread, resolvedUnreadSetting = UnreadSetting.ONLY_MENTIONS, live, muted, latestMessageTimestamp, end, connected, mentionCount, channelName, fontScale, isSubscriptionGated, needSubscriptionToAccess}) { // fn#117295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15542:798, offset: 0x024adb42, size: 702 bytes, params: 2, frame: 44
var r26;
var moduleValue2;
locked = !(locked === undefined) && locked;
unread = !(unread === undefined) && unread;
live = !(live === undefined) && live;
muted = !(muted === undefined) && muted;
isSubscriptionGated = !(isSubscriptionGated === undefined) && isSubscriptionGated;
needSubscriptionToAccess = !(needSubscriptionToAccess === undefined) && needSubscriptionToAccess;
const r21 = latestMessageTimestamp == null || muted ? null : (require(4788) /* metro dependency 4788: NotificationCenterUtils */).getRelativeTimestamp(latestMessageTimestamp);
const value5 = (GetLayoutStyles)();
const defaultImport = RenderChannelWrapper;
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const items2 = [unreadBadge];
const object2 = {'position': 'relative', 'borderRadius': null, 'justifyContent': 'center', 'alignItems': 'center',
'flexShrink': 0, 'flexGrow': 0};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.width = value5.icon.wrapper.size;
object2.height = value5.icon.wrapper.size;
copyDataProperties(object2, value5.icon.margin, undefined);
items2[1] = (
{
channel.isGroupDM()
? ((Component) => )(importDefault(9719) /* metro dependency 9719: GroupDMAvatar */)
: (
)
}
);
const defaultImport3 = RenderChannelContent;
if (channelName != null) {
r26 = channelName;
} else {
moduleValue2 = require(4805) /* metro dependency 4805: useChannelName */;
r26 = moduleValue2.computeChannelName(channel, UserStore, RelationshipStore);
}
items2[2] = defaultImport3({name: r26, subtitle: subtitle, unread: unread,
resolvedUnreadSetting: resolvedUnreadSetting, muted: muted, lastMessageTimestampString: r21, channel: channel,
channelCategoryName: channelCategoryName, locked: locked, connected: connected, live: live,
mentionCount: mentionCount, mentionBadge: mentionBadge, isSubscriptionGated: isSubscriptionGated,
needSubscriptionToAccess: needSubscriptionToAccess});
items2[3] = (
end != null
? (
{end}
)
: null
);
return defaultImport(<>{items2}>, {fontScale: fontScale});
}
function getChannelAccessibilityProps_117296({channel, unread, mentionCount, voiceStates, embeddedActivitiesCount}) { // fn#117296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15542:1922, offset: 0x024ade00, size: 108 bytes, params: 2, frame: 17
const object = {'accessible': true, 'accessibilityRole': 'button'};
object.accessibilityLabel = (importDefault(9122) /* metro dependency 9122: getChannelA11yLabel */)({channel: channel,
unread: unread, mentionCount: mentionCount, voiceStates: voiceStates,
embeddedActivitiesCount: embeddedActivitiesCount});
return object;
}
}
global.__d(_fun117291, 15345, [31, 27, 1867, 3793, 1878, 4865, 33, 9122, 4501, 697, 15332, 566, 6819, 11727, 4788,
15334, 9719, 15337, 4805,
2]) /* metro module 15345, dependencies: [31, 27, 1867, 3793, 1878, 4865, 33, 9122, 4501, 697, 15332, 566, 6819, 11727, 4788, 15334, 9719, 15337, 4805, 2] */;