decord/source/modules/stickers/native/StickerPackHeader.tsx

115 lines
5.2 KiB
TypeScript
Raw Normal View History

// Module ID: 10325
// Function ID: 10326
// Dependencies: [19, 17, 10202, 21, 4481, 709, 4477, 4860, 1296, 10326, 10327, 1233, 10328, 5084, 2]
2026-07-20 16:05:17 +00:00
// Module 10325
2026-09-02 09:53:35 +00:00
import ThemesDefault from "Themes" /* 709 */;
import getSystemLocale from "getSystemLocale" /* 1233 */;
import Button from "Button" /* 1296 */;
import Text from "Text" /* 4477 */;
import getStickerExtensionFromFormatType from "getStickerExtensionFromFormatType" /* 4860 */;
import registerAssetDefault from "registerAsset" /* 10326 */;
import registerAssetDefault2 from "registerAsset" /* 10327 */;
import StickerPackBannerDefault from "StickerPackBanner" /* 10328 */;
2026-08-24 06:08:38 +00:00
import { View } from "get ActivityIndicator" /* 17 */;
import PADDING_HORIZONTAL from "PADDING_HORIZONTAL" /* 10202 */;
2026-08-24 06:08:38 +00:00
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4481 */;
2026-08-24 06:08:38 +00:00
import importAllResult from "noop" /* 19 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-29 08:29:29 +00:00
({ PADDING_VERTICAL, PADDING_HORIZONTAL } = PADDING_HORIZONTAL);
({ jsx: c4, jsxs: c5, Fragment: closure_6 } = jsxProd);
2026-07-23 10:11:24 +00:00
let result = 2 * PADDING_VERTICAL;
2026-07-29 08:29:29 +00:00
let obj = { section: null, label: null, header: null, bannerContainer: null, banner: null, headline: null, iconContainer: null, icon: null, animatedIcon: null, premiumIcon: null };
2026-08-24 06:08:38 +00:00
obj = { paddingTop: PADDING_VERTICAL, paddingHorizontal: PADDING_HORIZONTAL, height: 36 + result, justifyContent: "center", overflow: "hidden", backgroundColor: ThemesDefault.colors.BACKGROUND_SURFACE_HIGH };
2026-07-29 08:29:29 +00:00
obj[0] = obj;
obj[1] = { flex: -1 };
obj[2] = { flexDirection: "row", alignItems: "center", justifyContent: "space-between" };
obj[3] = { aspectRatio: 3.824074074074074, marginVertical: -8, width: "100%" };
obj[4] = { height: "100%" };
obj[5] = { height: 20, flex: 1, flexDirection: "row", alignItems: "center" };
2026-08-24 06:08:38 +00:00
createCacheKey = { marginLeft: 8, height: 16, width: 16, borderRadius: ThemesDefault.radii.sm, backgroundColor: ThemesDefault.colors.BORDER_SUBTLE, alignItems: "center", justifyContent: "center" };
2026-07-29 08:29:29 +00:00
obj[6] = createCacheKey;
2026-08-24 06:08:38 +00:00
obj[7] = { color: ThemesDefault.colors.INTERACTIVE_TEXT_DEFAULT };
2026-07-29 08:29:29 +00:00
obj[8] = { position: "relative", left: 1 };
obj[9] = { position: "relative", left: -1 };
let closure_7 = createCacheKey.createStyles(obj);
2026-08-24 06:08:38 +00:00
let obj2 = { color: ThemesDefault.colors.INTERACTIVE_TEXT_DEFAULT };
2026-07-20 16:05:17 +00:00
const memoResult = importAllResult.memo((withDescription) => {
({ stickerPack, style, onPress, withBanner } = withDescription);
if (withBanner === undefined) {
withBanner = false;
}
let flag = withDescription.withDescription;
if (flag === undefined) {
flag = false;
}
const tmp = callback2();
2026-07-29 08:29:29 +00:00
let obj = { style: tmp.header, children: null };
obj = { style: tmp.headline, children: null };
obj = { style: tmp.label, lineClamp: 1, variant: "text-md/bold", color: "mobile-text-heading-primary", children: stickerPack.name };
2026-08-24 06:08:38 +00:00
const items = [callback(Text.Text, obj), , ];
let obj3 = getStickerExtensionFromFormatType;
2026-07-29 08:29:29 +00:00
let result = obj3.isStickerPackAnimated(stickerPack);
2026-07-20 16:05:17 +00:00
if (result) {
2026-08-24 06:08:38 +00:00
obj1 = { style: null, children: null };
2026-07-29 08:29:29 +00:00
obj1[0] = tmp.iconContainer;
const obj2 = { source: null, style: null, size: null, color: null };
2026-08-24 06:08:38 +00:00
obj2[0] = registerAssetDefault;
2026-07-29 08:29:29 +00:00
obj2[1] = tmp.animatedIcon;
2026-09-02 09:53:35 +00:00
obj2[2] = tmp6(1296).Icon.Sizes.EXTRA_SMALL;
2026-07-29 08:29:29 +00:00
obj2[3] = tmp.icon.color;
2026-09-02 09:53:35 +00:00
obj1[1] = tmp4(tmp6(1296).Icon, obj2);
2026-07-29 08:29:29 +00:00
result = tmp4(tmp5, obj1);
2026-07-20 16:05:17 +00:00
}
items[1] = result;
2026-08-24 06:08:38 +00:00
obj3 = { style: tmp.iconContainer, children: callback(Button.Icon, { source: registerAssetDefault2, style: tmp.premiumIcon, size: Button.Icon.Sizes.EXTRA_SMALL, color: tmp.icon.color }) };
2026-07-29 08:29:29 +00:00
items[2] = callback(View, obj3);
obj[1] = items;
obj[1] = closure_5(View, obj);
2026-07-20 16:05:17 +00:00
const items1 = [callback(View, obj), , ];
if (flag) {
flag = null != stickerPack.description;
}
if (flag) {
2026-07-29 08:29:29 +00:00
const obj5 = { variant: "text-sm/medium", children: null };
obj5[1] = stickerPack.description;
flag = tmp4(tmp6(4477).Text, obj5);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj6 = { children: null };
2026-07-20 16:05:17 +00:00
items1[1] = flag;
2026-07-29 08:29:29 +00:00
const obj7 = { lineClamp: 1, variant: "text-xs/medium", color: "text-default", children: null };
2026-09-02 09:53:35 +00:00
const intl = tmp6(1233).intl;
2026-08-24 06:08:38 +00:00
obj7[3] = intl.format(getSystemLocale.t["0S3JpO"], { numStickers: stickerPack.stickers.length });
items1[2] = callback(Text.Text, obj7);
2026-07-29 08:29:29 +00:00
obj6[0] = items1;
const tmp2Result = closure_5(closure_6, obj6);
2026-07-20 16:05:17 +00:00
if (withBanner) {
2026-07-29 08:29:29 +00:00
const obj9 = { stickerPack: null, containerStyle: null, style: null };
obj9[0] = stickerPack;
({ bannerContainer: obj13[1], banner: obj13[2] } = tmp);
2026-08-24 06:08:38 +00:00
withBanner = tmp4(StickerPackBannerDefault, obj9);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const children = [withBanner, ];
2026-07-20 16:05:17 +00:00
if (null != onPress) {
2026-07-29 08:29:29 +00:00
const obj10 = { style: null, onPress: null, accessibilityRole: "header", children: null };
2026-07-20 16:05:17 +00:00
const items3 = [tmp.section, style];
2026-07-29 08:29:29 +00:00
obj10[0] = items3;
obj10[1] = onPress;
obj10[3] = tmp2Result;
let tmp4Result = tmp4(tmp6(5084).PressableOpacity, obj10);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const obj11 = { style: null, children: null };
2026-07-20 16:05:17 +00:00
const items4 = [tmp.section, style];
2026-07-29 08:29:29 +00:00
obj11[0] = items4;
obj11[1] = tmp2Result;
tmp4Result = tmp4(tmp5, obj11);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
children[1] = tmp4Result;
return closure_5(closure_6, { children });
2026-07-20 16:05:17 +00:00
});
2026-08-24 06:08:38 +00:00
const result1 = require("set").fileFinishedImporting("modules/stickers/native/StickerPackHeader.tsx");
2026-07-20 16:05:17 +00:00
export default memoResult;