decord/source/modules/themes/RootThemeContextProvider.native.tsx

68 lines
3.3 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 13710
// Function ID: 13711
2026-07-20 16:05:17 +00:00
// Name: RootThemeContextProvider
2026-08-05 07:35:12 +00:00
// Dependencies: [19, 4247, 1302, 505, 21, 589, 4102, 1348, 13711, 3967, 10823, 2]
2026-07-20 16:05:17 +00:00
// Exports: RootThemeContextProvider
2026-08-05 07:35:12 +00:00
// Module 13710 (RootThemeContextProvider)
2026-07-29 08:29:29 +00:00
import noop from "noop";
import maybeApplyNoTextColorForLightCustomTheme from "maybeApplyNoTextColorForLightCustomTheme";
import handleThemeChange from "handleThemeChange";
2026-07-23 10:11:24 +00:00
import { ThemeTypes } from "sum";
import { jsx } from "jsxProd";
const require = arg1;
2026-07-29 08:29:29 +00:00
const result = require("handleThemeChange").fileFinishedImporting("modules/themes/RootThemeContextProvider.native.tsx");
2026-07-20 16:05:17 +00:00
export const RootThemeContextProvider = function RootThemeContextProvider(children) {
let contrast;
let saturation;
2026-07-29 08:29:29 +00:00
let enabled;
let chatInputFloating;
let chatInputLegacySendButton;
let manaTypeConsolidationExperiment;
2026-07-23 10:11:24 +00:00
let obj = enabled(chatInputLegacySendButton[5]);
2026-07-29 08:29:29 +00:00
let items = [maybeApplyNoTextColorForLightCustomTheme, handleThemeChange];
const stateFromStoresObject = obj.useStateFromStoresObject(items, () => ({ saturation: maybeApplyNoTextColorForLightCustomTheme.saturation, contrast: maybeApplyNoTextColorForLightCustomTheme.contrast, theme: theme.theme }));
2026-07-20 16:05:17 +00:00
({ saturation, contrast } = stateFromStoresObject);
2026-07-29 08:29:29 +00:00
const tmp4 = chatInputFloating(chatInputLegacySendButton[6])();
2026-07-23 10:11:24 +00:00
const mobileVisualRefreshConfig = enabled(chatInputLegacySendButton[7]).useMobileVisualRefreshConfig({ location: "RootThemeContextProvider" });
enabled = mobileVisualRefreshConfig.enabled;
chatInputFloating = mobileVisualRefreshConfig.chatInputFloating;
chatInputLegacySendButton = mobileVisualRefreshConfig.chatInputLegacySendButton;
const obj2 = enabled(chatInputLegacySendButton[7]);
2026-07-29 08:29:29 +00:00
manaTypeConsolidationExperiment = enabled(chatInputLegacySendButton[8]).useManaTypeConsolidationExperiment("RootThemeContextProvider");
2026-07-20 16:05:17 +00:00
const items1 = [enabled, chatInputFloating, chatInputLegacySendButton, manaTypeConsolidationExperiment];
2026-07-29 08:29:29 +00:00
if (null == tmp4) {
let num2 = 0;
2026-07-20 16:05:17 +00:00
if (1 !== saturation) {
2026-07-29 08:29:29 +00:00
let tmpResult = tmp(tmp2[9]);
num2 = tmpResult.setThemeFlag(0, tmp(tmp2[9]).ThemeContextFlags.REDUCE_SATURATION_ENABLED);
2026-07-20 16:05:17 +00:00
}
if (1 === contrast) {
2026-07-29 08:29:29 +00:00
obj = { theme: null, flags: null, saturation: null, contrast: null, enabledExperiments: null, children: null };
obj[0] = stateFromStoresObject.theme;
obj[1] = num2;
obj[2] = saturation;
obj[3] = contrast;
obj[4] = tmp7;
obj[5] = children.children;
return jsx(tmp(tmp2[10]).RootThemeContextProvider, { theme: null, flags: null, saturation: null, contrast: null, enabledExperiments: null, children: null });
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmpResult = tmp(tmp2[9]);
2026-07-20 16:05:17 +00:00
if (contrast > 1) {
2026-07-29 08:29:29 +00:00
let REDUCED_CONTRAST_ENABLED = tmp(tmp2[9]).ThemeContextFlags.INCREASED_CONTRAST_ENABLED;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
REDUCED_CONTRAST_ENABLED = tmp(tmp2[9]).ThemeContextFlags.REDUCED_CONTRAST_ENABLED;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmpResult.setThemeFlag(num2, REDUCED_CONTRAST_ENABLED);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
} else if (tmp4.theme === ThemeTypes.LIGHT) {
let setThemeFlagResult1 = tmp(tmp2[9]).setThemeFlag(0, tmp(tmp2[9]).ThemeContextFlags.MOBILE_LIGHT_GRADIENT_THEME_ENABLED);
const tmpResult1 = tmp(tmp2[9]);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
setThemeFlagResult1 = tmp(tmp2[9]).setThemeFlag(0, tmp(tmp2[9]).ThemeContextFlags.MOBILE_DARK_GRADIENT_THEME_ENABLED);
const tmpResult2 = tmp(tmp2[9]);
2026-07-20 16:05:17 +00:00
}
};