94 lines
6.9 KiB
TypeScript
94 lines
6.9 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] */
|
|
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
|
|
var object2;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
|
const env0_4 = importAll(31) /* metro dependency 31 */;
|
|
let value = require(27) /* metro dependency 27 */;
|
|
const env0_5 = value.TouchableOpacity;
|
|
const env0_6 = value.View;
|
|
const env0_7 = (require(7217) /* metro dependency 7217: PollsConstants */).MAX_POLL_ANSWER_LENGTH;
|
|
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;
|
|
object2 = {};
|
|
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
|
object2.container = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
|
|
object2.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;
|
|
object2.separator = {borderBottomWidth: 1, borderColor: INTERACTIVE_BACKGROUND_HOVER};
|
|
object2.contentContainer = {'flex': 1, 'justifyContent': 'center'};
|
|
const object3 = {'borderRadius': null, 'justifyContent': 'center', 'alignItems': 'center', 'alignSelf': 'center',
|
|
'overflow': 'hidden', 'aspectRatio': 1};
|
|
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
|
object2.imageContainer = object3;
|
|
object2.formContainer = {paddingHorizontal: 16};
|
|
const object5 = {};
|
|
const REDESIGN_CHAT_INPUT_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_CHAT_INPUT_BACKGROUND;
|
|
object5.backgroundColor = REDESIGN_CHAT_INPUT_BACKGROUND;
|
|
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
|
object2.textInput = object5;
|
|
const env0_10 = Reflect.apply(createStyles, value, [object2]);
|
|
(require(2) /* metro dependency 2 */).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} = (importDefault(11747) /* metro dependency 11747: useRenderPollAnswerImage */)(channelId,
|
|
answer.localCreationAnswerId, answer.image, imageSize, imageSize);
|
|
const binding = env0_4;
|
|
const useState = binding.useState;
|
|
const value6 = env0_3(Reflect.apply(useState, binding, [upload?.description ?? '']), 2);
|
|
const property = value6[0];
|
|
const property2 = value6[1];
|
|
const value7 = env0_4.useCallback(_fun90054, [onSave, property]);
|
|
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
|
const closeEditPollCreationImageAltTextModal = (require(11749) /* metro dependency 11749: EditPollCreationImageAltTextModalActionCreators */).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 = (require(1305) /* metro dependency 1305: native */).Icon;
|
|
const items3 = [<TouchableOpacity onPress={closeEditPollCreationImageAltTextModal} activeOpacity={0.5} accessibilityRole="button" accessibilityLabel={Reflect.apply(string,
|
|
intl, [cpT0Cq])}><Icon source={importDefault(8160) /* metro dependency 8160 */} /></TouchableOpacity>];
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).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 KeyboardAwareView = importDefault(5467) /* metro dependency 5467: KeyboardAwareView */;
|
|
const view = <View style={styles.imageContainer}>{renderImage}</View>;
|
|
const Spacer = (require(1305) /* metro dependency 1305: native */).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 = (require(7972) /* metro dependency 7972: native */).FormInput;
|
|
const ClearButtonVisibility = (require(1305) /* metro dependency 1305: native */).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__;
|
|
(require(11749) /* metro dependency 11749: EditPollCreationImageAltTextModalActionCreators */).closeEditPollCreationImageAltTextModal();
|
|
}
|
|
|