Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
32 lines
976 B
JavaScript
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 {};
|
|
}
|
|
};
|