decord/source/design/components/Sheet/native/PromoSheet.native.tsx

102 lines
3.8 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 8056
// Function ID: 8057
2026-07-20 16:05:17 +00:00
// Name: PromoSheet
2026-08-24 06:08:38 +00:00
// Dependencies: [109, 19, 17, 21, 4668, 712, 1367, 8057, 6988, 4738, 8058, 4739, 2]
2026-07-20 16:05:17 +00:00
// Exports: PromoSheet
2026-08-24 06:08:38 +00:00
// Module 8056 (PromoSheet)
import ThemesDefault from "Themes" /* 712 */;
import useIsMobileVisualRefreshExperimentEnabledDefault from "useIsMobileVisualRefreshExperimentEnabled" /* 1367 */;
import closure_4 from "_objectWithoutProperties" /* 109 */;
import closure_5 from "noop" /* 19 */;
import { View } from "get ActivityIndicator" /* 17 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
let closure_3 = ["title", "description", "illustration", "graphic", "gradientColor", "actions"];
2026-08-24 06:08:38 +00:00
({ jsx: error, jsxs: closure_8 } = jsxProd);
2026-07-29 08:29:29 +00:00
createCacheKey = { content: { paddingHorizontal: 20, position: "relative" }, title: { textAlign: "center" }, description: { textAlign: "center" }, illustration: { alignSelf: "stretch", alignItems: "center" }, graphic: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { alignSelf: "center", maxWidth: ThemesDefault.modules.mobile.PROMO_SHEET_GRAPHIC_MAX_WIDTH };
2026-07-29 08:29:29 +00:00
createCacheKey[4] = createCacheKey;
2026-08-24 06:08:38 +00:00
let closure_9 = createCacheKey.createStyles(createCacheKey);
const result = require("set").fileFinishedImporting("design/components/Sheet/native/PromoSheet.native.tsx");
2026-07-20 16:05:17 +00:00
export const PromoSheet = function PromoSheet(arg0) {
({ description, illustration, graphic, gradientColor } = arg0);
({ title, actions } = arg0);
2026-08-24 06:08:38 +00:00
const tmp3 = useIsMobileVisualRefreshExperimentEnabledDefault("PromoSheet");
2026-07-29 08:29:29 +00:00
importDefault = tmp3;
2026-08-24 06:08:38 +00:00
const tmp4 = callback2();
2026-07-29 08:29:29 +00:00
const items = [tmp3, gradientColor];
2026-07-20 16:05:17 +00:00
const memo = React.useMemo(() => {
2026-07-23 10:11:24 +00:00
if (closure_1) {
2026-07-20 16:05:17 +00:00
if (null != gradientColor) {
return (arg0) => {
let obj = {};
const merged = Object.assign(arg0);
2026-08-24 06:08:38 +00:00
obj = { offsetBottom: 0.25, color: closure_0, backgroundColor: closure_1_1(closure_1_2[5]).colors.MOBILE_ACTIONSHEET_BACKGROUND };
obj.children = closure_1_7(closure_1_0(closure_1_2[7]).ExpressiveGradient, obj);
return closure_1_7(closure_1_6, obj);
2026-07-20 16:05:17 +00:00
};
}
}
}, items);
let obj = {};
2026-07-23 10:11:24 +00:00
let merged = Object.assign(callback(arg0, closure_3));
2026-07-29 08:29:29 +00:00
obj.startExpanded = true;
obj.contentStyles = tmp4.content;
obj.backgroundComponent = memo;
if (tmp3) {
2026-07-20 16:05:17 +00:00
if (null != graphic) {
obj = {};
const merged1 = Object.assign(graphic);
2026-07-29 08:29:29 +00:00
obj.style = tmp4.graphic;
2026-08-24 06:08:38 +00:00
let tmp6Result = tmp6(tmp7(8058).Graphic, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const items1 = [tmp6Result, , ];
let str = "heading-xl/bold";
if (tmp3) {
str = "heading-xl/semibold";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { variant: null, color: "mobile-text-heading-primary", style: null, children: null };
obj[0] = str;
obj[2] = tmp4.title;
obj[3] = title;
2026-08-24 06:08:38 +00:00
const items2 = [tmp6(tmp7(4739).Text, obj), ];
2026-07-29 08:29:29 +00:00
tmp6Result = null;
2026-07-20 16:05:17 +00:00
if (null != description) {
2026-07-29 08:29:29 +00:00
let str2 = "text-md/medium";
if (tmp3) {
str2 = "redesign/heading-18/medium";
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
obj1 = { variant: null, color: null, style: null, children: null };
2026-07-29 08:29:29 +00:00
obj1[0] = str2;
let str3 = "text-default";
if (tmp3) {
str3 = "text-subtle";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj1[1] = str3;
obj1[2] = tmp4.description;
obj1[3] = description;
2026-08-24 06:08:38 +00:00
tmp6Result = tmp6(tmp7(4739).Text, obj1);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj2 = { spacing: 24, children: null };
const obj3 = { children: null };
items2[1] = tmp6Result;
obj3[0] = items2;
2026-08-24 06:08:38 +00:00
items1[1] = tmp9(tmp7(4738).Stack, obj3);
2026-07-20 16:05:17 +00:00
items1[2] = actions;
2026-07-29 08:29:29 +00:00
obj2[1] = items1;
obj.children = tmp9(tmp10, obj2);
2026-08-24 06:08:38 +00:00
return tmp6(gradientColor(6988).BottomSheet, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp6Result = null;
2026-07-20 16:05:17 +00:00
if (null != illustration) {
2026-07-29 08:29:29 +00:00
const obj4 = { style: null, children: null };
obj4[0] = tmp4.illustration;
obj4[1] = illustration;
tmp6Result = tmp6(View, obj4);
2026-07-20 16:05:17 +00:00
}
};