168 lines
10 KiB
TypeScript
168 lines
10 KiB
TypeScript
/* Metro module 13440; source: modules/parent_tools/native/FamilyCenterModalCancel.tsx; dependencies: [31, 27, 33, 4501, 697, 8171, 5080, 3856, 1244, 12624, 44, 6258, 6259, 13435, 8160, 4573, 2224, 13405, 10120, 6261, 4578, 5282, 10121, 2] */
|
|
import Module00044 from '../../../by-id/module-00044.js'; /* Metro dependency 44 */
|
|
import FamilyCenterMessages from '../FamilyCenter.messages.js'; /* Metro dependency 2224 */
|
|
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
|
|
import Module08160 from '../../../by-id/module-08160.js'; /* Metro dependency 8160 */
|
|
import UseIsInAdultAgeGroup from '../hooks/useIsInAdultAgeGroup.tsx'; /* Metro dependency 8171 */
|
|
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 _fun102210(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13630:6, offset: 0x022326f3, size: 309 bytes, params: 8, frame: 22
|
|
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 env0_7 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/native/FamilyCenterModalCancel.tsx');
|
|
exports.default = FamilyCenterModalCancel;
|
|
function FamilyCenterModalCancelScreen({otherUser}) { // fn#102211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13630:350, offset: 0x02232828, size: 801 bytes, params: 2, frame: 35
|
|
const styles = useStyles();
|
|
const value2 = (UseIsInAdultAgeGroup)();
|
|
const {cancelLinkRequest,
|
|
isCancelLoading} = (UseFamilyCenterActionsModule).useFamilyCenterActions({onSuccess: ReactModule.useCallback(_fun102212,
|
|
[]), onError: ReactModule.useCallback(_fun102213, [])});
|
|
const value6 = ReactModule.useCallback(function() {
|
|
cancelLinkRequest(otherUser.id);
|
|
}, [cancelLinkRequest, otherUser.id]);
|
|
(Module00044)(value2,
|
|
'FamilyCenterCancelModal should only be rendered for parents.');
|
|
const ModalScreen = (ModalScreenNativeModule).ModalScreen;
|
|
const ModalContent = (ModalContentNativeModule).ModalContent;
|
|
const items2 = [
|
|
((Component) => <Component otherUser={otherUser} iconSrc={Module08160} />)(FamilyCenterAvatarPair),
|
|
|
|
];
|
|
const Text = (TextModule).Text;
|
|
const intl = (IndexNativeModule).intl;
|
|
const string = intl.string;
|
|
const HynllX = (FamilyCenterMessages).HynllX;
|
|
items2[1] = (
|
|
<Text style={styles.headerText} variant="text-lg/bold">
|
|
{Reflect.apply(string, intl, [HynllX])}
|
|
</Text>
|
|
);
|
|
items2[2] = ((Component) => <Component user={otherUser} />)(importDefault(13405) /* metro dependency 13405: FamilyCenterUsernameHeader */);
|
|
const modalContent = (
|
|
<ModalContent>
|
|
<View style={styles.header}>
|
|
{items2}
|
|
</View>
|
|
</ModalContent>
|
|
);
|
|
const ModalFooter = (ModalFooterNativeModule).ModalFooter;
|
|
const ButtonGroup = (ButtonGroupNativeModule).ButtonGroup;
|
|
const Button = (ButtonNativeModule).Button;
|
|
return (
|
|
<ModalScreen>
|
|
{modalContent}
|
|
<ModalFooter>
|
|
<ButtonGroup>
|
|
<Button
|
|
variant="destructive"
|
|
disabled={isCancelLoading}
|
|
loading={isCancelLoading}
|
|
text={intl.string((FamilyCenterMessages).mK40bk)}
|
|
onPress={value6}
|
|
/>
|
|
<Button
|
|
variant="tertiary"
|
|
text={intl.string((FamilyCenterMessages).czincX)}
|
|
onPress={(ModalActionCreators).pop}
|
|
/>
|
|
</ButtonGroup>
|
|
</ModalFooter>
|
|
</ModalScreen>
|
|
);
|
|
function _fun102212() { // fn#102212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13630:443, offset: 0x020acfc4, size: 37 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__;
|
|
(ModalActionCreators).pop();
|
|
}
|
|
|
|
function _fun102213() { // fn#102213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13630:485, offset: 0x02232577, 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 FamilyCenterModalCancel({otherUser}) { // fn#102215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13630:1453, offset: 0x02232b49, size: 156 bytes, params: 2, frame: 18
|
|
const value2 = ReactModule.useMemo(function() {
|
|
return _fun102217(otherUser);
|
|
}, [otherUser]);
|
|
const Modal = (ModalNativeModule).Modal;
|
|
const intl = (IndexNativeModule).intl;
|
|
return (
|
|
<Modal
|
|
initialRouteName="CANCEL"
|
|
screens={value2}
|
|
headerBackTitle={intl.string((IndexNativeModule).t['13/7kX'])}
|
|
/>
|
|
);
|
|
function _fun102216() { // fn#102216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13630:1518, offset: 0x02232be5, 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 = _fun102218;
|
|
object2.render = _fun102219;
|
|
return {CANCEL: object2};
|
|
})(otherUser);
|
|
function getScreens_102217(a0) { // fn#102217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13630:1522, offset: 0x02232bfe, 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_102219;
|
|
return {CANCEL: object2};
|
|
function getScreens_102217Render() { // fn#102219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13630:1657, owner: getScreens_102217.render, offset: 0x02231fa4, size: 35 bytes, params: 1, frame: 13
|
|
return <FamilyCenterModalCancelScreen otherUser={env0_0} />;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function getScreens_102217HeaderTitle() { // fn#102218, owner: getScreens_102217.headerTitle, offset: 0x00c58c16, size: 4 bytes, params: 1, frame: 1
|
|
return null;
|
|
}
|
|
|
|
global.__d(_fun102210, 13440, [31, 27, 33, 4501, 697, 8171, 5080, 3856, 1244, 12624, 44, 6258, 6259, 13435, 8160,
|
|
4573, 2224, 13405, 10120, 6261, 4578, 5282, 10121,
|
|
2]) /* metro module 13440, dependencies: [31, 27, 33, 4501, 697, 8171, 5080, 3856, 1244, 12624, 44, 6258, 6259, 13435, 8160, 4573, 2224, 13405, 10120, 6261, 4578, 5282, 10121, 2] */;
|