decord/alpha/source/modules/chat/native/useChatWidth.tsx
github-actions 45f5884862 chore: update source for alpha 348.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5012.js (118.4 MB)
2026-09-23 06:49:31 +00:00

53 lines
1.6 KiB
TypeScript

// Module ID: 11858
// Function ID: 11859
// Name: useChatWidth
// Dependencies: [19, 4687, 4689, 11859, 11860, 2]
// Exports: default, getChatWidth
// Module 11858 (useChatWidth)
import useChatLayout from "useChatLayout" /* 4687 */;
import useBaseAppContainerDimensions from "useBaseAppContainerDimensions" /* 4689 */;
import useDrawerWidth from "useDrawerWidth" /* 11859 */;
import ChatViewWidthContextDefault from "ChatViewWidthContext" /* 11860 */;
import noop from "module_19" /* 19 */;
const useChatLayoutDefault = useChatLayout;
const useBaseAppContainerDimensionsDefault = useBaseAppContainerDimensions;
require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/chat/native/useChatWidth.tsx");
export default function useChatWidth(arg0) {
let context = noop.useContext(ChatViewWidthContextDefault);
const width = useBaseAppContainerDimensionsDefault().width;
useDrawerWidth;
if (null == context) {
if (null == arg0) {
let diff = width;
if (useChatLayoutDefault().isChatLockedOpen) {
diff = width - tmp3;
}
let tmp5 = diff;
} else {
tmp5 = width;
}
context = tmp5;
}
return context;
};
export const getChatWidth = function getChatWidth(arg0) {
const obj = useChatLayout;
const width = useBaseAppContainerDimensions.getBaseAppContainerDimensions().width;
if (null == arg0) {
let diff = width;
if (obj.getChatLayout().isChatLockedOpen) {
diff = width - useDrawerWidth.getDrawerWidth();
const tmpResult = useDrawerWidth;
}
let tmp3 = diff;
} else {
tmp3 = width;
}
return tmp3;
};