/* Metro module 4596; source: components_native/common/Alert.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 1305, 4597, 4041, 4570, 4573, 1244, 4578, 5278, 7704, 3868, 1478, 8750, 2] */ function _fun38946(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:6, offset: 0x010d1d85, size: 700 bytes, params: 8, frame: 28 var object3; const env0_0 = require; const closure = getAlertButtonVariant; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_4 = importDefault(6) /* metro dependency 6 */; const env0_5 = importDefault(7) /* metro dependency 7 */; const env0_6 = importDefault(15) /* metro dependency 15 */; const env0_7 = importDefault(17) /* metro dependency 17 */; const env0_8 = importDefault(18) /* metro dependency 18 */; let value = importAll(31) /* metro dependency 31 */; const value2 = require(27) /* metro dependency 27 */; const env0_10 = value2.View; const StyleSheet = value2.StyleSheet; const env0_11 = value2.ScrollView; const value3 = require(33) /* metro dependency 33 */; const env0_12 = value3.jsx; const env0_13 = value3.jsxs; const env0_14 = value3.Fragment; const createStylesModule = require(4501) /* metro dependency 4501: createStyles */; const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles; object3 = {}; const object5 = {}; object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm; object5.padding = 16; const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW; object5.backgroundColor = BACKGROUND_BASE_LOW; object3.alert = object5; const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY; object3.titleText = {marginBottom: 16, color: MOBILE_TEXT_HEADING_PRIMARY}; const object6 = {}; object6.height = StyleSheet.hairlineWidth; const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE; object6.backgroundColor = BORDER_SUBTLE; object3.divider = object6; const TEXT_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STRONG; object3.body = {marginTop: 16, color: TEXT_STRONG}; object3.buttons = {marginTop: 24}; object3.cancelButton = {marginTop: 8}; object3.secondaryConfirm = {'marginTop': 16, 'alignSelf': 'center'}; const object7 = {}; object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm; object3.gradient = object7; const env0_15 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object3]); const PureComponent = value.PureComponent; const value5 = _fun38951(PureComponent); const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext; value5.contextType = ThemeContext; const ButtonColors = (require(1305) /* metro dependency 1305: native */).ButtonColors; const BRAND = ButtonColors.BRAND; value5.defaultProps = {confirmColor: BRAND, autoCloseOnConfirm: true}; value = value.memo(_fun38967); value.Colors = ButtonColors; (require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/Alert.tsx'); exports.default = value; exports.getAlertButtonVariant = closure; } function _isNativeReflectConstruct_38947() { // fn#38947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:247, offset: 0x010d2041, size: 94 bytes, params: 1, frame: 18 var Boolean; var prototype; var valueOf; var call; var Reflect; var construct; var closure; var value; var error; try { Boolean = global.Boolean; prototype = Boolean.prototype; valueOf = prototype.valueOf; call = valueOf.call; Reflect = global.Reflect; construct = Reflect.construct; Boolean = global.Boolean; closure = function() { }; value = Reflect.apply(construct, Reflect, [Boolean, [], closure]); value = Reflect.apply(call, valueOf, [value]); var result = !value; } catch (error) { } return (_isNativeReflectConstruct_38947_isNativeReflectConstruct = function() { return !!result; })(); } function getAlertButtonVariant(a0) { // fn#38950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:940, offset: 0x010d209f, size: 249 bytes, params: 2, frame: 14 const ButtonColors = (require(1305) /* metro dependency 1305: native */).ButtonColors; const GREEN = ButtonColors.GREEN; if (GREEN === a0) { return 'active'; } const RED = ButtonColors.RED; if (RED === a0) { return 'destructive'; } const GREY = ButtonColors.GREY; if (GREY === a0) { return 'secondary'; } const LIGHTGREY = ButtonColors.LIGHTGREY; if (LIGHTGREY === a0) { return 'secondary'; } const TRANSPARENT = ButtonColors.TRANSPARENT; if (TRANSPARENT === a0) { return 'secondary'; } const WHITE = ButtonColors.WHITE; if (WHITE === a0) { return 'primary-overlay'; } return 'primary'; } function _fun38951(a0) { // fn#38951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:1297, offset: 0x010d2198, size: 233 bytes, params: 2, frame: 16 const closure = Alert_38952; env0_8(closure, a0); return env0_5(closure, [{key: 'componentDidMount', value: function() { var env0_0 = this; if (this.titleRef.current != null) { global.setImmediate(_fun38958); } }}, {key: 'componentWillUnmount', value: function() { this.timeout.stop(); this.focusTimeout.stop(); }}, {key: 'componentDidUpdate', value: function() { var confirming = this.props.confirming; if (confirming != null) { this.timeout.stop(); this.setState({confirming: confirming}); } }}, {key: 'renderHeader', value: value_38962}, {key: 'renderBody', value: value_38963}, {key: 'renderButtons', value: value_38964}, {key: 'renderFooter', value: value_38965}, {key: 'render', value: value_38966}]); } function _fun38967(a0) { // fn#38967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:4837, offset: 0x010d2b18, size: 182 bytes, params: 2, frame: 19 const value2 = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)(); const value3 = (require(8750) /* metro dependency 8750: useIsScreenLandscapeNative */).useIsScreenLandscape(); const Math = global.Math; const min = Math.min; const Math2 = global.Math; return ((Component) => )(env0_16); } function Alert_38952(a0) { // fn#38952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:1309, offset: 0x010d2281, size: 325 bytes, params: 2, frame: 21 var r0; var Reflect; let value = copyRestArgs(0, undefined); let binding = env1_4; binding(this, Alert_38952); const items = []; arraySpread(items, value, 0, items); value = env1_7(Alert_38952); binding = env1_6; if (_isNativeReflectConstruct_38947()) { Reflect = global.Reflect; value = Reflect.construct(value, items, env1_7(this).constructor); r0 = value; } else { value = value.apply(this, items); r0 = value; } value = binding(this, r0); value.titleRef = env1_9.createRef(); value.state = {confirming: false}; value.renderContent = (importAll(4597) /* metro dependency 4597: CustomMarkupNative */).getParser(); const Timeout = (require(4041) /* metro dependency 4041: Timers */).Timeout; const value4 = Object.create(Timeout.prototype, {constructor: {value: Timeout}}); let timeout = new Timeout(); value.timeout = timeout instanceof Object ? timeout : value4; const value6 = Object.create(Timeout.prototype, {constructor: {value: Timeout}}); timeout = new Timeout(); value.focusTimeout = timeout instanceof Object ? timeout : value6; value.handleConfirm = handleConfirm_38953; value.handleCancel = handleCancel_38955; value.handleSecondaryConfirm = handleSecondaryConfirm; return value; } function value_38957() { // fn#38957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2143, offset: 0x010d24ca, size: 50 bytes, params: 1, frame: 11 if (this.titleRef.current != null) { global.setImmediate(_fun38958); } } function value_38962() { // fn#38962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2548, offset: 0x010d25bf, size: 219 bytes, params: 1, frame: 24 const value = environment.__proto__; const value2 = env1_15(this.context); const title = this.props.title; const value3 = null; return value3 == title || title === '' ? value3 : {((Text) => {typeof title !== 'string' ? title : this.renderContent(title)})((require(4573) /* metro dependency 4573: Text */).Text)}; } function value_38963() { // fn#38963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:2895, offset: 0x010d269a, size: 206 bytes, params: 1, frame: 25 const value = environment.__proto__; const value2 = env1_15(this.context); const {body, children} = this.props; const jsxRuntimeEnv1_14Binding = jsxRuntimeEnv1_14; const value3 = null; return ( <> {value3 != body ? {((Text) => {typeof body !== 'string' ? body : this.renderContent(body)})((require(4573) /* metro dependency 4573: Text */).Text)} : value3} {children} ); } function value_38964() { // fn#38964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4774:3200, offset: 0x010d2768, size: 607 bytes, params: 1, frame: 31 var r16; var r7; var r6; var r8; var r14; var r15; var r0; var intl; const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button; let value = environment.__proto__; const binding = env1_15; const context = this.context; const value2 = undefined; const value3 = binding(context); const props = this.props; const cancelText = props.cancelText; const confirmText = props.confirmText; if (value2 !== confirmText) { r16 = confirmText; } else { intl = (require(1244) /* metro dependency 1244: indexNative */).intl; r16 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BddRzS); } const confirmColor = props.confirmColor; const secondaryConfirmText = props.secondaryConfirmText; const noDefaultButtons = props.noDefaultButtons; const renderConfirmIcon = props.renderConfirmIcon; const renderConfirmRightIcon = props.renderConfirmRightIcon; const renderConfirmButton = props.renderConfirmButton; const isConfirmButtonDisabled = props.isConfirmButtonDisabled; const confirming = this.state.confirming; const value5 = null; if (noDefaultButtons) { r0 = value5; } else { r7 = value5 != cancelText ?