224 lines
14 KiB
TypeScript
224 lines
14 KiB
TypeScript
/* Metro module 13434; source: modules/parent_tools/native/FamilyCenterModalDisconnect.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 5080, 8171, 3856, 1244, 12624, 12627, 2224, 6258, 6259, 13435, 8160, 4573, 13405, 6238, 1305, 10120, 6261, 4578, 5282, 10121, 2] */
|
|
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
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 NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
|
|
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 TableRowNativeModule from '../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
|
|
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 */
|
|
import * as UseAgeSpecificTextModule from '../hooks/useAgeSpecificText.tsx'; /* Metro dependency 12627 */
|
|
|
|
function _fun102167(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13624:6, offset: 0x0223048a, size: 434 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = JsxRuntimeModule;
|
|
const env0_6 = value.jsx;
|
|
const env0_7 = 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_8 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/native/FamilyCenterModalDisconnect.tsx');
|
|
exports.default = FamilyCenterModalDisconnect;
|
|
function FamilyCenterModalDisconnectScreen({otherUser}) { // fn#102168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13624:527, offset: 0x0223063c, size: 1399 bytes, params: 2, frame: 44
|
|
const styles = useStyles();
|
|
const value2 = ReactModule.useCallback(_fun102169, []);
|
|
const value3 = (UseIsInAdultAgeGroup)();
|
|
const [property, env0_1] = Module00057(ReactModule.useState(false), 2);
|
|
const {disconnectLinkRequest,
|
|
isDisconnectLoading} = (UseFamilyCenterActionsModule).useFamilyCenterActions({onSuccess: value2,
|
|
onError: ReactModule.useCallback(_fun102170, [])});
|
|
let useAgeSpecificText = UseAgeSpecificTextModule.useAgeSpecificText;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let string = intl.string;
|
|
const VJaHUb = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).VJaHUb;
|
|
const value9 = Reflect.apply(useAgeSpecificText, UseAgeSpecificTextModule, [Reflect.apply(string, intl, [VJaHUb]),
|
|
intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['/MYCee'])]);
|
|
useAgeSpecificText = UseAgeSpecificTextModule.useAgeSpecificText;
|
|
const value10 = intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).f1SUeW);
|
|
string = intl.string;
|
|
const EvMGLT = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).EvMGLT;
|
|
const value11 = Reflect.apply(useAgeSpecificText, UseAgeSpecificTextModule, [value10, Reflect.apply(string, intl, [EvMGLT])]);
|
|
const value12 = ReactModule.useCallback(function() {
|
|
disconnectLinkRequest(otherUser.id);
|
|
}, [disconnectLinkRequest, otherUser.id]);
|
|
const ModalScreen = (ModalScreenNativeModule).ModalScreen;
|
|
const ModalContent = (ModalContentNativeModule).ModalContent;
|
|
const items3 = [
|
|
((Component) => <Component otherUser={otherUser} iconSrc={Module08160} />)(FamilyCenterAvatarPair),
|
|
|
|
];
|
|
const Text = (TextModule).Text;
|
|
const format = intl.format;
|
|
const property2 = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['NMSTb/'];
|
|
const object2 = {};
|
|
const String = global.String;
|
|
object2.isAdult = String(value3);
|
|
items3[1] = (
|
|
<Text style={styles.headerText} variant="text-lg/bold">
|
|
{Reflect.apply(format, intl, [property2, object2])}
|
|
</Text>
|
|
);
|
|
items3[2] = ((Component) => <Component user={otherUser} />)(importDefault(13405) /* metro dependency 13405: FamilyCenterUsernameHeader */);
|
|
const items2 = [
|
|
<View style={styles.header}>
|
|
{items3}
|
|
</View>,
|
|
];
|
|
string = intl.string;
|
|
const VKblNt = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).VKblNt;
|
|
items2[1] = (
|
|
<View style={styles.body}>
|
|
<Text
|
|
style={styles.noticeHeader}
|
|
variant="eyebrow"
|
|
color="mobile-text-heading-primary"
|
|
>
|
|
{Reflect.apply(string, intl, [VKblNt])}
|
|
</Text>
|
|
<Text variant="text-sm/normal" color="text-default">
|
|
{value11}
|
|
</Text>
|
|
</View>
|
|
);
|
|
const TableRow = (TableRowNativeModule).TableRow;
|
|
const tableRowProps = {disabled: isDisconnectLoading, onPress: onPress_102172,
|
|
label: <Text variant="text-xs/semibold">{value9}</Text>};
|
|
const Checkbox = (NativeModule).Checkbox;
|
|
tableRowProps.icon = <Checkbox selected={property} />;
|
|
items2[2] = <TableRow {...tableRowProps} />;
|
|
const modalContent = (
|
|
<ModalContent>
|
|
{items2}
|
|
</ModalContent>
|
|
);
|
|
const ModalFooter = (ModalFooterNativeModule).ModalFooter;
|
|
const ButtonGroup = (ButtonGroupNativeModule).ButtonGroup;
|
|
const Button = (ButtonNativeModule).Button;
|
|
return (
|
|
<ModalScreen>
|
|
{modalContent}
|
|
<ModalFooter>
|
|
<ButtonGroup>
|
|
<Button
|
|
variant="destructive"
|
|
disabled={property ? isDisconnectLoading : !property}
|
|
loading={isDisconnectLoading}
|
|
text={intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['c5L+sl'])}
|
|
onPress={value12}
|
|
/>
|
|
<Button
|
|
variant="tertiary"
|
|
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])}
|
|
onPress={(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop}
|
|
/>
|
|
</ButtonGroup>
|
|
</ModalFooter>
|
|
</ModalScreen>
|
|
);
|
|
function _fun102169() { // fn#102169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13624:612, offset: 0x020acfc4, size: 37 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__;
|
|
(ModalActionCreators).pop();
|
|
}
|
|
|
|
function _fun102170() { // fn#102170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13624:706, offset: 0x02230bb3, size: 99 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])]);
|
|
env0_1(false);
|
|
}
|
|
|
|
function FamilyCenterModalDisconnectScreenOnPress() { // fn#102172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13624:1743, owner: FamilyCenterModalDisconnectScreen.onPress, offset: 0x02230c2f, size: 25 bytes, params: 1, frame: 11
|
|
env0_1(function(a0) {
|
|
return !a0;
|
|
});
|
|
}
|
|
|
|
}
|
|
|
|
function FamilyCenterModalDisconnect({otherUser}) { // fn#102174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13624:2275, offset: 0x02230c48, size: 156 bytes, params: 2, frame: 18
|
|
const value2 = ReactModule.useMemo(function() {
|
|
return _fun102176(otherUser);
|
|
}, [otherUser]);
|
|
const Modal = (ModalNativeModule).Modal;
|
|
const intl = (IndexNativeModule).intl;
|
|
return (
|
|
<Modal
|
|
initialRouteName="DISCONNECT"
|
|
screens={value2}
|
|
headerBackTitle={intl.string((IndexNativeModule).t['13/7kX'])}
|
|
/>
|
|
);
|
|
function _fun102175() { // fn#102175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13624:2344, offset: 0x02230ce4, 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 = _fun102177;
|
|
object2.render = _fun102178;
|
|
return {DISCONNECT: object2};
|
|
})(otherUser);
|
|
function getScreens_102176(a0) { // fn#102176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13624:2348, offset: 0x02230cfd, 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_102178;
|
|
return {DISCONNECT: object2};
|
|
function getScreens_102176Render() { // fn#102178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13624:2487, owner: getScreens_102176.render, offset: 0x02230d6f, size: 35 bytes, params: 1, frame: 13
|
|
return <FamilyCenterModalDisconnectScreen otherUser={env0_0} />;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function getScreens_102176HeaderTitle() { // fn#102177, owner: getScreens_102176.headerTitle, offset: 0x00c58c16, size: 4 bytes, params: 1, frame: 1
|
|
return null;
|
|
}
|
|
|
|
global.__d(_fun102167, 13434, [57, 31, 27, 33, 4501, 697, 5080, 8171, 3856, 1244, 12624, 12627, 2224, 6258, 6259,
|
|
13435, 8160, 4573, 13405, 6238, 1305, 10120, 6261, 4578, 5282, 10121,
|
|
2]) /* metro module 13434, dependencies: [57, 31, 27, 33, 4501, 697, 5080, 8171, 3856, 1244, 12624, 12627, 2224, 6258, 6259, 13435, 8160, 4573, 13405, 6238, 1305, 10120, 6261, 4578, 5282, 10121, 2] */;
|