decord/source/modules/application_widget/native/UserProfileApplicationWidgetTopHeroLayout.tsx

123 lines
6.3 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 12558
// Function ID: 12559
2026-07-23 10:11:24 +00:00
// Name: UserProfileApplicationWidgetTopHeroLayout
2026-08-25 06:04:03 +00:00
// Dependencies: [32, 19, 17, 676, 5882, 21, 4380, 712, 12559, 12646, 12647, 5416, 4826, 2]
2026-07-23 10:11:24 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 12558 (UserProfileApplicationWidgetTopHeroLayout)
2026-08-24 06:08:38 +00:00
import ThemesDefault from "Themes" /* 712 */;
2026-08-25 06:04:03 +00:00
import LinearGradientDefault from "LinearGradient" /* 4826 */;
import _isNativeReflectConstructDefault from "_isNativeReflectConstruct" /* 5416 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "_slicedToArray" /* 32 */;
import closure_4 from "noop" /* 19 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import { HorizontalGradient } from "ME" /* 676 */;
2026-08-25 06:04:03 +00:00
import { CARD_PADDING } from "ARBITRARY_LARGE_OFFSET" /* 5882 */;
2026-08-24 06:08:38 +00:00
import jsxProd from "jsxProd" /* 21 */;
2026-08-25 06:04:03 +00:00
import createCacheKey from "createCacheKey" /* 4380 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
({ Image: c5, View: closure_6 } = get_ActivityIndicator);
2026-08-24 06:08:38 +00:00
({ jsx: closure_8, jsxs: c9 } = jsxProd);
2026-07-23 10:11:24 +00:00
const sum = CARD_PADDING + 8;
let closure_10 = ["transparent", "black"];
2026-07-29 08:29:29 +00:00
createCacheKey = { root: { position: "relative" }, contentRow: null, heroText: null, heroImageColumn: null, heroImageSkeleton: null, heroImagePositioner: null, heroImageMask: null, heroImageFadeGradient: null, heroImageMaskRemainder: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { flexDirection: "row", gap: ThemesDefault.space.PX_12, minHeight: 140 };
2026-07-29 08:29:29 +00:00
createCacheKey[1] = createCacheKey;
2026-08-24 06:08:38 +00:00
createCacheKey[2] = { flex: 1, minWidth: 120, gap: ThemesDefault.space.PX_4, justifyContent: "center" };
2026-07-29 08:29:29 +00:00
createCacheKey[3] = { flex: 1, alignItems: "flex-end" };
2026-08-24 06:08:38 +00:00
let obj1 = { flex: 1, minWidth: 120, gap: ThemesDefault.space.PX_4, justifyContent: "center" };
createCacheKey[4] = { width: 86, height: 86, marginTop: ThemesDefault.space.PX_12, marginBottom: ThemesDefault.space.PX_16 };
2026-07-29 08:29:29 +00:00
createCacheKey[5] = { position: "absolute", left: "50%", right: -CARD_PADDING, top: -sum, bottom: 0, overflow: "hidden" };
createCacheKey[6] = { flex: 1, flexDirection: "row" };
createCacheKey[7] = { width: 130 };
createCacheKey[8] = { flex: 1, backgroundColor: "black" };
2026-08-24 06:08:38 +00:00
let closure_11 = createCacheKey.createStyles(createCacheKey);
let obj2 = { width: 86, height: 86, marginTop: ThemesDefault.space.PX_12, marginBottom: ThemesDefault.space.PX_16 };
let result = require("set").fileFinishedImporting("modules/application_widget/native/UserProfileApplicationWidgetTopHeroLayout.tsx");
2026-07-23 10:11:24 +00:00
export default function UserProfileApplicationWidgetTopHeroLayout(header) {
2026-07-24 07:16:23 +00:00
({ topConfig, resolveFieldValue, numberFormat } = header);
2026-07-29 08:29:29 +00:00
let _require;
2026-08-24 06:08:38 +00:00
const tmp = callback4();
2026-07-29 08:29:29 +00:00
[tmp3, c0] = callback(React.useState(null), 2);
2026-08-25 06:04:03 +00:00
let obj = _require(12559);
2026-07-23 10:11:24 +00:00
const textComponentValues = obj.resolveTextComponentValues(topConfig.components.title, resolveFieldValue, numberFormat, true);
2026-08-25 06:04:03 +00:00
obj1 = _require(12559);
2026-07-23 10:11:24 +00:00
const textComponentValues1 = obj1.resolveTextComponentValues(topConfig.components.subtitle_1, resolveFieldValue, numberFormat);
2026-08-25 06:04:03 +00:00
let obj2 = _require(12559);
2026-07-23 10:11:24 +00:00
const textComponentValues2 = obj2.resolveTextComponentValues(topConfig.components.subtitle_2, resolveFieldValue, numberFormat);
2026-08-25 06:04:03 +00:00
let obj3 = _require(12559);
2026-07-23 10:11:24 +00:00
const hero_image = topConfig.components.hero_image;
let image;
const textComponentValues3 = obj3.resolveTextComponentValues(topConfig.components.subtitle_3, resolveFieldValue, numberFormat);
2026-07-29 08:29:29 +00:00
if (hero_image != null) {
2026-07-23 10:11:24 +00:00
image = hero_image.fields.image;
}
2026-08-25 06:04:03 +00:00
const items = [_require(12559).ResolvedValueType.MEDIA];
2026-07-23 10:11:24 +00:00
const fieldValue = resolveFieldValue(image, items);
2026-07-29 08:29:29 +00:00
obj = { style: tmp.root, children: null };
2026-07-24 07:16:23 +00:00
const items1 = [header.header, , ];
2026-07-29 08:29:29 +00:00
obj = { style: tmp.contentRow, children: null };
obj1 = { style: tmp.heroText, children: null };
2026-08-25 06:04:03 +00:00
const items2 = [callback2(_require(12646).FieldText, { field: textComponentValues, variant: "text-lg/medium", color: "text-default" }), callback2(_require(12646).FieldText, { field: textComponentValues1, variant: "text-sm/normal", color: "text-muted" }), callback2(_require(12646).FieldText, { field: textComponentValues2, variant: "text-sm/normal", color: "text-muted" }), callback2(_require(12646).FieldText, { field: textComponentValues3, variant: "text-sm/normal", color: "text-muted" })];
2026-07-29 08:29:29 +00:00
obj1[1] = items2;
2026-07-24 07:16:23 +00:00
const items3 = [callback3(closure_6, obj1), ];
2026-07-29 08:29:29 +00:00
obj2 = { style: tmp.heroImageColumn, children: null };
let tmp14Result = null == fieldValue || null == tmp3;
if (tmp14Result) {
obj3 = { style: null };
obj3[0] = tmp.heroImageSkeleton;
2026-08-25 06:04:03 +00:00
tmp14Result = tmp14(tmp4(12647).ImageSkeleton, obj3);
2026-07-23 10:11:24 +00:00
}
2026-07-29 08:29:29 +00:00
obj2[1] = tmp14Result;
items3[1] = callback2(closure_6, obj2);
obj[1] = items3;
2026-07-24 07:16:23 +00:00
items1[1] = callback3(closure_6, obj);
2026-07-29 08:29:29 +00:00
let tmp14Result1 = null != fieldValue;
if (tmp14Result1) {
const obj4 = { style: null, pointerEvents: "none", onLayout: null, children: null };
obj4[0] = tmp.heroImagePositioner;
obj4[2] = function onLayout(nativeEvent) {
const layout = nativeEvent.nativeEvent.layout;
_undefined({ width: layout.width, height: layout.height });
2026-07-23 10:11:24 +00:00
};
2026-07-29 08:29:29 +00:00
tmp14Result = null != tmp3;
if (tmp14Result) {
const result = fieldValue.media.height * (tmp3.width / fieldValue.media.width);
const obj5 = { style: null, androidRenderingMode: "software", maskElement: null, children: null };
const obj6 = { width: null, height: null };
obj6[0] = tmp3.width;
obj6[1] = result;
obj5[0] = obj6;
const obj7 = { style: null, children: null };
obj7[0] = tmp.heroImageMask;
const obj8 = { start: null, end: null, colors: null, style: null };
({ START: obj14[0], END: obj14[1] } = HorizontalGradient);
obj8[2] = closure_10;
obj8[3] = tmp.heroImageFadeGradient;
2026-08-24 06:08:38 +00:00
const items4 = [tmp14(LinearGradientDefault, obj8), ];
2026-07-29 08:29:29 +00:00
const obj9 = { style: null };
obj9[0] = tmp.heroImageMaskRemainder;
items4[1] = tmp14(tmp13, obj9);
obj7[1] = items4;
obj5[2] = tmp12(tmp13, obj7);
const obj10 = { source: null, style: null };
const obj11 = { uri: null };
obj11[0] = fieldValue.media.url;
obj10[0] = obj11;
obj10[1] = { width: "100%", height: "100%" };
obj5[3] = tmp14(closure_5, obj10);
2026-08-24 06:08:38 +00:00
tmp14Result = tmp14(_isNativeReflectConstructDefault, obj5);
const tmp20 = _isNativeReflectConstructDefault;
2026-07-23 10:11:24 +00:00
}
2026-07-29 08:29:29 +00:00
obj4[3] = tmp14Result;
tmp14Result1 = tmp14(tmp13, obj4);
2026-07-23 10:11:24 +00:00
}
2026-07-29 08:29:29 +00:00
items1[2] = tmp14Result1;
obj[1] = items1;
2026-07-23 10:11:24 +00:00
return callback3(closure_6, obj);
};
export const HERO_IMAGE_UNCLIPPED_TOP_BLEED = 8;
export const HERO_IMAGE_TOP_BLEED = sum;