140 lines
8.0 KiB
TypeScript
140 lines
8.0 KiB
TypeScript
/* Metro module 9928; source: modules/feedback/native/FeedbackModal.tsx; dependencies: [57, 31, 27, 33, 4501, 7972, 1244, 6766, 1948, 4578, 5080, 5280, 5282, 2] */
|
|
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
|
|
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 CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
|
|
import * as NavigatorNativeModule from '../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
|
|
import * as NativeModule from '../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
|
|
|
|
function _fun77724(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10114:6, offset: 0x01e08948, size: 289 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactNativeModule;
|
|
const env0_5 = value.View;
|
|
const env0_6 = value.ScrollView;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_7 = value.jsx;
|
|
const env0_8 = value.jsxs;
|
|
const env0_9 = (CreateStylesModule).createStyles({helpDeskLabel: {'lineHeight': 16,
|
|
'marginTop': 8}, bottomContainer: {paddingHorizontal: 16}, submitButton: {'marginTop': 24, 'marginBottom': 24}});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/feedback/native/FeedbackModal.tsx');
|
|
exports.default = FeedbackModal;
|
|
function FeedbackForm_77725({result, trackReport, titleLabel, descriptionLabel, hideHelpdeskLink}) { // fn#77725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10114:328, offset: 0x01e08a69, size: 841 bytes, params: 2, frame: 36
|
|
var r9;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
var TextWithIOSLinkWorkaround;
|
|
var format;
|
|
var ybi2tD;
|
|
var object2;
|
|
const styles = useStyles();
|
|
const reason = result.reason;
|
|
const [property, property2] = Module00057(ReactModule.useState(''), 2);
|
|
const FormSection = (NativeModule).FormSection;
|
|
const FormInput = (NativeModule).FormInput;
|
|
const items2 = [
|
|
<FormInput
|
|
value={reason?.label}
|
|
title={titleLabel ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vcqwCj)}
|
|
disabled
|
|
key="channel-input"
|
|
/>,
|
|
];
|
|
const FormDivider = (NativeModule).FormDivider;
|
|
items2[1] = <FormDivider />;
|
|
items2[2] = (
|
|
<FormInput
|
|
value={property}
|
|
title={descriptionLabel ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h95hcn)}
|
|
onChange={property2}
|
|
multiline
|
|
numberOfLines={4}
|
|
autoCorrect
|
|
/>
|
|
);
|
|
const formSection = (
|
|
<FormSection>
|
|
{items2}
|
|
</FormSection>
|
|
);
|
|
if (hideHelpdeskLink) {
|
|
r9 = !hideHelpdeskLink;
|
|
} else {
|
|
TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
|
|
var textWithIOSLinkWorkaroundProps = {'style': null, 'variant': 'text-xs/medium', 'color': 'text-muted',
|
|
style: styles.helpDeskLabel};
|
|
format = intl.format;
|
|
ybi2tD = (require(1244) /* metro dependency 1244: indexNative */).t.ybi2tD;
|
|
object2 = {};
|
|
object2.helpdeskURL = (importDefault(1948) /* metro dependency 1948: HelpdeskUtils */).getSubmitRequestURL();
|
|
r9 = (
|
|
<TextWithIOSLinkWorkaround {...textWithIOSLinkWorkaroundProps}>
|
|
{Reflect.apply(format, intl, [ybi2tD, object2])}
|
|
</TextWithIOSLinkWorkaround>
|
|
);
|
|
}
|
|
const Button = (ButtonNativeModule).Button;
|
|
return (
|
|
<ScrollView keyboardShouldPersistTaps="handled">
|
|
{formSection}
|
|
<View style={styles.bottomContainer}>
|
|
{r9}
|
|
<View style={styles.submitButton}>
|
|
<Button
|
|
disabled={property == null || property === ''}
|
|
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.geKm7t)}
|
|
onPress={onPress_77726}
|
|
/>
|
|
</View>
|
|
</View>
|
|
</ScrollView>
|
|
);
|
|
function FeedbackForm_77725OnPress() { // fn#77726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10114:1250, owner: FeedbackForm_77725.onPress, offset: 0x01e08db2, size: 75 bytes, params: 1, frame: 14
|
|
const value = environment.__proto__;
|
|
(ModalActionCreators).pop();
|
|
const trackReportBinding = trackReport;
|
|
const object = {};
|
|
copyDataProperties(object, result, undefined);
|
|
object['feedback'] = env0_2;
|
|
trackReportBinding(object);
|
|
}
|
|
|
|
}
|
|
|
|
function FeedbackModal(a0) { // fn#77727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10114:1388, offset: 0x01e08dfd, size: 267 bytes, params: 2, frame: 22
|
|
const env0_0 = a0;
|
|
const env0_3 = ReactModule.useRef({result: a0.result, trackReport: a0.trackReport});
|
|
ReactModule.useEffect(_fun77728);
|
|
const value2 = ReactModule.useCallback(_fun77729, []);
|
|
const Navigator = (NavigatorNativeModule).Navigator;
|
|
const object2 = {};
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['dBx+Cn']);
|
|
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(value2);
|
|
object2.render = render_77730;
|
|
return <Navigator initialRouteName="Feedback" screens={{Feedback: object2}} />;
|
|
function _fun77728() { // fn#77728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10114:1495, offset: 0x01e08f08, size: 37 bytes, params: 1, frame: 4
|
|
env0_3.current = {result: result, trackReport: trackReport};
|
|
}
|
|
|
|
function _fun77729() { // fn#77729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10114:1559, offset: 0x01e08f2d, size: 66 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__;
|
|
(ModalActionCreators).pop();
|
|
const current = env0_3.current;
|
|
current.trackReport(current.result);
|
|
}
|
|
|
|
function FeedbackModalRender() { // fn#77730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10114:1807, owner: FeedbackModal.render, offset: 0x01e08f6f, size: 37 bytes, params: 1, frame: 13
|
|
return <FeedbackForm_77725 {...env0_0} />;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun77724, 9928, [57, 31, 27, 33, 4501, 7972, 1244, 6766, 1948, 4578, 5080, 5280, 5282,
|
|
2]) /* metro module 9928, dependencies: [57, 31, 27, 33, 4501, 7972, 1244, 6766, 1948, 4578, 5080, 5280, 5282, 2] */;
|