181 lines
8.7 KiB
TypeScript
181 lines
8.7 KiB
TypeScript
/* Metro module 13418; source: modules/parent_tools/native/FamilyCenterActivityGiftRow.tsx; dependencies: [31, 27, 33, 4501, 697, 8405, 13406, 13415, 13417, 3995, 13416, 4573, 2] */
|
|
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import UseCollectiblesData from '../../collectibles/hooks/useCollectiblesData.tsx'; /* Metro dependency 8405 */
|
|
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 TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as UseSelectedTeenUserModule from '../hooks/useSelectedTeenUser.tsx'; /* Metro dependency 13406 */
|
|
|
|
function _fun102089(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13608:6, offset: 0x0222bfec, size: 262 bytes, params: 8, frame: 21
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
let value = JsxRuntimeModule;
|
|
const env0_4 = value.jsx;
|
|
const env0_5 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
const BORDER_SUBTLE = (Native).colors.BORDER_SUBTLE;
|
|
const env0_6 = Reflect.apply(createStyles, value, [{container: {'display': 'flex', 'flexDirection': 'row',
|
|
'alignItems': 'center', 'borderBottomColor': null, 'borderBottomWidth': 1, 'paddingVertical': 12,
|
|
borderBottomColor: BORDER_SUBTLE}, textContainer: {'display': 'flex', 'flexDirection': 'column',
|
|
'flexShrink': 1}}]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/native/FamilyCenterActivityGiftRow.tsx');
|
|
exports.default = FamilyCenterActivityGiftRow;
|
|
function FamilyCenterActivityGiftRow({skuId, subscriptionPlanId, price, gifterUserId, claimed, offeredAt, claimedAt}) { // fn#102090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13608:496, offset: 0x0222c0f2, size: 519 bytes, params: 2, frame: 27
|
|
var moduleValue3;
|
|
var getGiftSubtext;
|
|
var object;
|
|
var value6;
|
|
var items3;
|
|
const Text = (TextModule).Text;
|
|
var items2;
|
|
const styles = useStyles();
|
|
const product = (UseCollectiblesData)(skuId).product;
|
|
const value2 = (UseSelectedTeenUserModule).useTeenUserForId(gifterUserId);
|
|
const {displayName,
|
|
isSubscription} = (require(13415) /* metro dependency 13415: FamilyCenterActivityPurchaseRowUtils */).getPurchaseDisplayInfo(product ?? null,
|
|
subscriptionPlanId);
|
|
if (skuId == null) {
|
|
if (displayName == null) {
|
|
return null;
|
|
}
|
|
moduleValue3 = require(13417) /* metro dependency 13417: FamilyCenterActivityGiftRowUtils */;
|
|
getGiftSubtext = moduleValue3.getGiftSubtext;
|
|
object = {claimed: claimed, price: price};
|
|
object.gifterName = value2 != null ? (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(value2) : null;
|
|
object.offeredAt = offeredAt;
|
|
object.claimedAt = claimedAt;
|
|
value6 = Reflect.apply(getGiftSubtext, moduleValue3, [object]);
|
|
var viewBindingProps = {style: styles.container};
|
|
items3 = [
|
|
((Component) => <Component displayName={displayName} product={product ?? null} isSubscription={isSubscription} subscriptionPlanId={subscriptionPlanId} />)(importDefault(13416) /* metro dependency 13416: FamilyCenterActivityItemPreview */),
|
|
|
|
|
|
];
|
|
var viewBinding2Props = {style: styles.textContainer};
|
|
items2 = [
|
|
<Text
|
|
variant="text-md/semibold"
|
|
color="interactive-text-active"
|
|
ellipsizeMode="tail"
|
|
lineClamp={1}
|
|
>
|
|
{displayName}
|
|
</Text>,
|
|
];
|
|
items2[1] = (
|
|
<Text variant="text-xs/medium" color="text-muted">
|
|
{value6}
|
|
</Text>
|
|
);
|
|
items3[1] = (
|
|
<View {...viewBinding2Props}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
return (
|
|
<View {...viewBindingProps}>
|
|
{items3}
|
|
</View>
|
|
);
|
|
}
|
|
if (isSubscription) {
|
|
if (displayName == null) {
|
|
return null;
|
|
}
|
|
moduleValue3 = require(13417) /* metro dependency 13417: FamilyCenterActivityGiftRowUtils */;
|
|
getGiftSubtext = moduleValue3.getGiftSubtext;
|
|
object = {claimed: claimed, price: price};
|
|
object.gifterName = value2 != null ? (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(value2) : null;
|
|
object.offeredAt = offeredAt;
|
|
object.claimedAt = claimedAt;
|
|
value6 = Reflect.apply(getGiftSubtext, moduleValue3, [object]);
|
|
var viewBindingProps = {style: styles.container};
|
|
items3 = [
|
|
((Component) => <Component displayName={displayName} product={product ?? null} isSubscription={isSubscription} subscriptionPlanId={subscriptionPlanId} />)(importDefault(13416) /* metro dependency 13416: FamilyCenterActivityItemPreview */),
|
|
|
|
|
|
];
|
|
var viewBinding2Props = {style: styles.textContainer};
|
|
items2 = [
|
|
<Text
|
|
variant="text-md/semibold"
|
|
color="interactive-text-active"
|
|
ellipsizeMode="tail"
|
|
lineClamp={1}
|
|
>
|
|
{displayName}
|
|
</Text>,
|
|
];
|
|
items2[1] = (
|
|
<Text variant="text-xs/medium" color="text-muted">
|
|
{value6}
|
|
</Text>
|
|
);
|
|
items3[1] = (
|
|
<View {...viewBinding2Props}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
return (
|
|
<View {...viewBindingProps}>
|
|
{items3}
|
|
</View>
|
|
);
|
|
}
|
|
if (product != null) {
|
|
if (displayName == null) {
|
|
return null;
|
|
}
|
|
moduleValue3 = require(13417) /* metro dependency 13417: FamilyCenterActivityGiftRowUtils */;
|
|
getGiftSubtext = moduleValue3.getGiftSubtext;
|
|
object = {claimed: claimed, price: price};
|
|
object.gifterName = value2 != null ? (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(value2) : null;
|
|
object.offeredAt = offeredAt;
|
|
object.claimedAt = claimedAt;
|
|
value6 = Reflect.apply(getGiftSubtext, moduleValue3, [object]);
|
|
var viewBindingProps = {style: styles.container};
|
|
items3 = [
|
|
((Component) => <Component displayName={displayName} product={product ?? null} isSubscription={isSubscription} subscriptionPlanId={subscriptionPlanId} />)(importDefault(13416) /* metro dependency 13416: FamilyCenterActivityItemPreview */),
|
|
|
|
|
|
];
|
|
var viewBinding2Props = {style: styles.textContainer};
|
|
items2 = [
|
|
<Text
|
|
variant="text-md/semibold"
|
|
color="interactive-text-active"
|
|
ellipsizeMode="tail"
|
|
lineClamp={1}
|
|
>
|
|
{displayName}
|
|
</Text>,
|
|
];
|
|
items2[1] = (
|
|
<Text variant="text-xs/medium" color="text-muted">
|
|
{value6}
|
|
</Text>
|
|
);
|
|
items3[1] = (
|
|
<View {...viewBinding2Props}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
return (
|
|
<View {...viewBindingProps}>
|
|
{items3}
|
|
</View>
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun102089, 13418, [31, 27, 33, 4501, 697, 8405, 13406, 13415, 13417, 3995, 13416, 4573,
|
|
2]) /* metro module 13418, dependencies: [31, 27, 33, 4501, 697, 8405, 13406, 13415, 13417, 3995, 13416, 4573, 2] */;
|