decord/source/modules/polls/chat/buildPlatformPollResources.native.tsx
github-actions e510164e6b chore: update source for alpha 346.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
2026-09-10 05:38:07 +00:00

54 lines
2 KiB
TypeScript

// Module ID: 11749
// Function ID: 11750
// Name: buildPlatformPollResources
// Dependencies: [12, 11750, 4574, 576, 7960, 7158, 5632, 1399, 2]
// Exports: buildPlatformPollResources, getAvatarUrl
// Module 11749 (buildPlatformPollResources)
import nativeDefault from "native" /* 576 */;
import utils_AvatarUtils from "utils/AvatarUtils" /* 1399 */;
import _modDef5632 from "module_5632" /* 5632 */;
import _modDef7158 from "module_7158" /* 7158 */;
import renderer_EmbedUtils from "renderer/EmbedUtils" /* 7960 */;
import apply from "module_12" /* 12 */;
require = fn;
let closure_3 = apply.mapValues(fn(11750).pollStyleSets, (arg0) => {
_require = arg0;
closure_1 = require("createStyles").createNativeStyleProperties((arg0) => {
let tmp = closure_0(nativeDefault, arg0);
return apply.pickBy(tmp, (num) => {
let tmp = typeof num !== "number";
if (typeof num !== "number") {
tmp = typeof num !== "boolean";
}
return tmp;
});
});
return (arg0, arg1) => {
let tmp = closure_0(nativeDefault, arg1);
const merged = Object.assign(closure_1(arg0, arg1));
const merged1 = Object.assign(apply.pickBy(tmp, (num) => {
let tmp = typeof num === "number";
if (typeof num !== "number") {
tmp = typeof num === "boolean";
}
return tmp;
}));
return {};
};
});
const size = fn(2);
const result = size.fileFinishedImporting("modules/polls/chat/buildPlatformPollResources.native.tsx");
export const buildPlatformPollResources = function buildPlatformPollResources(theme, layoutType) {
closure_0 = theme;
closure_1 = layoutType;
const obj = { styles: apply.mapValues(closure_3, (fn) => fn(closure_0, closure_1)), selectedIcon: null, checkmarkIcon: null };
obj.selectedIcon = renderer_EmbedUtils.getAssetUriForEmbed(_modDef7158);
obj.checkmarkIcon = renderer_EmbedUtils.getAssetUriForEmbed(_modDef5632);
return obj;
};
export const getAvatarUrl = function getAvatarUrl(currentUser, guildId) {
return utils_AvatarUtils.ensureAvatarSource(currentUser.getAvatarSource(guildId, false)).uri;
};