107 lines
6.0 KiB
TypeScript
107 lines
6.0 KiB
TypeScript
/* Metro module 11557; source: modules/media_channel/native/MediaPostGridThumbnail.tsx; dependencies: [31, 27, 33, 11555, 5475, 477, 2] */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
|
|
function _fun88568(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11743:6, offset: 0x01fe8c77, size: 211 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
let value = ReactNativeModule;
|
|
const env0_3 = value.ImageBackground;
|
|
const env0_4 = value.StyleSheet;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_5 = value.jsx;
|
|
const env0_6 = value.jsxs;
|
|
const env0_7 = value.Fragment;
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/media_channel/native/MediaPostGridThumbnail.tsx');
|
|
exports.default = MediaPostGridThumbnail;
|
|
function MediaPostGridThumbnailAndroid(a0) { // fn#88569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11743:189, offset: 0x01fe8d4a, size: 324 bytes, params: 2, frame: 24
|
|
const shouldSpoiler = a0.shouldSpoiler;
|
|
const blurTheme = a0.blurTheme;
|
|
const source = a0.source;
|
|
const androidStyle = a0.androidStyle;
|
|
const backgroundImagesource = a0.backgroundImagesource;
|
|
return (
|
|
backgroundImagesource == null
|
|
? (
|
|
<ImageBackground
|
|
style={androidStyle}
|
|
source={source}
|
|
blurRadius={shouldSpoiler ? 10 : 0}
|
|
resizeMode="cover"
|
|
>
|
|
{((ForumPostMediaSpoiler) => <ForumPostMediaSpoiler shouldSpoiler={shouldSpoiler} blurTheme={blurTheme} />)((require(11555) /* metro dependency 11555: ForumPostMedia */).ForumPostMediaSpoiler)}
|
|
</ImageBackground>
|
|
)
|
|
: (
|
|
<ImageBackground
|
|
style={androidStyle}
|
|
source={backgroundImagesource}
|
|
resizeMode="cover"
|
|
imageStyle={{opacity: 0.2}}
|
|
>
|
|
{((Component) => <Component style={StyleSheet.absoluteFill} source={source} resizeMode={a0.resizeMode} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
|
|
{((ForumPostMediaSpoiler) => <ForumPostMediaSpoiler shouldSpoiler={shouldSpoiler} blurTheme={blurTheme} />)((require(11555) /* metro dependency 11555: ForumPostMedia */).ForumPostMediaSpoiler)}
|
|
</ImageBackground>
|
|
)
|
|
);
|
|
}
|
|
|
|
function MediaPostGridThumbnailIOS({shouldSpoiler, blurTheme, source, iosStyle, backgroundImagesource, resizeMode}) { // fn#88570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11743:665, offset: 0x01fe8e8e, size: 367 bytes, params: 2, frame: 29
|
|
var object2;
|
|
var items2;
|
|
var items3;
|
|
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
|
|
if (backgroundImagesource == null) {
|
|
items3 = [
|
|
((Component) => <Component style={iosStyle} source={source} resizeMode={resizeMode} />)(importDefault(5475) /* metro dependency 5475: FastImage */),
|
|
|
|
|
|
];
|
|
items3[1] = ((ForumPostMediaSpoiler) => <ForumPostMediaSpoiler shouldSpoiler={shouldSpoiler} blurTheme={blurTheme} />)((require(11555) /* metro dependency 11555: ForumPostMedia */).ForumPostMediaSpoiler);
|
|
object2 = {children: items3};
|
|
} else {
|
|
items2 = [
|
|
((Component) => <Component style={[StyleSheet.absoluteFill,
|
|
{opacity: 0.2}]} source={backgroundImagesource} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */),
|
|
|
|
|
|
];
|
|
items2[1] = ((Component) => <Component style={iosStyle} source={source} resizeMode={resizeMode} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
|
items2[2] = ((ForumPostMediaSpoiler) => <ForumPostMediaSpoiler shouldSpoiler={shouldSpoiler} blurTheme={blurTheme} />)((require(11555) /* metro dependency 11555: ForumPostMedia */).ForumPostMediaSpoiler);
|
|
object2 = {children: items2};
|
|
}
|
|
return ((Fragment) => <Fragment {...object2} />)(jsxRuntimeEnv0_7Binding);
|
|
}
|
|
|
|
function MediaPostGridThumbnail(a0) { // fn#88571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11743:1222, offset: 0x01fe8ffd, size: 168 bytes, params: 2, frame: 16
|
|
var r1;
|
|
var source;
|
|
if (a0.isPortrait === true && a0.shouldSpoiler === false) {
|
|
source = a0.source;
|
|
r1 = 'contain';
|
|
} else {
|
|
r1 = 'cover';
|
|
source = undefined;
|
|
}
|
|
const mediaPostGridThumbnailIOSProps = {...a0};
|
|
mediaPostGridThumbnailIOSProps['backgroundImagesource'] = source;
|
|
mediaPostGridThumbnailIOSProps['resizeMode'] = r1;
|
|
return (
|
|
(require(477) /* metro dependency 477: PlatformUtils */).isAndroid()
|
|
? (
|
|
<MediaPostGridThumbnailAndroid {...mediaPostGridThumbnailIOSProps} />
|
|
)
|
|
: (
|
|
<MediaPostGridThumbnailIOS {...mediaPostGridThumbnailIOSProps} />
|
|
)
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun88568, 11557, [31, 27, 33, 11555, 5475, 477,
|
|
2]) /* metro module 11557, dependencies: [31, 27, 33, 11555, 5475, 477, 2] */;
|