/* Metro module 13413; source: modules/parent_tools/native/FamilyCenterActivityRow.tsx; dependencies: [31, 27, 1878, 5116, 5117, 661, 33, 4501, 697, 1305, 44, 632, 21, 4573, 3995, 5187, 6819, 8642, 1244, 2224, 13414, 13417, 13418, 2] */
import SnowflakeUtils from '../../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import Module00044 from '../../../by-id/module-00044.js'; /* Metro dependency 44 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import UserUtils from '../../../utils/UserUtils.tsx'; /* Metro dependency 3995 */
import FamilyCenterStore from '../FamilyCenterStore.tsx'; /* Metro dependency 5116 */
import GuildIcon from '../../guild/native/GuildIcon.tsx'; /* Metro dependency 6819 */
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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as FamilyCenterConstantsModule from '../FamilyCenterConstants.tsx'; /* Metro dependency 5117 */
import * as GuildIconModule from '../../guild/native/GuildIcon.tsx'; /* Metro dependency 6819 */
function _fun102063(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13603:6, offset: 0x0222a338, size: 802 bytes, params: 8, frame: 27
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ReactModule;
let createStyles = CreateStylesModule.createStyles;
object = {};
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object.container = {'display': 'flex', 'flexDirection': 'row', 'borderBottomColor': null, 'borderBottomWidth': 1,
'paddingVertical': 12, borderBottomColor: BORDER_SUBTLE};
const object3 = {};
const AVATAR_SIZE_MAP = (NativeModule).AVATAR_SIZE_MAP;
const AvatarSizes = (NativeModule).AvatarSizes;
const NORMAL = AvatarSizes.NORMAL;
object3.borderRadius = AVATAR_SIZE_MAP[NORMAL] / 2;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object3.backgroundColor = BACKGROUND_SURFACE_HIGH;
object.avatar = object3;
object.avatarContainer = {'marginRight': 12, 'alignItems': 'flex-start'};
object.textContainer = {'display': 'flex', 'flexDirection': 'column', 'flexShrink': 1};
object.text = {'display': 'flex', 'flexDirection': 'row', 'flexShrink': 1};
const env0_10 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value.memo(_fun102064).displayName = 'FamilyCenterActivityRowUser';
createStyles = CreateStylesModule.createStyles;
object = {};
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object.container = {'display': 'flex', 'alignItems': 'center', 'flexDirection': 'row', 'borderBottomColor': null,
'borderBottomWidth': 1, 'paddingVertical': 12, borderBottomColor: BORDER_SUBTLE};
const object5 = {'borderRadius': null, 'borderColor': null, 'height': 40, 'width': 40, 'margin': 0,
'backgroundColor': null, 'marginRight': 12};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object5.borderColor = BACKGROUND_BASE_LOW;
const BACKGROUND_SURFACE_HIGHEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGHEST;
object5.backgroundColor = BACKGROUND_SURFACE_HIGHEST;
object.avatar = object5;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object.avatarText = {color: TEXT_DEFAULT};
object.text = {'display': 'flex', 'flexDirection': 'column', 'flexShrink': 1};
object.headerContainer = {'display': 'flex', 'flexDirection': 'row'};
object.badge = {marginRight: 4};
object.header = {paddingRight: 16};
object.headerAndIconContainer = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center'};
const env0_12 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(_fun102066);
value.displayName = 'FamilyCenterActivityRowGuild';
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/native/FamilyCenterActivityRow.tsx');
exports.default = FamilyCenterActivityRow;
function _fun102064({action}) { // fn#102064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13603:696, offset: 0x0222a65a, size: 527 bytes, params: 2, frame: 27
const styles = useStyles();
const value2 = ACTION_TO_TEXT.get(action.display_type);
(Module00044)(value2, 'No text for action type');
const user = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
function() {
return UserStore.getUser(action.entity_id);
});
if (user == null) {
return null;
}
const defaultImport2 = SnowflakeUtils;
const value3 = defaultImport2.extractTimestamp(action.event_id);
const Avatar = (NativeModule).Avatar;
const items3 = [
,
];
const Text = (TextModule).Text;
let value = UserUtils;
value = (
{value.getName(user)}
);
const items2 = [value];
value = require(5187) /* metro dependency 5187: FamilyCenterUtils */;
const formatUserActivityTimestamp = value.formatUserActivityTimestamp;
const Date = global.Date;
const value4 = Object.create(Date.prototype, {constructor: {value: Date}});
const date = new Date(value3);
items2[1] = (
{Reflect.apply(formatUserActivityTimestamp, value, [(date instanceof Object ? date : value4).getTime(),
value2.timestampFormatter])}
);
items3[1] = (
{items2}
);
return (
{items3}
);
}
function _fun102066({action}) { // fn#102066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13603:2186, offset: 0x0222a88a, size: 693 bytes, params: 2, frame: 32
var r7;
var intl;
const styles = useStyles();
const guild = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getGuild(action.entity_id);
});
const get = ACTION_TO_TEXT.get;
(Module00044)(Reflect.apply(get, ACTION_TO_TEXT, [action.display_type]),
'No text for action type');
if (guild === undefined) {
return null;
}
const features = guild.features;
const has = features.has;
const VERIFIED = GuildFeatures.VERIFIED;
const r12 = Reflect.apply(has, features, [VERIFIED]) || guild.features.has(GuildFeatures.PARTNERED);
const name = guild.name;
const GuildIconSizes = (GuildIconModule).GuildIconSizes;
const NORMAL = GuildIconSizes.NORMAL;
const guildIcon = (
);
const r8 = (
r12
? ((Component) => )(importDefault(8642) /* metro dependency 8642: GuildBadge */)
: null
);
const Text = (TextModule).Text;
const view = (
{r8}
{name}
);
if (guild.approximateMemberCount === undefined) {
r7 = null;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r7 = (
{intl.format((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['5JmNgg'],
{members: guild.approximateMemberCount})}
);
}
return (
{guildIcon}
{view}
{r7}
);
}
function FamilyCenterActivityRow({action}) { // fn#102068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13603:3268, offset: 0x0222ab60, size: 579 bytes, params: 2, frame: 24
var r0;
var moduleValue5;
var moduleValue6;
var familyCenterStoreBinding;
var value2;
var giftRowDisplayInfo;
var value4;
var value5;
var value;
const familyCenterUtilsModule = require(5187) /* metro dependency 5187: FamilyCenterUtils */;
if (familyCenterUtilsModule.isUserAction(action)) {
moduleValue5 = familyCenterUtilsModule;
if (moduleValue5.isPurchase(action)) {
familyCenterStoreBinding = FamilyCenterStore;
value4 = familyCenterStoreBinding.getPurchaseInfo(action.entity_id);
value5 = null;
if (value5 == value4) {
r0 = value5;
} else {
value = importDefault(13414) /* metro dependency 13414: FamilyCenterActivityPurchaseRow */;
value = ((Component) => )(value);
r0 = value;
}
return r0;
}
moduleValue6 = require(5187) /* metro dependency 5187: FamilyCenterUtils */;
if (moduleValue6.isGift(action)) {
familyCenterStoreBinding = FamilyCenterStore;
value2 = familyCenterStoreBinding.getGiftInfo(action.entity_id);
if (value2 == null) {
return null;
}
giftRowDisplayInfo = (require(13417) /* metro dependency 13417: FamilyCenterActivityGiftRowUtils */).getGiftRowDisplayInfo(value2);
return ((Component) => )(importDefault(13418) /* metro dependency 13418: FamilyCenterActivityGiftRow */);
}
return (
{
(require(5187) /* metro dependency 5187: FamilyCenterUtils */).isUserAction(action)
? ((Component) => )(env0_11)
: ((Component) => )(env0_13)
}
);
}
const moduleValue2 = familyCenterUtilsModule;
if (moduleValue2.isGuildAction(action)) {
moduleValue5 = familyCenterUtilsModule;
if (moduleValue5.isPurchase(action)) {
familyCenterStoreBinding = FamilyCenterStore;
value4 = familyCenterStoreBinding.getPurchaseInfo(action.entity_id);
value5 = null;
if (value5 == value4) {
r0 = value5;
} else {
value = importDefault(13414) /* metro dependency 13414: FamilyCenterActivityPurchaseRow */;
value = ((Component) => )(value);
r0 = value;
}
return r0;
}
moduleValue6 = require(5187) /* metro dependency 5187: FamilyCenterUtils */;
if (moduleValue6.isGift(action)) {
familyCenterStoreBinding = FamilyCenterStore;
value2 = familyCenterStoreBinding.getGiftInfo(action.entity_id);
if (value2 == null) {
return null;
}
giftRowDisplayInfo = (require(13417) /* metro dependency 13417: FamilyCenterActivityGiftRowUtils */).getGiftRowDisplayInfo(value2);
return ((Component) => )(importDefault(13418) /* metro dependency 13418: FamilyCenterActivityGiftRow */);
}
return (
{
(require(5187) /* metro dependency 5187: FamilyCenterUtils */).isUserAction(action)
? ((Component) => )(env0_11)
: ((Component) => )(env0_13)
}
);
}
const moduleValue3 = familyCenterUtilsModule;
if (moduleValue3.isPurchase(action)) {
moduleValue5 = familyCenterUtilsModule;
if (moduleValue5.isPurchase(action)) {
familyCenterStoreBinding = FamilyCenterStore;
value4 = familyCenterStoreBinding.getPurchaseInfo(action.entity_id);
value5 = null;
if (value5 == value4) {
r0 = value5;
} else {
value = importDefault(13414) /* metro dependency 13414: FamilyCenterActivityPurchaseRow */;
value = ((Component) => )(value);
r0 = value;
}
return r0;
}
moduleValue6 = require(5187) /* metro dependency 5187: FamilyCenterUtils */;
if (moduleValue6.isGift(action)) {
familyCenterStoreBinding = FamilyCenterStore;
value2 = familyCenterStoreBinding.getGiftInfo(action.entity_id);
if (value2 == null) {
return null;
}
giftRowDisplayInfo = (require(13417) /* metro dependency 13417: FamilyCenterActivityGiftRowUtils */).getGiftRowDisplayInfo(value2);
return ((Component) => )(importDefault(13418) /* metro dependency 13418: FamilyCenterActivityGiftRow */);
}
return (
{
(require(5187) /* metro dependency 5187: FamilyCenterUtils */).isUserAction(action)
? ((Component) => )(env0_11)
: ((Component) => )(env0_13)
}
);
}
const moduleValue4 = familyCenterUtilsModule;
if (moduleValue4.isGift(action)) {
moduleValue5 = familyCenterUtilsModule;
if (moduleValue5.isPurchase(action)) {
familyCenterStoreBinding = FamilyCenterStore;
value4 = familyCenterStoreBinding.getPurchaseInfo(action.entity_id);
value5 = null;
if (value5 == value4) {
r0 = value5;
} else {
value = importDefault(13414) /* metro dependency 13414: FamilyCenterActivityPurchaseRow */;
value = ((Component) => )(value);
r0 = value;
}
return r0;
}
moduleValue6 = require(5187) /* metro dependency 5187: FamilyCenterUtils */;
if (moduleValue6.isGift(action)) {
familyCenterStoreBinding = FamilyCenterStore;
value2 = familyCenterStoreBinding.getGiftInfo(action.entity_id);
if (value2 == null) {
return null;
}
giftRowDisplayInfo = (require(13417) /* metro dependency 13417: FamilyCenterActivityGiftRowUtils */).getGiftRowDisplayInfo(value2);
return ((Component) => )(importDefault(13418) /* metro dependency 13418: FamilyCenterActivityGiftRow */);
}
return (
{
(require(5187) /* metro dependency 5187: FamilyCenterUtils */).isUserAction(action)
? ((Component) => )(env0_11)
: ((Component) => )(env0_13)
}
);
}
return null;
}
}
global.__d(_fun102063, 13413, [31, 27, 1878, 5116, 5117, 661, 33, 4501, 697, 1305, 44, 632, 21, 4573, 3995, 5187,
6819, 8642, 1244, 2224, 13414, 13417, 13418,
2]) /* metro module 13413, dependencies: [31, 27, 1878, 5116, 5117, 661, 33, 4501, 697, 1305, 44, 632, 21, 4573, 3995, 5187, 6819, 8642, 1244, 2224, 13414, 13417, 13418, 2] */;