/* Metro module 15735; source: modules/interaction_components/native/InteractionModal.tsx; dependencies: [31, 27, 12952, 33, 4501, 697, 5080, 15736, 5463, 1305, 1423, 4573, 5278, 1244, 5312, 8357, 15737, 4578, 2] */
import AvatarUtils from '../../../utils/AvatarUtils.tsx'; /* Metro dependency 1423 */
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as XSmallIconModule from '../../../design/components/Icon/native/redesign/generated/XSmallIcon.tsx'; /* Metro dependency 5312 */
import * as ComponentStateContextModule from '../ComponentStateContext.tsx'; /* Metro dependency 8357 */
import * as InteractionModalStoreModule from '../InteractionModalStore.tsx'; /* Metro dependency 12952 */
import * as InteractionModalUtilsModule from '../InteractionModalUtils.tsx'; /* Metro dependency 15736 */
function _fun120822(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15943:6, offset: 0x02536740, size: 574 bytes, params: 8, frame: 24
const env0_0 = require;
const InteractionModal2 = InteractionModal;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.View;
const env0_4 = value.ScrollView;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.modal = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
object.scroll = {flex: 1};
const object4 = {flexGrow: 1};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.gap = PX_16;
object.modalContent = object4;
const object5 = {flexDirection: 'row'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.marginBottom = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingHorizontal = PX_16;
object.header = object5;
object.titleView = {flex: 1};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.icon = {marginRight: PX_8};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.footer = {marginTop: 'auto', marginBottom: PX_16};
object.closeButton = {marginLeft: 'auto'};
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object.closeIcon = {color: TEXT_MUTED};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.error = {marginBottom: PX_16};
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/interaction_components/native/InteractionModal.tsx');
exports.default = InteractionModal2;
exports.openInteractionModal = function(a0) {
importDefault(dependencyMap[6]).push(InteractionModal, a0, 'interaction_modal');
};
function InteractionModal(a0) { // fn#120823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15943:782, offset: 0x0253697e, size: 1138 bytes, params: 2, frame: 42
const HelpMessage = (require(1305) /* metro dependency 1305: native */).HelpMessage;
const styles = useStyles();
const title = a0.title;
const {components, applicationIconURL, applicationName, submissionState, error, validators, validationErrors,
setValidationErrors,
onSubmit} = (InteractionModalUtilsModule).useModalState(a0,
onClose_120824);
const insets = (UseSafeAreaInsetsKeyboardAwareNative)({includeKeyboardHeight: true}).insets;
const items3 = [styles.modal];
items3[1] = {paddingTop: insets.top, paddingBottom: insets.bottom};
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const avatarProps = {style: styles.icon,
source: (AvatarUtils).makeSource(applicationIconURL)};
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const SMALL = AvatarSizes.SMALL;
avatarProps.size = SMALL;
const items2 = [
,
];
const Text = (TextModule).Text;
items2[1] = (
{title}
);
const PressableOpacity = (PressablesModule).PressableOpacity;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const cpT0Cq = (IndexNativeModule).t.cpT0Cq;
onClose_120824Binding = onClose_120824;
const XSmallIcon = (XSmallIconModule).XSmallIcon;
items2[2] = (
);
const view = (
{items2}
);
const value5 = null;
const r18 = (
value5 != error
? (
error === ''
? value5
: (
{error}
)
)
: value5
);
const HelpMessageTypes = (require(1305) /* metro dependency 1305: native */).HelpMessageTypes;
const WARNING = HelpMessageTypes.WARNING;
const items5 = [
{r18}
{intl.format((IndexNativeModule).t['dSTy/w'],
{applicationName: applicationName})}
,
];
const ComponentStateContextProvider = (ComponentStateContextModule).ComponentStateContextProvider;
items5[1] = (
{(require(15737) /* metro dependency 15737: renderComponents */).renderComponents(components)}
);
const Button = (ButtonNativeModule).Button;
string = intl.string;
const geKm7t = (IndexNativeModule).t.geKm7t;
const IN_FLIGHT = InteractionModalState.IN_FLIGHT;
items5[2] = (
);
return (
{view}
{items5}
);
}
function onClose_120824() { // fn#120824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15943:756, offset: 0x02536df0, size: 44 bytes, params: 1, frame: 11
return (ModalActionCreators).popWithKey('interaction_modal');
}
}
global.__d(_fun120822, 15735, [31, 27, 12952, 33, 4501, 697, 5080, 15736, 5463, 1305, 1423, 4573, 5278, 1244, 5312,
8357, 15737, 4578,
2]) /* metro module 15735, dependencies: [31, 27, 12952, 33, 4501, 697, 5080, 15736, 5463, 1305, 1423, 4573, 5278, 1244, 5312, 8357, 15737, 4578, 2] */;