122 lines
7.0 KiB
TypeScript
122 lines
7.0 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] */
|
|
import Module11060 from '../../../by-id/module-11060.js'; /* Metro dependency 11060 */
|
|
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
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 StickerPickerConstantsModule from './StickerPickerConstants.tsx'; /* Metro dependency 11028 */
|
|
|
|
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
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
const {PADDING_HORIZONTAL, PADDING_VERTICAL} = StickerPickerConstantsModule;
|
|
const value4 = 2 * PADDING_VERTICAL;
|
|
const createStyles = CreateStylesModule.createStyles;
|
|
object = {};
|
|
const object2 = {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;
|
|
object2.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
|
object.section = object2;
|
|
object.label = {flex: -1};
|
|
object.header = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between'};
|
|
object.bannerContainer = {'aspectRatio': 3.824074074074074, 'marginVertical': -8, 'width': '100%'};
|
|
object.banner = {height: '100%'};
|
|
object.headline = {'height': 20, 'flex': 1, 'flexDirection': 'row', 'alignItems': 'center'};
|
|
const object5 = {'marginLeft': 8, 'height': 16, 'width': 16, 'borderRadius': null, 'backgroundColor': null,
|
|
'alignItems': 'center', 'justifyContent': 'center'};
|
|
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
|
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object5.backgroundColor = BORDER_SUBTLE;
|
|
object.iconContainer = object5;
|
|
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
|
object.icon = {color: INTERACTIVE_TEXT_DEFAULT};
|
|
object.animatedIcon = {'position': 'relative', 'left': 1};
|
|
object.premiumIcon = {'position': 'relative', 'left': -1};
|
|
const env0_7 = Reflect.apply(createStyles, CreateStylesModule, [object]);
|
|
value = value.memo(_fun84682);
|
|
(FileImportTrackerModule).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 = (TextModule).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: Module11060, 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 = (IndexNativeModule).intl;
|
|
const fragment = (
|
|
<>
|
|
{view}
|
|
{r8}
|
|
<Text
|
|
lineClamp={1}
|
|
variant="text-xs/medium"
|
|
color="text-default"
|
|
>
|
|
{intl.format((IndexNativeModule).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}
|
|
</>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun84681, 11058, [31, 27, 11028, 33, 4501, 697, 4573, 4643, 1305, 11059, 11060, 1244, 11061, 5278,
|
|
2]) /* metro module 11058, dependencies: [31, 27, 11028, 33, 4501, 697, 4573, 4643, 1305, 11059, 11060, 1244, 11061, 5278, 2] */;
|