154 lines
8.7 KiB
TypeScript
154 lines
8.7 KiB
TypeScript
/* Metro module 11750; source: modules/polls/native/EditPollCreationImageAltTextModal.tsx; dependencies: [57, 31, 27, 7217, 33, 4501, 697, 11747, 11749, 6618, 1244, 1305, 8160, 4573, 5467, 8127, 7972, 2] */
|
|
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import KeyboardAwareView from '../../keyboard/native/KeyboardAwareView.tsx'; /* Metro dependency 5467 */
|
|
import Module08160 from '../../../by-id/module-08160.js'; /* Metro dependency 8160 */
|
|
import UseRenderPollAnswerImage from './useRenderPollAnswerImage.tsx'; /* Metro dependency 11747 */
|
|
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 NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
|
|
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as SafeAreaViewModule from '../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
|
|
import * as PollsConstantsModule from '../PollsConstants.tsx'; /* Metro dependency 7217 */
|
|
import * as NativeModule2 from '../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
|
|
import * as EditPollCreationImageAltTextModalActionCreatorsModule from './EditPollCreationImageAltTextModalActionCreators.tsx'; /* Metro dependency 11749 */
|
|
|
|
function _fun90052(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11936:6, offset: 0x020286fc, size: 473 bytes, params: 8, frame: 23
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactNativeModule;
|
|
const env0_5 = value.TouchableOpacity;
|
|
const env0_6 = value.View;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_8 = value.jsx;
|
|
const env0_9 = 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.container = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
|
|
object.header = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between', 'padding': 18,
|
|
'paddingTop': 10};
|
|
const INTERACTIVE_BACKGROUND_HOVER = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_HOVER;
|
|
object.separator = {borderBottomWidth: 1, borderColor: INTERACTIVE_BACKGROUND_HOVER};
|
|
object.contentContainer = {'flex': 1, 'justifyContent': 'center'};
|
|
const object4 = {'borderRadius': null, 'justifyContent': 'center', 'alignItems': 'center', 'alignSelf': 'center',
|
|
'overflow': 'hidden', 'aspectRatio': 1};
|
|
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
|
object.imageContainer = object4;
|
|
object.formContainer = {paddingHorizontal: 16};
|
|
const object6 = {};
|
|
const REDESIGN_CHAT_INPUT_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_CHAT_INPUT_BACKGROUND;
|
|
object6.backgroundColor = REDESIGN_CHAT_INPUT_BACKGROUND;
|
|
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
|
object.textInput = object6;
|
|
const env0_10 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/polls/native/EditPollCreationImageAltTextModal.tsx');
|
|
exports.default = EditPollCreationImageAltTextModal;
|
|
function EditPollCreationImageAltTextModal({channelId, answer, onSave, imageSize}) { // fn#90053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11936:844, offset: 0x020288d5, size: 1096 bytes, params: 2, frame: 40
|
|
const styles = useStyles();
|
|
const {renderImage,
|
|
upload} = (UseRenderPollAnswerImage)(channelId,
|
|
answer.localCreationAnswerId, answer.image, imageSize, imageSize);
|
|
const useState = ReactModule.useState;
|
|
const value6 = Module00057(Reflect.apply(useState, ReactModule, [upload?.description ?? '']), 2);
|
|
const property = value6[0];
|
|
const property2 = value6[1];
|
|
const value7 = ReactModule.useCallback(_fun90054, [onSave, property]);
|
|
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
|
|
const closeEditPollCreationImageAltTextModal = (EditPollCreationImageAltTextModalActionCreatorsModule).closeEditPollCreationImageAltTextModal;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let string = intl.string;
|
|
const cpT0Cq = (require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq;
|
|
const Icon = (NativeModule).Icon;
|
|
const items3 = [
|
|
<TouchableOpacity
|
|
onPress={closeEditPollCreationImageAltTextModal}
|
|
activeOpacity={0.5}
|
|
accessibilityRole="button"
|
|
accessibilityLabel={Reflect.apply(string, intl, [cpT0Cq])}
|
|
>
|
|
<Icon source={Module08160} />
|
|
</TouchableOpacity>,
|
|
];
|
|
const Text = (TextModule).Text;
|
|
string = intl.string;
|
|
const Cq44Rg = (require(1244) /* metro dependency 1244: indexNative */).t.Cq44Rg;
|
|
items3[1] = (
|
|
<Text variant="redesign/heading-18/bold" color="mobile-text-heading-primary">
|
|
{Reflect.apply(string, intl, [Cq44Rg])}
|
|
</Text>
|
|
);
|
|
items3[2] = (
|
|
<TouchableOpacity onPress={value7} activeOpacity={0.5}>
|
|
<Text variant="text-md/medium" color="text-brand">
|
|
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+'])}
|
|
</Text>
|
|
</TouchableOpacity>
|
|
);
|
|
const items2 = [
|
|
<View style={styles.header}>
|
|
{items3}
|
|
</View>,
|
|
];
|
|
items2[1] = <View style={styles.separator} />;
|
|
const view = (
|
|
<View style={styles.imageContainer}>
|
|
{renderImage}
|
|
</View>
|
|
);
|
|
const Spacer = (NativeModule).Spacer;
|
|
const items4 = [
|
|
<Spacer size={27} />,
|
|
];
|
|
items4[1] = ((Component) => <Component>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/2Gnoa'])}</Component>)(importDefault(8127) /* metro dependency 8127: FormHeader */);
|
|
const FormInput = (NativeModule2).FormInput;
|
|
const ClearButtonVisibility = (NativeModule).ClearButtonVisibility;
|
|
const WITH_CONTENT = ClearButtonVisibility.WITH_CONTENT;
|
|
items4[2] = (
|
|
<FormInput
|
|
showTopContainer={false}
|
|
showBorder={false}
|
|
multiline={false}
|
|
value={property}
|
|
onChange={property2}
|
|
clearButtonVisibility={WITH_CONTENT}
|
|
style={styles.textInput}
|
|
textContentType="none"
|
|
maxLength={MAX_POLL_ANSWER_LENGTH}
|
|
autoFocus
|
|
autoCorrect
|
|
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/2Gnoa'])}
|
|
/>
|
|
);
|
|
items4[3] = <Spacer size={27} />;
|
|
items2[2] = (
|
|
<KeyboardAwareView style={styles.contentContainer}>
|
|
{view}
|
|
<View style={styles.formContainer}>
|
|
{items4}
|
|
</View>
|
|
</KeyboardAwareView>
|
|
);
|
|
return (
|
|
<SafeAreaPaddingView top style={styles.container}>
|
|
{items2}
|
|
</SafeAreaPaddingView>
|
|
);
|
|
function _fun90054() { // fn#90054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11936:1118, offset: 0x02028d1d, size: 65 bytes, params: 1, frame: 11
|
|
if (env0_1 != null) {
|
|
onSave(env0_1);
|
|
}
|
|
const value = environment.__proto__;
|
|
(EditPollCreationImageAltTextModalActionCreatorsModule).closeEditPollCreationImageAltTextModal();
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun90052, 11750, [57, 31, 27, 7217, 33, 4501, 697, 11747, 11749, 6618, 1244, 1305, 8160, 4573, 5467,
|
|
8127, 7972,
|
|
2]) /* metro module 11750, dependencies: [57, 31, 27, 7217, 33, 4501, 697, 11747, 11749, 6618, 1244, 1305, 8160, 4573, 5467, 8127, 7972, 2] */;
|