196 lines
12 KiB
TypeScript
196 lines
12 KiB
TypeScript
/* Metro module 13439; source: modules/parent_tools/native/FamilyCenterModalDecline.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 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 _fun102200(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13629:6, offset: 0x02231fc7, size: 418 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;
|
|
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
|
object3.marginBottom = PX_4;
|
|
object.headerText = object3;
|
|
const object4 = {};
|
|
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object4.padding = PX_24;
|
|
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
|
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
|
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
|
object.body = object4;
|
|
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
|
object.noticeHeader = {marginBottom: PX_4};
|
|
const env0_7 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/native/FamilyCenterModalDecline.tsx');
|
|
exports.default = FamilyCenterModalDecline;
|
|
function FamilyCenterModalDeclineScreen({otherUser}) { // fn#102201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13629:517, offset: 0x02232169, size: 1038 bytes, params: 2, frame: 37
|
|
const styles = useStyles();
|
|
const value2 = (UseIsInAdultAgeGroup)();
|
|
const {declineLinkRequest,
|
|
isDeclineLoading} = (UseFamilyCenterActionsModule).useFamilyCenterActions({onSuccess: ReactModule.useCallback(_fun102202,
|
|
[]), onError: ReactModule.useCallback(_fun102203, [])});
|
|
const value6 = ReactModule.useCallback(function() {
|
|
declineLinkRequest(otherUser.id);
|
|
}, [declineLinkRequest, otherUser.id]);
|
|
(Module00044)(!value2,
|
|
'FamilyCenterDeclineLinkModal should only be rendered for teens.');
|
|
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;
|
|
let string = intl.string;
|
|
items2[1] = (
|
|
<Text style={styles.headerText} variant="text-lg/bold">
|
|
{Reflect.apply(string, intl,
|
|
[(importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).teIRCR])}
|
|
</Text>
|
|
);
|
|
items2[2] = ((Component) => <Component user={otherUser} />)(importDefault(13405) /* metro dependency 13405: FamilyCenterUsernameHeader */);
|
|
const view = (
|
|
<View style={styles.header}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
const text = (
|
|
<Text
|
|
style={styles.noticeHeader}
|
|
variant="eyebrow"
|
|
color="mobile-text-heading-primary"
|
|
>
|
|
{intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).cXgKMD)}
|
|
</Text>
|
|
);
|
|
string = intl.string;
|
|
const LcM8BS = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).LcM8BS;
|
|
const modalContent = (
|
|
<ModalContent>
|
|
{view}
|
|
<View style={styles.body}>
|
|
{text}
|
|
<Text variant="text-sm/normal" color="text-default">
|
|
{Reflect.apply(string, intl, [LcM8BS])}
|
|
</Text>
|
|
</View>
|
|
</ModalContent>
|
|
);
|
|
const ModalFooter = (ModalFooterNativeModule).ModalFooter;
|
|
const ButtonGroup = (ButtonGroupNativeModule).ButtonGroup;
|
|
const Button = (ButtonNativeModule).Button;
|
|
return (
|
|
<ModalScreen>
|
|
{modalContent}
|
|
<ModalFooter>
|
|
<ButtonGroup>
|
|
<Button
|
|
variant="destructive"
|
|
disabled={isDeclineLoading}
|
|
loading={isDeclineLoading}
|
|
text={intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).dKxFcn)}
|
|
onPress={value6}
|
|
/>
|
|
<Button
|
|
variant="tertiary"
|
|
text={intl.string((IndexNativeModule).t['ETE/oC'])}
|
|
onPress={(ModalActionCreators).pop}
|
|
/>
|
|
</ButtonGroup>
|
|
</ModalFooter>
|
|
</ModalScreen>
|
|
);
|
|
function _fun102202() { // fn#102202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13629:611, offset: 0x020acfc4, size: 37 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__;
|
|
(ModalActionCreators).pop();
|
|
}
|
|
|
|
function _fun102203() { // fn#102203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13629:653, 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 FamilyCenterModalDecline({otherUser}) { // fn#102205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13629:1916, offset: 0x022325cc, size: 156 bytes, params: 2, frame: 18
|
|
const value2 = ReactModule.useMemo(function() {
|
|
return _fun102207(otherUser);
|
|
}, [otherUser]);
|
|
const Modal = (ModalNativeModule).Modal;
|
|
const intl = (IndexNativeModule).intl;
|
|
return (
|
|
<Modal
|
|
initialRouteName="DECLINE"
|
|
screens={value2}
|
|
headerBackTitle={intl.string((IndexNativeModule).t['13/7kX'])}
|
|
/>
|
|
);
|
|
function _fun102206() { // fn#102206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13629:1982, offset: 0x02232668, 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 = _fun102208;
|
|
object2.render = _fun102209;
|
|
return {DECLINE: object2};
|
|
})(otherUser);
|
|
function getScreens_102207(a0) { // fn#102207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13629:1986, offset: 0x02232681, 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_102209;
|
|
return {DECLINE: object2};
|
|
function getScreens_102207Render() { // fn#102209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13629:2122, owner: getScreens_102207.render, offset: 0x02231fa4, size: 35 bytes, params: 1, frame: 13
|
|
return <FamilyCenterModalDeclineScreen otherUser={env0_0} />;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function getScreens_102207HeaderTitle() { // fn#102208, owner: getScreens_102207.headerTitle, offset: 0x00c58c16, size: 4 bytes, params: 1, frame: 1
|
|
return null;
|
|
}
|
|
|
|
global.__d(_fun102200, 13439, [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 13439, 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] */;
|