Files
2026-07-28 01:06:53 +03:00

238 lines
14 KiB
TypeScript

/* Metro module 11458; source: modules/guild_automod/native/AutomodSubmitFeedbackModal.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 6618, 5277, 1244, 8160, 5061, 1585, 4573, 1305, 7972, 4578, 4863, 11459, 5060, 3856, 5280, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import Module08160 from '../../../by-id/module-08160.js'; /* Metro dependency 8160 */
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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ToastUtilsModule from '../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
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 AppAnalyticsUtilsModule from '../../app_analytics/AppAnalyticsUtils.tsx'; /* Metro dependency 4863 */
import * as AutomodAlertModule from '../AutomodAlert.tsx'; /* Metro dependency 5060 */
import * as AutomodFeedbackModule from '../AutomodFeedback.tsx'; /* Metro dependency 5061 */
import * as HeaderActionButtonNativeModule from '../../../design/components/Navigator/native/HeaderActionButton.native.tsx'; /* Metro dependency 5277 */
import * as NavigatorNativeModule from '../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as SafeAreaViewModule from '../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as GuildAutomodActionCreatorsModule from '../GuildAutomodActionCreators.tsx'; /* Metro dependency 11459 */
function _fun87705(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11644:6, offset: 0x01fc8897, size: 575 bytes, params: 8, frame: 25
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ConstantsModule;
const env0_6 = value.AnalyticEvents;
const Fonts = value.Fonts;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object = {};
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.container = {'flex': 1, 'paddingHorizontal': 16, 'paddingVertical': 0, 'backgroundColor': null,
'flexDirection': 'column', 'height': '100%', 'paddingTop': 8, backgroundColor: BACKGROUND_BASE_LOW};
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.header = {'flexDirection': 'row', 'justifyContent': 'flex-end', 'paddingVertical': 8,
backgroundColor: BACKGROUND_BASE_LOW};
const object4 = {'fontSize': 24, 'fontFamily': null, 'textAlign': 'center', 'color': null, 'lineHeight': 30};
const PRIMARY_BOLD = Fonts.PRIMARY_BOLD;
object4.fontFamily = PRIMARY_BOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object4.color = MOBILE_TEXT_HEADING_PRIMARY;
object.headerTitle = object4;
object.headerSubtitle = {'textAlign': 'center', 'marginTop': 8};
object.closeButtonContainer = {marginVertical: 14};
const object6 = {marginTop: 24};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object6.backgroundColor = BACKGROUND_SURFACE_HIGH;
object.formBody = object6;
object.formRow = {paddingVertical: 2};
object.radioIndicator = {marginRight: 0};
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.submitButtonContainer = {'position': 'absolute', 'bottom': 0, 'left': 0, 'right': 0, 'paddingHorizontal': 16,
'paddingVertical': 16, backgroundColor: BACKGROUND_BASE_LOW};
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_automod/native/AutomodSubmitFeedbackModal.tsx');
exports.default = AutomodSubmitFeedbackModal;
function Navbar({onClose}) { // fn#87706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11644:1076, offset: 0x01fc8ad6, size: 216 bytes, params: 2, frame: 26
const styles = useStyles();
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const HeaderActionButton = (HeaderActionButtonNativeModule).HeaderActionButton;
const intl = (IndexNativeModule).intl;
return (
<SafeAreaPaddingView top style={styles.header}>
<View style={styles.closeButtonContainer}>
<HeaderActionButton
accessibilityLabel={intl.string((IndexNativeModule).t.cpT0Cq)}
onPress={onClose}
source={Module08160}
/>
</View>
</SafeAreaPaddingView>
);
}
function SubmitFeedbackScreen({feedback, onChange, onSubmit}) { // fn#87707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11644:1346, offset: 0x01fc8bae, size: 556 bytes, params: 2, frame: 29
const styles = useStyles();
const value2 = (AutomodFeedbackModule).generateFeedbackOptions();
const bottom = (UseSafeAreaInsetsNative)().bottom;
const LegacyText = (NativeModule).LegacyText;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const items3 = [
<LegacyText style={styles.headerTitle}>
{Reflect.apply(string, intl, [(IndexNativeModule).t['7bdzNo']])}
</LegacyText>,
];
const Text = (TextModule).Text;
string = intl.string;
const Lbpk6m = (IndexNativeModule).t.Lbpk6m;
items3[1] = (
<Text
style={styles.headerSubtitle}
variant="text-sm/medium"
color="text-default"
>
{Reflect.apply(string, intl, [Lbpk6m])}
</Text>
);
items3[2] = (
<View style={styles.formBody}>
{value2.map(_fun87709)}
</View>
);
const items2 = [styles.submitButtonContainer];
items2[1] = {paddingBottom: bottom + 16};
const Button = (ButtonNativeModule).Button;
string = intl.string;
const Z6DZZ6 = (IndexNativeModule).t.Z6DZZ6;
items3[3] = (
<View style={items2}>
<Button
size="md"
text={Reflect.apply(string, intl, [Z6DZZ6])}
onPress={onSubmit}
/>
</View>
);
return (
<View style={styles.container}>
{items3}
</View>
);
function SubmitFeedbackScreenLabel(a0) { // fn#87708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11644:1485, owner: SubmitFeedbackScreen.label, offset: 0x01fc8dda, size: 82 bytes, params: 2, frame: 14
const Text = (TextModule).Text;
return (
<Text
style={styles.formRow}
variant="text-md/semibold"
color="interactive-text-active"
>
{a0}
</Text>
);
}
function _fun87709({name, value}, a1) { // fn#87709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11644:1901, offset: 0x01fc8e2c, size: 253 bytes, params: 3, frame: 26
const Fragment = env1_4.Fragment;
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const RadioIndicator = (NativeModule).RadioIndicator;
return (
<Fragment key={value}>
<FormRow
onPress={function() {
return onChange(value);
}}
trailing={<RadioIndicator active={feedback === value} style={styles.radioIndicator} />}
label={SubmitFeedbackScreenLabel(name)}
/>
{a1 < Module00057.length - 1 && ((FormDivider) => <FormDivider />)((require(7972) /* metro dependency 7972: native */).FormDivider)}
</Fragment>
);
}
}
function AutomodSubmitFeedbackModal({onCloseModal, automodDecision}) { // fn#87711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11644:2385, offset: 0x01fc8f29, size: 224 bytes, params: 2, frame: 21
const top = (UseSafeAreaInsetsNative)().top;
const useState = ReactModule.useState;
const Feedback = (AutomodFeedbackModule).Feedback;
const BUG = Feedback.BUG;
const value3 = env0_3(Reflect.apply(useState, ReactModule, [BUG]), 2);
const property = value3[0];
var env0_3 = value3[1];
const value4 = ReactModule.useMemo(_fun87712, [property, onCloseModal, automodDecision]);
const Navigator = (NavigatorNativeModule).Navigator;
return (
<Navigator
screens={value4}
initialRouteName="SUBMIT_FEEDBACK"
headerStatusBarHeight={top}
/>
);
function _fun87712() { // fn#87712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11644:2550, offset: 0x01fc9009, size: 65 bytes, params: 1, frame: 12
return (({onCloseModal, feedback, onChange, onSubmit}) => ({['SUBMIT_FEEDBACK']: {'ignoreKeyboard': true,
'title': '', customNavbar: _fun87714, headerLeft: _fun87715, render: _fun87716}}))({onCloseModal: onCloseModal,
feedback: env0_2, onChange: onChange_87717, onSubmit: onSubmit_87718});
function getScreens_87713({onCloseModal, feedback, onChange, onSubmit}) { // fn#87713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11644:2554, offset: 0x01fc904a, size: 108 bytes, params: 2, frame: 4
return {['SUBMIT_FEEDBACK']: {'ignoreKeyboard': true, 'title': '', customNavbar: customNavbar_87714,
headerLeft: function() {
return null;
}, render: render_87716}};
function getScreens_87713CustomNavbar() { // fn#87714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11644:2677, owner: getScreens_87713.customNavbar, offset: 0x01fc90b6, size: 35 bytes, params: 1, frame: 13
return <Navbar onClose={onCloseModal} />;
}
function getScreens_87713Render() { // fn#87716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11644:2730, owner: getScreens_87713.render, offset: 0x01fc90d9, size: 53 bytes, params: 1, frame: 14
return (
<SubmitFeedbackScreen
feedback={feedback}
onChange={onChange}
onSubmit={onSubmit}
/>
);
}
}
function onChange_87717(a0) { // fn#87717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11644:2832, offset: 0x01fc910e, size: 19 bytes, params: 2, frame: 11
env1_3(a0);
}
function onSubmit_87718() { // fn#87718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11644:2851, offset: 0x01fc9121, size: 187 bytes, params: 1, frame: 20
const trackWithMetadata = AppAnalyticsUtilsModule.trackWithMetadata;
const GUILD_AUTOMOD_FEEDBACK = AnalyticEvents.GUILD_AUTOMOD_FEEDBACK;
const automodDecisionBinding = automodDecision;
let messageId = automodDecisionBinding.messageId;
Reflect.apply(trackWithMetadata, AppAnalyticsUtilsModule, [GUILD_AUTOMOD_FEEDBACK, {feedback_type: env1_2,
message_id: messageId, content: automodDecisionBinding.messageContent,
decision_id: automodDecisionBinding.decisionId}]);
const executeAlertAction = GuildAutomodActionCreatorsModule.executeAlertAction;
messageId = automodDecisionBinding.messageId;
const channel = automodDecisionBinding.channel;
const AutomodAlertActionType = (AutomodAlertModule).AutomodAlertActionType;
const SUBMIT_FEEDBACK = AutomodAlertActionType.SUBMIT_FEEDBACK;
Reflect.apply(executeAlertAction, GuildAutomodActionCreatorsModule, [messageId, channel, SUBMIT_FEEDBACK]);
(ToastUtilsModule).presentFeedbackSent();
onCloseModal();
}
}
}
}
function getScreens_87713HeaderLeft() { // fn#87715, owner: getScreens_87713.headerLeft, offset: 0x00c58c16, size: 4 bytes, params: 1, frame: 1
return null;
}
global.__d(_fun87705, 11458, [57, 31, 27, 661, 33, 4501, 697, 6618, 5277, 1244, 8160, 5061, 1585, 4573, 1305, 7972,
4578, 4863, 11459, 5060, 3856, 5280,
2]) /* metro module 11458, dependencies: [57, 31, 27, 661, 33, 4501, 697, 6618, 5277, 1244, 8160, 5061, 1585, 4573, 1305, 7972, 4578, 4863, 11459, 5060, 3856, 5280, 2] */;