decord/source/__polyfill/05xxx/module_5003.js
github-actions da5b5e5efe chore: update source for alpha 346.6
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-12 13:45:10 +00:00

32 lines
976 B
JavaScript

// Module ID: 5003
// Function ID: 5004
// Dependencies: [17]
// Exports: parseAndroidIconToNativeProps
// Module 5003
import _mod17 from "module_17" /* 17 */;
const Image = _mod17.Image;
export const parseAndroidIconToNativeProps = function parseAndroidIconToNativeProps(icon) {
if (icon) {
if ("imageSource" === icon.type) {
const assetSource = Image.resolveAssetSource(icon.imageSource);
if (!assetSource) {
const _console = console;
console.error("[RNScreens] Failed to resolve an asset.");
}
const obj2 = { imageIconResource: assetSource };
return obj2;
} else if ("drawableResource" === icon.type) {
const obj = { drawableIconResourceName: icon.name };
return obj;
} else {
const _Error = Error;
const error = new Error("[RNScreens] Incorrect icon format for Android. You must provide `imageSource` or `drawableResource`.");
throw error;
}
} else {
return {};
}
};