decord/source/modules/video_backgrounds/LastUsedVideoBackgroundOption.tsx

76 lines
2.9 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 9703
// Function ID: 9704
2026-07-29 08:29:29 +00:00
// Name: getLastUsedVideoBackgroundOption
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 1340, 1922, 9700, 4042, 589, 2]
2026-07-20 16:05:17 +00:00
// Exports: getLastUsedVideoBackgroundOption, useLastUsedVideoBackgroundOption
2026-08-24 06:08:38 +00:00
// Module 9703 (getLastUsedVideoBackgroundOption)
import getPremiumPlanItemDefault from "getPremiumPlanItem" /* 4042 */;
import isAnimatedBackgroundOption from "isAnimatedBackgroundOption" /* 9700 */;
import closure_3 from "noop" /* 19 */;
import closure_4 from "handleConnectionClosedOrResumed" /* 1340 */;
import closure_5 from "mergeGuildAvatar" /* 1922 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
const result = require("set").fileFinishedImporting("modules/video_backgrounds/LastUsedVideoBackgroundOption.tsx");
2026-07-29 08:29:29 +00:00
export const getLastUsedVideoBackgroundOption = function getLastUsedVideoBackgroundOption(currentUser) {
const voiceAndVideo = settings.settings.voiceAndVideo;
let prop;
if (voiceAndVideo != null) {
prop = voiceAndVideo.videoBackgroundFilterDesktop;
}
2026-08-24 06:08:38 +00:00
const videoBackgroundOptionFromProto = isAnimatedBackgroundOption.getVideoBackgroundOptionFromProto(prop, currentUser.id);
const obj = isAnimatedBackgroundOption;
2026-07-29 08:29:29 +00:00
const tmp2 = require;
2026-07-20 16:05:17 +00:00
if (!obj2.isCustomBackgroundOption(videoBackgroundOptionFromProto)) {
2026-08-04 21:03:28 +00:00
if (typeof videoBackgroundOptionFromProto !== "number") {
2026-07-20 16:05:17 +00:00
let tmp7 = videoBackgroundOptionFromProto;
} else {
tmp7 = null;
2026-08-24 06:08:38 +00:00
const tmp2Result = isAnimatedBackgroundOption;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp6 = tmp7;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp6 = null;
2026-08-24 06:08:38 +00:00
const obj3 = getPremiumPlanItemDefault;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp6;
2026-07-20 16:05:17 +00:00
};
export const useLastUsedVideoBackgroundOption = function useLastUsedVideoBackgroundOption() {
2026-08-24 06:08:38 +00:00
const items = [closure_4];
2026-07-29 08:29:29 +00:00
const stateFromStores = stateFromStores1(589).useStateFromStores(items, () => settings.settings);
let obj = stateFromStores1(589);
2026-08-24 06:08:38 +00:00
const items1 = [closure_5];
2026-07-29 08:29:29 +00:00
stateFromStores1 = stateFromStores1(589).useStateFromStores(items1, () => currentUser.getCurrentUser());
2026-07-20 16:05:17 +00:00
const voiceAndVideo = stateFromStores.voiceAndVideo;
2026-07-29 08:29:29 +00:00
let prop;
if (voiceAndVideo != null) {
2026-07-20 16:05:17 +00:00
prop = voiceAndVideo.videoBackgroundFilterDesktop;
}
const items2 = [prop, stateFromStores1];
return React.useMemo(() => {
2026-07-29 08:29:29 +00:00
let tmp2 = null;
2026-07-20 16:05:17 +00:00
if (null != stateFromStores1) {
2026-08-24 06:08:38 +00:00
const videoBackgroundOptionFromProto = stateFromStores1(closure_1_2[3]).getVideoBackgroundOptionFromProto(prop, tmp.id);
const obj = stateFromStores1(closure_1_2[3]);
2026-07-29 08:29:29 +00:00
const tmp4 = stateFromStores1;
if (!obj2.isCustomBackgroundOption(videoBackgroundOptionFromProto)) {
2026-08-04 21:03:28 +00:00
if (typeof videoBackgroundOptionFromProto !== "number") {
2026-07-29 08:29:29 +00:00
let tmp9 = videoBackgroundOptionFromProto;
} else {
tmp9 = null;
const tmp4Result = tmp4(tmp5[3]);
}
let tmp8 = tmp9;
} else {
tmp8 = null;
const obj3 = prop(tmp5[4]);
}
tmp2 = tmp8;
2026-08-24 06:08:38 +00:00
obj2 = stateFromStores1(closure_1_2[3]);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp2;
2026-07-20 16:05:17 +00:00
}, items2);
};