/* Metro module 15748; source: modules/interaction_components/native/InteractionIframeModal.tsx; dependencies: [57, 31, 27, 4238, 33, 4501, 697, 15736, 5463, 7717, 15749, 4571, 3857, 1244, 10709, 10716, 5278, 4066, 4573, 8706, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ToastActionCreators from '../../toast/native/ToastActionCreators.tsx'; /* Metro dependency 3857 */
import UseBackPressHandler from '../../routing/native/useBackPressHandler.tsx'; /* Metro dependency 4571 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import BotTag from '../../applications/native/BotTag.tsx'; /* Metro dependency 8706 */
import CloseIFrameModalNative from '../closeIFrameModal.native.tsx'; /* Metro dependency 15749 */
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 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as XLargeIconModule from '../../../design/components/Icon/native/redesign/generated/XLargeIcon.tsx'; /* Metro dependency 4066 */
import * as ApplicationConstantsModule from '../../applications/ApplicationConstants.tsx'; /* Metro dependency 4238 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as DeviceOrientationModule from '../../device/native/DeviceOrientation.tsx'; /* Metro dependency 7717 */
import * as InteractionModalUtilsModule from '../InteractionModalUtils.tsx'; /* Metro dependency 15736 */
function _fun120932(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15956:6, offset: 0x0253aac5, size: 378 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = JsxRuntimeModule;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BACKGROUND_SURFACE_HIGH = (Native).colors.BACKGROUND_SURFACE_HIGH;
const env0_9 = Reflect.apply(createStyles, value, [{wrapper: {backgroundColor: BACKGROUND_SURFACE_HIGH, flex: 1},
header: {'flexDirection': 'row', 'padding': 16, 'justifyContent': 'space-between', 'alignItems': 'center'},
headerCenterContainer: {'flexDirection': 'column', 'alignItems': 'center'},
headerTitleContainer: {'flexDirection': 'row', 'marginBottom': 2}, closeButton: {marginEnd: 8},
spacerView: {'marginStart': 8, 'width': 32}, botTag: {marginStart: 4}}]);
(FileImportTrackerModule).fileFinishedImporting('modules/interaction_components/native/InteractionIframeModal.tsx');
exports.default = InteractionIframeModal;
function InteractionIframeModal(a0) { // fn#120933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15956:688, offset: 0x0253ac3f, size: 944 bytes, params: 2, frame: 29
const value2 = undefined;
const styles = useStyles();
const application = a0.application;
const title = a0.title;
const id = application.id;
const {queryParams,
iframeUrl} = (InteractionModalUtilsModule).useIframeModalState(a0);
const [property, env0_1] = Module00057(ReactModule.useState(false), 2);
const insets = (UseSafeAreaInsetsKeyboardAwareNative)({includeKeyboardHeight: true}).insets;
ReactModule.useLayoutEffect(_fun120934, []);
let useCallback = ReactModule.useCallback;
const value6 = Reflect.apply(useCallback, ReactModule, [_fun120936, [id]]);
useCallback = ReactModule.useCallback;
(UseBackPressHandler)(Reflect.apply(useCallback, ReactModule,
[_fun120937, [value6]]));
const value8 = null;
const r5 = (
property
? value8
: ((Component) => )(importDefault(10709) /* metro dependency 10709: EmbeddedActivityWebView */)
);
const items3 = [styles.wrapper];
items3[1] = {paddingTop: insets.top, paddingBottom: insets.bottom};
const PressableOpacity = (PressablesModule).PressableOpacity;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const cpT0Cq = (IndexNativeModule).t.cpT0Cq;
const XLargeIcon = (XLargeIconModule).XLargeIcon;
const items2 = [
,
];
const Text = (TextModule).Text;
const text = (
{application.name}
);
const BOT = BotTagTypes.BOT;
const bot = application.bot;
items2[1] = (
{text}
{title}
);
items2[2] = ;
return (
{items2}
{r5}
);
function _fun120934() { // fn#120934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15956:935, offset: 0x0253afef, size: 51 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
(DeviceOrientationModule).lockOrientation('PORTRAIT');
return _fun120935;
function _fun120935() { // fn#120935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15956:976, offset: 0x0253b022, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(DeviceOrientationModule).restoreDefaultOrientation();
}
}
function _fun120936() { // fn#120936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15956:1045, offset: 0x0253b047, size: 40 bytes, params: 1, frame: 12
const value = environment.__proto__;
(CloseIFrameModalNative)(id, undefined);
}
function _fun120937() { // fn#120937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15956:1093, offset: 0x011b3f9a, size: 17 bytes, params: 1, frame: 9
env0_2();
return true;
}
function InteractionIframeModalOnActivityCrash() { // fn#120938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15956:1176, owner: InteractionIframeModal.onActivityCrash, offset: 0x0253b06f, size: 43 bytes, params: 1, frame: 13
env0_1(true);
global.setTimeout(_fun120939, 0);
function _fun120939() { // fn#120939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15956:1199, offset: 0x00e6aafb, size: 18 bytes, params: 1, frame: 11
return env1_1(false);
}
}
function onLoadError() { // fn#120940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15956:1347, owner: InteractionIframeModal.onLoadError, offset: 0x0253b09a, size: 118 bytes, params: 1, frame: 17
const defaultImport = ToastActionCreators;
const open = defaultImport.open;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const HehpFW = (IndexNativeModule).t.HehpFW;
Reflect.apply(open, defaultImport, [{key: 'interaction_iframe_modal', content: Reflect.apply(string, intl,
[HehpFW])}]);
env0_2();
}
}
}
global.__d(_fun120932, 15748, [57, 31, 27, 4238, 33, 4501, 697, 15736, 5463, 7717, 15749, 4571, 3857, 1244, 10709,
10716, 5278, 4066, 4573, 8706,
2]) /* metro module 15748, dependencies: [57, 31, 27, 4238, 33, 4501, 697, 15736, 5463, 7717, 15749, 4571, 3857, 1244, 10709, 10716, 5278, 4066, 4573, 8706, 2] */;