180 lines
11 KiB
TypeScript
180 lines
11 KiB
TypeScript
/* Metro module 13438; source: modules/parent_tools/native/FamilyCenterModalAccept.tsx; dependencies: [31, 27, 33, 4501, 697, 5080, 3856, 1244, 12624, 6258, 6259, 13435, 4057, 4573, 2224, 13405, 12626, 10120, 6261, 4578, 5282, 10121, 2] */
|
|
import Module04057 from '../../../by-id/module-04057.js'; /* Metro dependency 4057 */
|
|
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
|
|
import FamilyCenterAvatarPair from './FamilyCenterAvatarPair.tsx'; /* Metro dependency 13435 */
|
|
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
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 ModalScreenNativeModule from '../../../design/components/Modal/native/ModalScreen.native.tsx'; /* Metro dependency 6258 */
|
|
import * as ModalContentNativeModule from '../../../design/components/Modal/native/ModalContent.native.tsx'; /* Metro dependency 6259 */
|
|
import * as ButtonGroupNativeModule from '../../../design/components/ButtonGroup/native/ButtonGroup.native.tsx'; /* Metro dependency 6261 */
|
|
import * as ModalFooterNativeModule from '../../../design/components/Modal/native/ModalFooter.native.tsx'; /* Metro dependency 10120 */
|
|
import * as ModalNativeModule from '../../../design/components/Modal/native/Modal.native.tsx'; /* Metro dependency 10121 */
|
|
import * as UseFamilyCenterActionsModule from '../hooks/useFamilyCenterActions.tsx'; /* Metro dependency 12624 */
|
|
|
|
function _fun102190(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13628:6, offset: 0x022318bb, size: 396 bytes, params: 8, frame: 23
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = JsxRuntimeModule;
|
|
const env0_5 = value.jsx;
|
|
const env0_6 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object.header = {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', marginBottom: PX_16};
|
|
const object3 = {};
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object3.marginTop = PX_16;
|
|
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
|
object3.marginBottom = PX_4;
|
|
object.headerText = object3;
|
|
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
|
object.icon = {transform: [{rotate: '45deg'}], tintColor: INTERACTIVE_TEXT_DEFAULT};
|
|
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
|
object.disclaimer = {marginTop: PX_12};
|
|
const env0_7 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/native/FamilyCenterModalAccept.tsx');
|
|
exports.default = FamilyCenterModalAccept;
|
|
function FamilyCenterModalAcceptScreen({otherUser}) { // fn#102191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13628:479, offset: 0x02231a47, size: 931 bytes, params: 2, frame: 37
|
|
const styles = useStyles();
|
|
const {acceptLinkRequest,
|
|
isAcceptLoading} = (UseFamilyCenterActionsModule).useFamilyCenterActions({onSuccess: ReactModule.useCallback(_fun102192,
|
|
[]), onError: ReactModule.useCallback(_fun102193, [])});
|
|
const value5 = ReactModule.useCallback(function() {
|
|
acceptLinkRequest(otherUser.id);
|
|
}, [acceptLinkRequest, otherUser.id]);
|
|
const ModalScreen = (ModalScreenNativeModule).ModalScreen;
|
|
const ModalContent = (ModalContentNativeModule).ModalContent;
|
|
const items3 = [
|
|
((Component) => <Component otherUser={otherUser} iconSrc={Module04057} iconStyles={styles.icon} />)(FamilyCenterAvatarPair),
|
|
|
|
];
|
|
const Text = (TextModule).Text;
|
|
const intl = (IndexNativeModule).intl;
|
|
items3[1] = (
|
|
<Text style={styles.headerText} variant="text-lg/bold">
|
|
{intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).rlNJwZ)}
|
|
</Text>
|
|
);
|
|
items3[2] = ((Component) => <Component user={otherUser} />)(importDefault(13405) /* metro dependency 13405: FamilyCenterUsernameHeader */);
|
|
const items2 = [
|
|
<View style={styles.header}>
|
|
{items3}
|
|
</View>,
|
|
];
|
|
items2[1] = ((Component) => <Component source="accept-modal" />)(importDefault(12626) /* metro dependency 12626: FamilyCenterDataConfirmation */);
|
|
const format = intl.format;
|
|
const snlFqR = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).snlFqR;
|
|
const username = otherUser.username;
|
|
items2[2] = (
|
|
<Text
|
|
style={styles.disclaimer}
|
|
variant="text-xs/normal"
|
|
color="text-default"
|
|
>
|
|
{Reflect.apply(format, intl, [snlFqR, {username: username}])}
|
|
</Text>
|
|
);
|
|
const modalContent = (
|
|
<ModalContent>
|
|
{items2}
|
|
</ModalContent>
|
|
);
|
|
const ModalFooter = (ModalFooterNativeModule).ModalFooter;
|
|
const ButtonGroup = (ButtonGroupNativeModule).ButtonGroup;
|
|
const Button = (ButtonNativeModule).Button;
|
|
return (
|
|
<ModalScreen>
|
|
{modalContent}
|
|
<ModalFooter>
|
|
<ButtonGroup>
|
|
<Button
|
|
variant="primary"
|
|
disabled={isAcceptLoading}
|
|
loading={isAcceptLoading}
|
|
text={(IndexNativeModule).intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['wI/jo3'])}
|
|
onPress={value5}
|
|
/>
|
|
<Button
|
|
variant="tertiary"
|
|
text={intl.string((IndexNativeModule).t['ETE/oC'])}
|
|
onPress={(ModalActionCreators).pop}
|
|
/>
|
|
</ButtonGroup>
|
|
</ModalFooter>
|
|
</ModalScreen>
|
|
);
|
|
function _fun102192() { // fn#102192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13628:560, offset: 0x02231dea, size: 37 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__;
|
|
(ModalActionCreators).pop();
|
|
}
|
|
|
|
function _fun102193() { // fn#102193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13628:602, offset: 0x02231e0f, size: 85 bytes, params: 1, frame: 16
|
|
let value = environment.__proto__;
|
|
value = require(3856) /* metro dependency 3856: ToastUtils */;
|
|
const presentFailedToast = value.presentFailedToast;
|
|
const intl = (IndexNativeModule).intl;
|
|
const string = intl.string;
|
|
const R0RpRX = (IndexNativeModule).t.R0RpRX;
|
|
Reflect.apply(presentFailedToast, value, [Reflect.apply(string, intl, [R0RpRX])]);
|
|
}
|
|
|
|
}
|
|
|
|
function FamilyCenterModalAccept({otherUser}) { // fn#102195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13628:1705, offset: 0x02231e7d, size: 156 bytes, params: 2, frame: 18
|
|
const value2 = ReactModule.useMemo(function() {
|
|
return _fun102197(otherUser);
|
|
}, [otherUser]);
|
|
const Modal = (ModalNativeModule).Modal;
|
|
const intl = (IndexNativeModule).intl;
|
|
return (
|
|
<Modal
|
|
initialRouteName="ACCEPT"
|
|
screens={value2}
|
|
headerBackTitle={intl.string((IndexNativeModule).t['13/7kX'])}
|
|
/>
|
|
);
|
|
function _fun102196() { // fn#102196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13628:1770, offset: 0x02231f19, size: 25 bytes, params: 1, frame: 11
|
|
return ((a0) => {
|
|
var env0_0 = a0;
|
|
var object2 = {headerShown: true};
|
|
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop);
|
|
object2.headerTitle = _fun102198;
|
|
object2.render = _fun102199;
|
|
return {ACCEPT: object2};
|
|
})(otherUser);
|
|
function getScreens_102197(a0) { // fn#102197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13628:1774, offset: 0x02231f32, size: 114 bytes, params: 2, frame: 17
|
|
const env0_0 = a0;
|
|
const object2 = {headerShown: true};
|
|
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop);
|
|
object2.headerTitle = function() {
|
|
return null;
|
|
};
|
|
object2.render = render_102199;
|
|
return {ACCEPT: object2};
|
|
function getScreens_102197Render() { // fn#102199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13628:1909, owner: getScreens_102197.render, offset: 0x02231fa4, size: 35 bytes, params: 1, frame: 13
|
|
return <FamilyCenterModalAcceptScreen otherUser={env0_0} />;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function getScreens_102197HeaderTitle() { // fn#102198, owner: getScreens_102197.headerTitle, offset: 0x00c58c16, size: 4 bytes, params: 1, frame: 1
|
|
return null;
|
|
}
|
|
|
|
global.__d(_fun102190, 13438, [31, 27, 33, 4501, 697, 5080, 3856, 1244, 12624, 6258, 6259, 13435, 4057, 4573, 2224,
|
|
13405, 12626, 10120, 6261, 4578, 5282, 10121,
|
|
2]) /* metro module 13438, dependencies: [31, 27, 33, 4501, 697, 5080, 3856, 1244, 12624, 6258, 6259, 13435, 4057, 4573, 2224, 13405, 12626, 10120, 6261, 4578, 5282, 10121, 2] */;
|