decord/source/modules/polls/chat/buildPlatformPollResources.native.tsx
github-actions 4f02868c60 chore: update source for alpha 346.4
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4792.js (118.4 MB)
2026-09-11 10:30:06 +00:00

54 lines
2 KiB
TypeScript

// Module ID: 11813
// Function ID: 11814
// Name: buildPlatformPollResources
// Dependencies: [12, 11814, 4607, 576, 8021, 7218, 5670, 1399, 2]
// Exports: buildPlatformPollResources, getAvatarUrl
// Module 11813 (buildPlatformPollResources)
import nativeDefault from "native" /* 576 */;
import utils_AvatarUtils from "utils/AvatarUtils" /* 1399 */;
import _modDef5670 from "module_5670" /* 5670 */;
import _modDef7218 from "module_7218" /* 7218 */;
import renderer_EmbedUtils from "renderer/EmbedUtils" /* 8021 */;
import apply from "module_12" /* 12 */;
require = fn;
let closure_3 = apply.mapValues(fn(11814).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(_modDef7218);
obj.checkmarkIcon = renderer_EmbedUtils.getAssetUriForEmbed(_modDef5670);
return obj;
};
export const getAvatarUrl = function getAvatarUrl(currentUser, guildId) {
return utils_AvatarUtils.ensureAvatarSource(currentUser.getAvatarSource(guildId, false)).uri;
};