/* Metro module 12042; source: modules/nuf/native/components/ChannelPrompt.tsx; dependencies: [5, 57, 31, 27, 1935, 1867, 33, 4501, 5314, 566, 1484, 5282, 1244, 4603, 4131, 6618, 6819, 1423, 4573, 8967, 4578, 8970, 2] */
function _fun92533(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12228:6, offset: 0x0208e36e, size: 430 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_6 = value.ScrollView;
const env0_7 = value.View;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
const env0_12 = Reflect.apply(createStyles, value, [{flex: {flex: 1}, safePadding: {marginTop: NAV_BAR_HEIGHT,
flex: 1}, contentContainer: {paddingHorizontal: 16}, guildIcon: {alignSelf: 'center'},
guildName: {'marginTop': 8, 'textAlign': 'center'}, title: {'marginTop': 16, 'textAlign': 'center'},
subTitle: {'marginTop': 8, 'textAlign': 'center'}, topicInput: {marginTop: 24}, buttonWrapper: {marginTop: 8},
error: {marginTop: 4}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/ChannelPrompt.tsx');
exports.default = ChannelPrompt;
}
function ChannelPrompt({guildId, buttonText, hasBack, hasSkip, onCancel, onSuccess}) { // fn#92534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12228:666, offset: 0x0208e51c, size: 1286 bytes, params: 2, frame: 38
var r9;
var r0;
var SafeAreaPaddingView;
var GuildIcon;
var name;
var items2;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var FreeFormInputGroup;
const env0_3 = onCancel;
const env0_4 = onSuccess;
var value;
const styles = useStyles();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const binding = env0_5;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, ['']);
const binding2 = env0_4;
const value4 = binding2(value3, 2);
const property = value4[0];
const property2 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property3 = value5[0];
const env0_6 = value5[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property4 = value7[0];
const env0_7 = value7[1];
binding.useLayoutEffect(_fun92536,
[(require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation(), hasBack, hasSkip, onCancel,
onSuccess]);
const value10 = binding.useCallback(env0_3(_fun92540), [guildId, onSuccess, property]);
if (guild == null) {
r0 = null;
} else {
SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
var safeAreaPaddingViewProps = {top: true, style: styles.safePadding};
var scrollViewBindingProps = {'style': null, 'contentInset': null, 'automaticallyAdjustContentInsets': false,
'keyboardShouldPersistTaps': 'handled', 'alwaysBounceVertical': false, style: styles.flex,
contentInset: {top: 0}, contentContainerStyle: styles.contentContainer};
GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
name = guild.name;
items2 = [];
name = guild.name;
items2[1] = {name};
string = intl.string;
items2[2] = {Reflect.apply(string,
intl, [t['8VRa7d']])};
string = intl.string;
items2[3] = {Reflect.apply(string,
intl,
[t['+855Pm']])};
FreeFormInputGroup = importDefault(8967) /* metro dependency 8967: FreeFormInputGroup */;
items2[4] = ;
items2[5] = {((Button) => )((require(4578) /* metro dependency 4578: ButtonNative */).Button)};
if (property4 != null) {
if (property4.hasFieldErrors()) {
value = importDefault(8970) /* metro dependency 8970: FreeFormErrorLabel */;
value = ((Component) => {property4?.getAnyErrorMessage()})(value);
r9 = value;
} else {
r9 = null;
}
} else {
r9 = null;
}
items2[6] = r9;
value = {items2};
r0 = value;
}
return r0;
}
function _fun92536() { // fn#92536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12228:990, offset: 0x0208ea22, size: 196 bytes, params: 1, frame: 22
var environment;
var r5;
var r3;
var value2;
var moduleValue;
var value4;
var moduleValue2;
var getHeaderTextButton;
var intl;
const binding = env0_8;
const setOptions = binding.setOptions;
const object2 = {};
if (hasBack) {
value2 = environment.__proto__;
moduleValue = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
r5 = moduleValue.getHeaderBackButton(onCancel);
} else {
r5 = function() {
return null;
};
}
object2.headerLeft = r5;
if (hasSkip) {
value4 = environment.__proto__;
moduleValue2 = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
getHeaderTextButton = moduleValue2.getHeaderTextButton;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r3 = Reflect.apply(getHeaderTextButton, moduleValue2,
[intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5Wxrcd']), onSuccess]);
} else {
r3 = function() {
return null;
};
}
object2.headerRight = r3;
Reflect.apply(setOptions, binding, [object2]);
}
function* _fun92540() { // fn#92540, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12228:1201, offset: 0x0208eaf1, size: 295 bytes, params: 1, frame: 25
var parent_id;
var binding2;
var property;
var value6;
var intl;
var formatToPlainString;
var value7;
var t;
var V4lepJ;
var object2;
var value8;
var binding3;
var value9;
var createTextChannel;
var value10;
var textChannel;
var value11;
var value12;
var error;
var APIError;
var prototype;
var value13;
var aPIError;
var value14;
let value = undefined;
if (true) {
value = undefined;
View(null);
ScrollView(true);
var binding = env2_8;
var defaultChannel = binding.getDefaultChannel(require);
reducibleJoin3: while (true) {
reduciblePort36: while (true) {
exceptionLanding35: while (true) {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding35;
}
break reducibleJoin3;
}
binding = env2_0;
APIError = binding(env2_2[14]).APIError;
prototype = APIError.prototype;
value13 = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value14 = aPIError instanceof Object ? aPIError : value13;
View(value14);
break reduciblePort36;
}
ScrollView(false);
return value;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding35;
}
try {
property = binding2[12];
} catch (error) {
break exceptionLanding35;
}
try {
value6 = binding(property);
} catch (error) {
break exceptionLanding35;
}
try {
intl = value6.intl;
} catch (error) {
break exceptionLanding35;
}
try {
formatToPlainString = intl.formatToPlainString;
} catch (error) {
break exceptionLanding35;
}
try {
property = binding2[12];
} catch (error) {
break exceptionLanding35;
}
try {
value7 = binding(property);
} catch (error) {
break exceptionLanding35;
}
try {
t = value7.t;
} catch (error) {
break exceptionLanding35;
}
try {
V4lepJ = t.V4lepJ;
} catch (error) {
break exceptionLanding35;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding35;
}
try {
binding = env1_5;
} catch (error) {
break exceptionLanding35;
}
try {
object2.topic = binding;
} catch (error) {
break exceptionLanding35;
}
try {
value8 = Reflect.apply(formatToPlainString, intl, [V4lepJ, object2]);
} catch (error) {
break exceptionLanding35;
}
try {
binding3 = env2_1;
} catch (error) {
break exceptionLanding35;
}
try {
property = binding2[13];
} catch (error) {
break exceptionLanding35;
}
try {
value9 = binding3(property);
} catch (error) {
break exceptionLanding35;
}
try {
createTextChannel = value9.createTextChannel;
} catch (error) {
break exceptionLanding35;
}
try {
} catch (error) {
break exceptionLanding35;
}
try {
value10 = defaultChannel == null;
} catch (error) {
break exceptionLanding35;
}
reducibleJoin27: while (true) {
if (value10) {
parent_id = value;
break reducibleJoin27;
}
try {
parent_id = defaultChannel.parent_id;
} catch (error) {
break exceptionLanding35;
}
break reducibleJoin27;
}
try {
textChannel = Reflect.apply(createTextChannel, value9, [require, binding, parent_id, value8]);
} catch (error) {
break exceptionLanding35;
}
yield textChannel;
try {
value11 = undefined;
value12 = false;
} catch (error) {
break exceptionLanding35;
}
if (value12) {
return value11;
}
try {
binding = env1_4;
} catch (error) {
break exceptionLanding35;
}
try {
binding();
} catch (error) {
break exceptionLanding35;
}
ScrollView(false);
}
return value;
}