76 lines
5.6 KiB
TypeScript
76 lines
5.6 KiB
TypeScript
/* Metro module 11058; source: modules/stickers/native/StickerPackHeader.tsx; dependencies: [31, 27, 11028, 33, 4501, 697, 4573, 4643, 1305, 11059, 11060, 1244, 11061, 5278, 2] */
|
|
function _fun84681(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11244:6, offset: 0x01f52c2b, size: 543 bytes, params: 8, frame: 24
|
|
var object3;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = importAll(31) /* metro dependency 31 */;
|
|
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
|
const {PADDING_HORIZONTAL, PADDING_VERTICAL} = require(11028) /* metro dependency 11028: StickerPickerConstants */;
|
|
const value3 = require(33) /* metro dependency 33 */;
|
|
const env0_4 = value3.jsx;
|
|
const env0_5 = value3.jsxs;
|
|
const env0_6 = value3.Fragment;
|
|
const value4 = 2 * PADDING_VERTICAL;
|
|
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = createStylesModule.createStyles;
|
|
object3 = {};
|
|
const object4 = {paddingTop: PADDING_VERTICAL, paddingHorizontal: PADDING_HORIZONTAL, height: 36 + value4,
|
|
justifyContent: 'center', overflow: 'hidden'};
|
|
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
|
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
|
object3.section = object4;
|
|
object3.label = {flex: -1};
|
|
object3.header = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between'};
|
|
object3.bannerContainer = {'aspectRatio': 3.824074074074074, 'marginVertical': -8, 'width': '100%'};
|
|
object3.banner = {height: '100%'};
|
|
object3.headline = {'height': 20, 'flex': 1, 'flexDirection': 'row', 'alignItems': 'center'};
|
|
const object6 = {'marginLeft': 8, 'height': 16, 'width': 16, 'borderRadius': null, 'backgroundColor': null,
|
|
'alignItems': 'center', 'justifyContent': 'center'};
|
|
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
|
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object6.backgroundColor = BORDER_SUBTLE;
|
|
object3.iconContainer = object6;
|
|
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
|
object3.icon = {color: INTERACTIVE_TEXT_DEFAULT};
|
|
object3.animatedIcon = {'position': 'relative', 'left': 1};
|
|
object3.premiumIcon = {'position': 'relative', 'left': -1};
|
|
const env0_7 = Reflect.apply(createStyles, createStylesModule, [object3]);
|
|
value = value.memo(_fun84682);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/native/StickerPackHeader.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function _fun84682({stickerPack, style, onPress, withBanner, withDescription}) { // fn#84682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11244:979, offset: 0x01f52e4a, size: 938 bytes, params: 2, frame: 37
|
|
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
|
withBanner = !(withBanner === undefined) && withBanner;
|
|
withDescription = !(withDescription === undefined) && withDescription;
|
|
const styles = useStyles();
|
|
let jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
const text = <Text style={styles.label} lineClamp={1} variant="text-md/bold" color="mobile-text-heading-primary">{stickerPack.name}</Text>;
|
|
const r17 = (require(4643) /* metro dependency 4643: StickersUtils */).isStickerPackAnimated(stickerPack) && <View style={styles.iconContainer}><Icon source={importDefault(11059) /* metro dependency 11059 */} style={styles.animatedIcon} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.EXTRA_SMALL} color={styles.icon.color} /></View>;
|
|
const iconProps = {source: importDefault(11060) /* metro dependency 11060 */, style: styles.premiumIcon};
|
|
const Icon3 = (require(1305) /* metro dependency 1305: native */).Icon;
|
|
const Sizes = Icon3.Sizes;
|
|
const EXTRA_SMALL = Sizes.EXTRA_SMALL;
|
|
iconProps.size = EXTRA_SMALL;
|
|
iconProps.color = styles.icon.color;
|
|
const view = <View style={styles.header}><View style={styles.headline}>{text}{r17}<View style={styles.iconContainer}><Icon {...iconProps} /></View></View></View>;
|
|
const r8 = withDescription && stickerPack.description != null && <Text variant="text-sm/medium">{stickerPack.description}</Text>;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const fragment = <>{view}{r8}<Text lineClamp={1} variant="text-xs/medium" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['0S3JpO'],
|
|
{numStickers: stickerPack.stickers.length})}</Text></>;
|
|
jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
|
|
const items3 = [withBanner && ((Component) => <Component stickerPack={stickerPack} containerStyle={styles.bannerContainer} style={styles.banner} />)(importDefault(11061) /* metro dependency 11061: StickerPackBanner */)];
|
|
items3[1] = onPress != null ? ((PressableOpacity) => <PressableOpacity style={[styles.section,
|
|
style]} onPress={onPress} accessibilityRole="header">{fragment}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity) : <View style={[styles.section,
|
|
style]}>{fragment}</View>;
|
|
return (
|
|
<>
|
|
{items3}
|
|
</>
|
|
);
|
|
}
|
|
|