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

71 lines
3.5 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 14037
// Function ID: 14038
2026-07-20 16:05:17 +00:00
// Name: RootThemeContextProvider
2026-08-25 06:04:03 +00:00
// Dependencies: [19, 4372, 1302, 505, 21, 589, 4230, 1367, 8348, 14038, 4108, 11044, 4385, 2]
2026-07-20 16:05:17 +00:00
// Exports: RootThemeContextProvider
2026-08-25 06:04:03 +00:00
// Module 14037 (RootThemeContextProvider)
2026-08-24 06:08:38 +00:00
import closure_3 from "noop" /* 19 */;
2026-08-25 06:04:03 +00:00
import closure_4 from "maybeApplyNoTextColorForLightCustomTheme" /* 4372 */;
2026-08-24 06:08:38 +00:00
import closure_5 from "handleThemeChange" /* 1302 */;
import { ThemeTypes } from "sum" /* 505 */;
import { jsx } from "jsxProd" /* 21 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/themes/RootThemeContextProvider.native.tsx");
2026-07-20 16:05:17 +00:00
export const RootThemeContextProvider = function RootThemeContextProvider(children) {
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-08-24 06:08:38 +00:00
let items = [closure_4, closure_5];
const stateFromStoresObject = obj.useStateFromStoresObject(items, () => ({ saturation: closure_4.saturation, contrast: closure_4.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-08-13 07:00:46 +00:00
const obj3 = enabled(chatInputLegacySendButton[8]);
2026-07-20 16:05:17 +00:00
const items1 = [enabled, chatInputFloating, chatInputLegacySendButton, manaTypeConsolidationExperiment];
2026-08-13 07:00:46 +00:00
const plainTextExperiment = enabled(chatInputLegacySendButton[9]).usePlainTextExperiment("RootThemeContextProvider");
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-08-13 07:00:46 +00:00
let tmpResult = tmp(tmp2[10]);
num2 = tmpResult.setThemeFlag(0, tmp(tmp2[10]).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;
2026-08-13 07:00:46 +00:00
obj[4] = tmp8;
obj = { enabled: null, children: null };
obj[0] = plainTextExperiment;
obj[1] = children.children;
obj[5] = jsx(tmp(tmp2[12]).PlainTextExperimentProvider, { enabled: null, children: null });
return jsx(tmp(tmp2[11]).RootThemeContextProvider, { enabled: null, children: null });
2026-07-20 16:05:17 +00:00
} else {
2026-08-13 07:00:46 +00:00
tmpResult = tmp(tmp2[10]);
2026-07-20 16:05:17 +00:00
if (contrast > 1) {
2026-08-13 07:00:46 +00:00
let REDUCED_CONTRAST_ENABLED = tmp(tmp2[10]).ThemeContextFlags.INCREASED_CONTRAST_ENABLED;
2026-07-20 16:05:17 +00:00
} else {
2026-08-13 07:00:46 +00:00
REDUCED_CONTRAST_ENABLED = tmp(tmp2[10]).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) {
2026-08-13 07:00:46 +00:00
let setThemeFlagResult1 = tmp(tmp2[10]).setThemeFlag(0, tmp(tmp2[10]).ThemeContextFlags.MOBILE_LIGHT_GRADIENT_THEME_ENABLED);
const tmpResult1 = tmp(tmp2[10]);
2026-07-20 16:05:17 +00:00
} else {
2026-08-13 07:00:46 +00:00
setThemeFlagResult1 = tmp(tmp2[10]).setThemeFlag(0, tmp(tmp2[10]).ThemeContextFlags.MOBILE_DARK_GRADIENT_THEME_ENABLED);
const tmpResult2 = tmp(tmp2[10]);
2026-07-20 16:05:17 +00:00
}
};