112 lines
6.7 KiB
TypeScript
112 lines
6.7 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] */
|
|
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
|
|
var object2;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importAll(31) /* metro dependency 31 */;
|
|
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
|
let value = require(33) /* metro dependency 33 */;
|
|
const env0_5 = value.jsx;
|
|
const env0_6 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object2 = {};
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object2.header = {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', marginBottom: PX_16};
|
|
const object4 = {};
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object4.marginTop = PX_16;
|
|
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
|
object4.marginBottom = PX_4;
|
|
object2.headerText = object4;
|
|
const env0_7 = Reflect.apply(createStyles, value, [object2]);
|
|
(require(2) /* metro dependency 2 */).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 = (importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)();
|
|
const {cancelLinkRequest,
|
|
isCancelLoading} = (require(12624) /* metro dependency 12624: useFamilyCenterActions */).useFamilyCenterActions({onSuccess: env0_3.useCallback(_fun102212,
|
|
[]), onError: env0_3.useCallback(_fun102213, [])});
|
|
const value6 = env0_3.useCallback(function() {
|
|
cancelLinkRequest(otherUser.id);
|
|
}, [cancelLinkRequest, otherUser.id]);
|
|
(importDefault(44) /* metro dependency 44 */)(value2,
|
|
'FamilyCenterCancelModal should only be rendered for parents.');
|
|
const ModalScreen = (require(6258) /* metro dependency 6258: ModalScreenNative */).ModalScreen;
|
|
const ModalContent = (require(6259) /* metro dependency 6259: ModalContentNative */).ModalContent;
|
|
const items2 = [((Component) => <Component otherUser={otherUser} iconSrc={importDefault(8160) /* metro dependency 8160 */} />)(importDefault(13435) /* metro dependency 13435: FamilyCenterAvatarPair */)];
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const string = intl.string;
|
|
const HynllX = (importDefault(2224) /* metro dependency 2224: 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 = (require(10120) /* metro dependency 10120: ModalFooterNative */).ModalFooter;
|
|
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
|
|
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
|
return (
|
|
<ModalScreen>
|
|
{modalContent}
|
|
<ModalFooter>
|
|
<ButtonGroup>
|
|
<Button
|
|
variant="destructive"
|
|
disabled={isCancelLoading}
|
|
loading={isCancelLoading}
|
|
text={intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).mK40bk)}
|
|
onPress={value6}
|
|
/>
|
|
<Button
|
|
variant="tertiary"
|
|
text={intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).czincX)}
|
|
onPress={(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop}
|
|
/>
|
|
</ButtonGroup>
|
|
</ModalFooter>
|
|
</ModalScreen>
|
|
);
|
|
}
|
|
|
|
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 = env0_3.useMemo(function() {
|
|
return _fun102217(otherUser);
|
|
}, [otherUser]);
|
|
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
return (
|
|
<Modal
|
|
initialRouteName="CANCEL"
|
|
screens={value2}
|
|
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).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 object = {headerShown: true};
|
|
object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop);
|
|
object.headerTitle = function() {
|
|
return null;
|
|
};
|
|
object.render = render_102219;
|
|
return {CANCEL: object};
|
|
}
|
|
|