108 lines
6.3 KiB
TypeScript
108 lines
6.3 KiB
TypeScript
/* Metro module 14663; source: modules/premium/powerups/native/GuildPowerupsPerkCard.tsx; dependencies: [31, 27, 33, 4501, 697, 4048, 4002, 14660, 14643, 4589, 4573, 14644, 1305, 1244, 2] */
|
|
import UseTheme from '../../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
|
|
import GuildPowerupsCard from './GuildPowerupsCard.tsx'; /* Metro dependency 14660 */
|
|
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 SharedModule from '../../../../design/shared.tsx'; /* Metro dependency 4002 */
|
|
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as GuildPowerupsCardFooterModule from './GuildPowerupsCardFooter.tsx'; /* Metro dependency 14644 */
|
|
|
|
function _fun110726(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14860:6, offset: 0x02384581, size: 433 bytes, params: 8, frame: 23
|
|
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;
|
|
object = {};
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object.container = {marginHorizontal: PX_16};
|
|
object.card = {'padding': 0, 'overflow': 'hidden'};
|
|
const object3 = {};
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object3.gap = PX_16;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object3.padding = PX_16;
|
|
object.contentContainer = object3;
|
|
object.imageContainer = {'width': '100%', 'height': 160};
|
|
object.gradient = {'position': 'absolute', 'left': 0, 'right': 0, 'top': 0, 'height': '100%'};
|
|
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
|
object.headerContainer = {gap: PX_4};
|
|
const object5 = {position: 'absolute'};
|
|
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
|
object5.top = PX_12;
|
|
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
|
object5.right = PX_12;
|
|
object.badge = object5;
|
|
const env0_6 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/premium/powerups/native/GuildPowerupsPerkCard.tsx');
|
|
exports.default = GuildPowerupsPerkCard;
|
|
function GuildPowerupsPerkCard(a0) { // fn#110727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14860:655, offset: 0x02384732, size: 872 bytes, params: 2, frame: 33
|
|
const TextBadge = (require(1305) /* metro dependency 1305: native */).TextBadge;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const title = a0.title;
|
|
const description = a0.description;
|
|
const imageUrl = a0.imageUrl;
|
|
let isImageAnimated = a0.isImageAnimated;
|
|
isImageAnimated = isImageAnimated === undefined || isImageAnimated;
|
|
const riveComponent = a0.riveComponent;
|
|
const style = a0.style;
|
|
const onPress = a0.onPress;
|
|
const status = a0.status;
|
|
const badge = a0.badge;
|
|
const object = {'title': 0, 'description': 0, 'imageUrl': 0, 'isImageAnimated': 0, 'riveComponent': 0, 'style': 0,
|
|
'onPress': 0, 'status': 0, 'badge': 0};
|
|
silentSetPrototypeOf(object, null, undefined);
|
|
const value = copyDataProperties({}, a0, object, undefined);
|
|
const styles = useStyles();
|
|
const value3 = (UseTheme)();
|
|
const r12 = SharedModule.isThemeDark(value3) ? ['#0f101100', '#0f101166'] : ['#0f101100', '#0f10111a'];
|
|
const items3 = [styles.container, style];
|
|
const items5 = [
|
|
<View style={styles.imageContainer}>
|
|
{riveComponent ?? ((Component) => <Component imageUrl={imageUrl ?? ''} isAnimated={isImageAnimated} />)(importDefault(14643) /* metro dependency 14643: GuildPowerupsImage */)}
|
|
{((Component) => <Component colors={r12} style={styles.gradient} />)(importDefault(4589) /* metro dependency 4589 */)}
|
|
</View>,
|
|
];
|
|
const Text = (TextModule).Text;
|
|
const view = (
|
|
<View style={styles.headerContainer}>
|
|
<Text variant="heading-md/bold">
|
|
{title}
|
|
</Text>
|
|
<Text variant="text-sm/medium">
|
|
{description}
|
|
</Text>
|
|
</View>
|
|
);
|
|
const GuildPowerupsCardFooter = (GuildPowerupsCardFooterModule).GuildPowerupsCardFooter;
|
|
items5[1] = (
|
|
<View style={styles.contentContainer}>
|
|
{view}
|
|
<GuildPowerupsCardFooter {...value} {...{['status']: status}} />
|
|
</View>
|
|
);
|
|
items5[2] = badge === 'new' && <TextBadge text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)} style={styles.badge} />;
|
|
items5[3] = badge === 'beta' && <TextBadge text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oW0eUd)} color={(require(1305) /* metro dependency 1305: native */).BadgeColors.BRAND} style={styles.badge} />;
|
|
return (
|
|
<GuildPowerupsCard
|
|
containerStyle={items3}
|
|
style={styles.card}
|
|
status={status}
|
|
onPress={onPress}
|
|
>
|
|
{items5}
|
|
</GuildPowerupsCard>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun110726, 14663, [31, 27, 33, 4501, 697, 4048, 4002, 14660, 14643, 4589, 4573, 14644, 1305, 1244,
|
|
2]) /* metro module 14663, dependencies: [31, 27, 33, 4501, 697, 4048, 4002, 14660, 14643, 4589, 4573, 14644, 1305, 1244, 2] */;
|