Files
2026-07-28 01:06:53 +03:00

40 lines
2.9 KiB
TypeScript

/* Metro module 11336; source: modules/screen/native/drawer/useDrawerWidth.tsx; dependencies: [661, 4012, 4010, 2] */
import UseChatLayout from '../../../chat/native/useChatLayout.tsx'; /* Metro dependency 4010 */
import UseBaseAppContainerDimensions from '../useBaseAppContainerDimensions.tsx'; /* Metro dependency 4012 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as UseChatLayoutModule from '../../../chat/native/useChatLayout.tsx'; /* Metro dependency 4010 */
import * as UseBaseAppContainerDimensionsModule from '../useBaseAppContainerDimensions.tsx'; /* Metro dependency 4012 */
function _fun86565(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11522:6, offset: 0x01f97e0d, size: 178 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const DM_WIDTH = (ConstantsModule).DM_WIDTH;
const value = 260 + DM_WIDTH;
const env0_4 = 300 + DM_WIDTH;
(FileImportTrackerModule).fileFinishedImporting('modules/screen/native/drawer/useDrawerWidth.tsx');
exports.DRAWER_LEFT_WIDTH_MIN = value;
exports.getDrawerWidth = getDrawerWidth;
exports.useDrawerWidth = useDrawerWidth;
function computeTabletDrawerWidth(a0, a1) { // fn#86566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11522:131, offset: 0x01f97ebf, size: 50 bytes, params: 3, frame: 15
return a1 ? env0_3 : global.Math.min(env0_4, a0 - 32);
}
function getDrawerWidth() { // fn#86567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11522:322, offset: 0x01f97ef1, size: 92 bytes, params: 1, frame: 15
const getBaseAppContainerDimensions = UseBaseAppContainerDimensionsModule.getBaseAppContainerDimensions;
const width = Reflect.apply(getBaseAppContainerDimensions, UseBaseAppContainerDimensionsModule, []).width;
const chatLayout = (UseChatLayoutModule).getChatLayout();
return chatLayout.isChatBesideChannelList ? computeTabletDrawerWidth(width, chatLayout.isChatLockedOpen) : width;
}
function useDrawerWidth() { // fn#86568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11522:534, offset: 0x01f97f4d, size: 80 bytes, params: 1, frame: 15
const width = (UseBaseAppContainerDimensions)().width;
const value2 = (UseChatLayout)();
return value2.isChatBesideChannelList ? computeTabletDrawerWidth(width, value2.isChatLockedOpen) : width;
}
}
global.__d(_fun86565, 11336, [661, 4012, 4010, 2]) /* metro module 11336, dependencies: [661, 4012, 4010, 2] */;