97 lines
6.1 KiB
TypeScript
97 lines
6.1 KiB
TypeScript
/* Metro module 15451; source: modules/activities/native/VoiceControlsToggleNuxActionSheet.tsx; dependencies: [57, 31, 27, 4502, 1376, 33, 4501, 697, 8750, 566, 6275, 9543, 4573, 1244, 4578, 2] */
|
|
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
|
|
import Video from '../../../components_native/common/Video.tsx'; /* Metro dependency 9543 */
|
|
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 DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
|
|
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 BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
|
|
import * as UseIsScreenLandscapeNativeModule from '../../screen/useIsScreenLandscape.native.tsx'; /* Metro dependency 8750 */
|
|
|
|
function _fun118260(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15648:6, offset: 0x024d343e, size: 383 bytes, params: 8, frame: 21
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = JsxRuntimeModule;
|
|
const env0_8 = value.jsx;
|
|
const env0_9 = value.jsxs;
|
|
object = {videoURI: 'https://cdn.discordapp.com/assets/activities/platform/activities_pipfab_tutorial_redesign.mp4'};
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
const object2 = {};
|
|
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
|
object2.overflow = 'hidden';
|
|
const env0_11 = Reflect.apply(createStyles, value, [{videoContainer: object2,
|
|
bottomSheetWrapper: {paddingHorizontal: 24}, contentContainer: {'flex': 1, 'alignItems': 'center',
|
|
'paddingTop': 24, 'paddingBottom': 16}, title: {'marginTop': 16, 'textAlign': 'center'}, body: {'marginTop': 8,
|
|
'marginBottom': 24, 'textAlign': 'center'}}]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/activities/native/VoiceControlsToggleNuxActionSheet.tsx');
|
|
exports.default = VoiceControlsToggleActionSheet;
|
|
function VoiceControlsToggleActionSheet({markAsDismissed}) { // fn#118261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15648:724, offset: 0x024d35bd, size: 670 bytes, params: 2, frame: 29
|
|
const styles = useStyles();
|
|
const [property, env0_1] = Module00057(ReactModule.useState(0), 2);
|
|
const value4 = (UseIsScreenLandscapeNativeModule).useIsScreenLandscape();
|
|
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
|
function() {
|
|
return AccessibilityStore.useReducedMotion;
|
|
});
|
|
const r16 = value4 ? 2.0875 : 1.5;
|
|
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
|
|
const viewBindingProps = {style: styles.contentContainer, onLayout: onLayout_118264};
|
|
const items2 = [
|
|
((Component) => <Component style={styles.videoContainer} src={env0_10} poster="https://cdn.discordapp.com/assets/activities/platform/activities_pipfab_tutorial_redesign.png" width={property} height={property / r16} muted paused={useReducedMotion} />)(Video),
|
|
|
|
];
|
|
const Text = (TextModule).Text;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
items2[1] = (
|
|
<Text
|
|
style={styles.title}
|
|
accessibilityRole="header"
|
|
variant="heading-xl/extrabold"
|
|
color="mobile-text-heading-primary"
|
|
>
|
|
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pT6hue)}
|
|
</Text>
|
|
);
|
|
items2[2] = (
|
|
<Text style={styles.body} variant="text-sm/normal">
|
|
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tNm8AZ)}
|
|
</Text>
|
|
);
|
|
const Button = (ButtonNativeModule).Button;
|
|
items2[3] = (
|
|
<Button
|
|
onPress={function() {
|
|
return markAsDismissed(ContentDismissActionType.UNKNOWN);
|
|
}}
|
|
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['NX+WJN'])}
|
|
/>
|
|
);
|
|
return (
|
|
<BottomSheet startExpanded onDismiss={function() {
|
|
return markAsDismissed(ContentDismissActionType.UNKNOWN);
|
|
}}>
|
|
<View style={styles.bottomSheetWrapper}>
|
|
<View {...viewBindingProps}>
|
|
{items2}
|
|
</View>
|
|
</View>
|
|
</BottomSheet>
|
|
);
|
|
function VoiceControlsToggleActionSheetOnLayout({nativeEvent}) { // fn#118264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15648:1105, owner: VoiceControlsToggleActionSheet.onLayout, offset: 0x024d3878, size: 55 bytes, params: 2, frame: 12
|
|
const width = nativeEvent.layout.width;
|
|
env0_1(env0_2 ? width / 2 : width);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun118260, 15451, [57, 31, 27, 4502, 1376, 33, 4501, 697, 8750, 566, 6275, 9543, 4573, 1244, 4578,
|
|
2]) /* metro module 15451, dependencies: [57, 31, 27, 4502, 1376, 33, 4501, 697, 8750, 566, 6275, 9543, 4573, 1244, 4578, 2] */;
|