94 lines
3.9 KiB
TypeScript
94 lines
3.9 KiB
TypeScript
// Module ID: 16731
|
|
// Function ID: 16732
|
|
// Name: MainShared
|
|
// Dependencies: [19, 2045, 4859, 21, 504, 8848, 4692, 8963, 16732, 1364, 5277, 1115, 16734, 13926, 2, 16735, 16736, 16737, 16738, 16746, 16747, 16784]
|
|
// Exports: PictureInPictureGlobalContainer, useAppKeyCommands, useScreenReaderEnabled
|
|
|
|
// Module 16731 (MainShared)
|
|
import Fragment from "Fragment" /* 21 */;
|
|
import get_initialized from "get initialized" /* 504 */;
|
|
import intl2 from "intl" /* 1115 */;
|
|
import PlatformUtils from "PlatformUtils" /* 1364 */;
|
|
import NavigationRouteUtils from "NavigationRouteUtils" /* 4692 */;
|
|
import KeyCommands from "KeyCommands" /* 5277 */;
|
|
import usePipVideoOrStream from "usePipVideoOrStream" /* 8848 */;
|
|
import VoicePanelUtils from "VoicePanelUtils" /* 8963 */;
|
|
import AccessibilityManagerDefault from "AccessibilityManager" /* 13926 */;
|
|
import PictureInPictureGlobalDefault from "PictureInPictureGlobal" /* 16732 */;
|
|
import BurstReactionAnimationContainerDefault from "BurstReactionAnimationContainer" /* 16735 */;
|
|
import NativeMenuPresenterDefault from "NativeMenuPresenter" /* 16736 */;
|
|
import components_ActionSheetPresenterDefault from "components/ActionSheetPresenter" /* 16737 */;
|
|
import AlertsDefault from "Alerts" /* 16738 */;
|
|
import SoundPlayerDefault from "SoundPlayer" /* 16746 */;
|
|
import MainViewTooltipActionSheetsV2Default from "MainViewTooltipActionSheetsV2" /* 16747 */;
|
|
import ToastContainerDefault from "ToastContainer" /* 16784 */;
|
|
import react from "react" /* 19 */;
|
|
import ChannelStore from "ChannelStore" /* 2045 */;
|
|
import RTCConnectionStore from "RTCConnectionStore" /* 4859 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
const jsx = Fragment.jsx;
|
|
let result = size.fileFinishedImporting("components_native/MainShared.tsx");
|
|
|
|
export const BurstReactionAnimationContainer = BurstReactionAnimationContainerDefault;
|
|
export const MenuContainer = NativeMenuPresenterDefault;
|
|
export const ActionSheetContainer = components_ActionSheetPresenterDefault;
|
|
export const Alerts = AlertsDefault;
|
|
export const SoundPlayer = SoundPlayerDefault;
|
|
export const MainViewTooltipActionSheetsV2 = MainViewTooltipActionSheetsV2Default;
|
|
export const ToastContainer = ToastContainerDefault;
|
|
export const PictureInPictureGlobalContainer = function PictureInPictureGlobalContainer() {
|
|
let channel;
|
|
let channelId;
|
|
const items = [ChannelStore, RTCConnectionStore];
|
|
const obj = get_initialized;
|
|
const stateFromStores = obj.useStateFromStores(items, () => channel.getChannel(channelId.getChannelId()));
|
|
const obj2 = usePipVideoOrStream;
|
|
const hasPipParticipant = obj2.useHasPipParticipant({ isActivityViewFocused: false });
|
|
const obj3 = NavigationRouteUtils;
|
|
const isModalOpen = obj3.useIsModalOpen();
|
|
VoicePanelUtils;
|
|
let tmp7 = null;
|
|
if (null != stateFromStores) {
|
|
tmp7 = null;
|
|
if (hasPipParticipant) {
|
|
tmp7 = null;
|
|
if (!isModalOpen) {
|
|
tmp7 = null;
|
|
if (!tmp6) {
|
|
tmp7 = jsx(PictureInPictureGlobalDefault, { channel: stateFromStores });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return tmp7;
|
|
};
|
|
export const useAppKeyCommands = function useAppKeyCommands() {
|
|
const memo = react.useMemo(() => {
|
|
let intl;
|
|
const obj = PlatformUtils;
|
|
const isAndroidResult = obj.isAndroid();
|
|
const KeyModifierFlags = KeyCommands.KeyModifierFlags;
|
|
const obj2 = {
|
|
input: "k",
|
|
modifierFlags: isAndroidResult ? KeyModifierFlags.keyModifierControl : KeyModifierFlags.keyModifierCommand,
|
|
eventName: "keyCommandShowQuickSwitcher",
|
|
discoverabilityTitle: intl.string(intl2.t.yYsRlD),
|
|
onKeyCommand() {
|
|
closure_1_1(closure_1_2[12])();
|
|
return true;
|
|
}
|
|
};
|
|
intl = tmp(tmp2[11]).intl;
|
|
const items = [obj2];
|
|
return items;
|
|
}, []);
|
|
let obj = KeyCommands;
|
|
const keyCommands = obj.useKeyCommands(memo);
|
|
};
|
|
export const useScreenReaderEnabled = function useScreenReaderEnabled() {
|
|
const effect = react.useEffect(() => {
|
|
const obj = AccessibilityManagerDefault;
|
|
const result = obj.checkScreenreaderEnabled();
|
|
}, []);
|
|
};
|