decord/source/modules/user_profile/native/UserProfileFixedBackground.tsx

49 lines
2.1 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 8978
// Function ID: 8979
// Dependencies: [32, 19, 17, 21, 4108, 8979, 8980, 4826, 2]
2026-07-20 16:05:17 +00:00
2026-08-25 06:04:03 +00:00
// Module 8978
import ManaContext from "ManaContext" /* 4108 */;
import LinearGradientDefault from "LinearGradient" /* 4826 */;
import useUserProfileColors from "useUserProfileColors" /* 8979 */;
import useUserProfileGradientColors from "useUserProfileGradientColors" /* 8980 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "_slicedToArray" /* 32 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import { jsx } from "jsxProd" /* 21 */;
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
({ StyleSheet: c4, View: c5 } = get_ActivityIndicator);
2026-08-24 06:08:38 +00:00
const memoResult = importAllResult.memo((style) => {
2026-07-20 16:05:17 +00:00
style = style.style;
({ gradientHeight, bannerHeight } = style);
2026-08-24 06:08:38 +00:00
let obj = ManaContext;
2026-07-20 16:05:17 +00:00
const themeContext = obj.useThemeContext();
2026-07-29 08:29:29 +00:00
({ primaryColor, secondaryColor, theme } = themeContext);
2026-08-24 06:08:38 +00:00
const gradientFallbackBackground = useUserProfileColors.useUserProfileColors({ theme, primaryColor, secondaryColor }).gradientFallbackBackground;
const obj2 = useUserProfileColors;
const obj3 = useUserProfileGradientColors;
const first = callback(useUserProfileGradientColors.useUserProfileGradientColors(primaryColor, secondaryColor, gradientFallbackBackground), 2)[0];
2026-07-20 16:05:17 +00:00
if (null != primaryColor) {
if (null != secondaryColor) {
const _Math = Math;
const _Math2 = Math;
const bound = Math.min(1, Math.max(0, bannerHeight / gradientHeight));
2026-07-29 08:29:29 +00:00
obj = { colors: null, locations: null, style: null, pointerEvents: "none" };
const items = [first, first, tmp5];
obj[0] = items;
2026-07-23 10:11:24 +00:00
const items1 = [0, bound, 1];
2026-07-29 08:29:29 +00:00
obj[1] = items1;
2026-07-20 16:05:17 +00:00
const items2 = [closure_4.absoluteFill, style];
2026-07-29 08:29:29 +00:00
obj[2] = items2;
2026-08-24 06:08:38 +00:00
return jsx(LinearGradientDefault, { colors: null, locations: null, style: null, pointerEvents: "none" });
2026-07-20 16:05:17 +00:00
}
}
style = [closure_4.absoluteFill, { backgroundColor: gradientFallbackBackground }, ];
style[2] = style;
return <closure_5 style={style} pointerEvents="none" />;
});
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/user_profile/native/UserProfileFixedBackground.tsx");
2026-07-20 16:05:17 +00:00
export default memoResult;