97 lines
6.4 KiB
TypeScript
97 lines
6.4 KiB
TypeScript
/* Metro module 9726; source: modules/app_dms/native/AppDMOptionsBottomSheet.tsx; dependencies: [31, 27, 5109, 661, 33, 4501, 697, 566, 8743, 4080, 7007, 6779, 6275, 6231, 6238, 1244, 2] */
|
|
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
|
|
import AuthorizedAppsStore from '../../../stores/AuthorizedAppsStore.tsx'; /* Metro dependency 5109 */
|
|
import AuthorizedAppsActionCreators from '../../../actions/AuthorizedAppsActionCreators.tsx'; /* Metro dependency 6779 */
|
|
import ShowUserProfileActionSheet from '../../user_profile/native/showUserProfileActionSheet.tsx'; /* Metro dependency 8743 */
|
|
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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as TableRowGroupNativeModule from '../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
|
|
import * as TableRowNativeModule from '../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
|
|
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
|
|
|
|
function _fun76418(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9912:6, offset: 0x01dceabe, size: 290 bytes, params: 8, frame: 21
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = JsxRuntimeModule;
|
|
const env0_7 = value.jsx;
|
|
const env0_8 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
const BACKGROUND_BASE_LOWEST = (Native).colors.BACKGROUND_BASE_LOWEST;
|
|
const env0_9 = Reflect.apply(createStyles, value, [{sheet: {backgroundColor: BACKGROUND_BASE_LOWEST},
|
|
content: {'paddingLeft': 16, 'paddingRight': 16, 'paddingBottom': 24}}]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/app_dms/native/AppDMOptionsBottomSheet.tsx');
|
|
exports.default = AppDMOptionsBottomSheet;
|
|
function AppDMOptionsBottomSheet({userId, channel, application}) { // fn#76419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9912:430, offset: 0x01dcebe0, size: 490 bytes, params: 2, frame: 30
|
|
const styles = useStyles();
|
|
const newestTokenForApplication = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthorizedAppsStore],
|
|
function() {
|
|
return AuthorizedAppsStore.getNewestTokenForApplication(application?.id);
|
|
});
|
|
const binding = newestTokenForApplication;
|
|
const value2 = binding.useCallback(_fun76421, [channel.id, userId]);
|
|
const value3 = binding.useCallback(_fun76422, [application, newestTokenForApplication]);
|
|
binding.useEffect(_fun76423, []);
|
|
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
|
|
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
|
|
const TableRow = (TableRowNativeModule).TableRow;
|
|
const intl = (IndexNativeModule).intl;
|
|
let string = intl.string;
|
|
const tableRow = (
|
|
<TableRow
|
|
label={Reflect.apply(string, intl, [(IndexNativeModule).t.iXAna6])}
|
|
onPress={value2}
|
|
/>
|
|
);
|
|
string = intl.string;
|
|
const KUsDNI = (IndexNativeModule).t.KUsDNI;
|
|
return (
|
|
<BottomSheet startExpanded backgroundStyles={styles.sheet}>
|
|
<View style={styles.content}>
|
|
<TableRowGroup hasIcons={false}>
|
|
{tableRow}
|
|
<TableRow
|
|
label={Reflect.apply(string, intl, [KUsDNI])}
|
|
onPress={value3}
|
|
disabled={newestTokenForApplication == null}
|
|
/>
|
|
</TableRowGroup>
|
|
</View>
|
|
</BottomSheet>
|
|
);
|
|
function _fun76421() { // fn#76421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9912:618, offset: 0x01dcedf9, size: 80 bytes, params: 1, frame: 15
|
|
const value = environment.__proto__;
|
|
(ShowUserProfileActionSheet)({userId: userId,
|
|
channelId: channel.id});
|
|
(ActionSheetActionCreators).hideActionSheet();
|
|
}
|
|
|
|
function _fun76422() { // fn#76422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9912:713, offset: 0x01dcee49, size: 126 bytes, params: 1, frame: 16
|
|
var value4;
|
|
if (application != null && newestTokenForApplication != null) {
|
|
value4 = environment.__proto__;
|
|
(require(7007) /* metro dependency 7007: openUserSettings */).openUserSettings({screen: UserSettingsSections.AUTHORIZED_APP,
|
|
|
|
params: {oauth2Token: newestTokenForApplication}});
|
|
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
|
}
|
|
}
|
|
|
|
function _fun76423() { // fn#76423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9912:869, offset: 0x01dceec7, size: 37 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__;
|
|
(AuthorizedAppsActionCreators).fetch();
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun76418, 9726, [31, 27, 5109, 661, 33, 4501, 697, 566, 8743, 4080, 7007, 6779, 6275, 6231, 6238, 1244,
|
|
2]) /* metro module 9726, dependencies: [31, 27, 5109, 661, 33, 4501, 697, 566, 8743, 4080, 7007, 6779, 6275, 6231, 6238, 1244, 2] */;
|