decord/beta/source/modules/chat/native/useChatWidth.tsx
github-actions 30c0bb2ec3 chore: update source for beta 347.10
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4975.js (118.4 MB)
2026-09-24 16:03:38 +00:00

71 lines
2.1 KiB
TypeScript

// Module ID: 11683
// Function ID: 11684
// Name: useChatWidth
// Dependencies: [19, 4651, 4653, 11684, 558, 11685, 2]
// Exports: getChatWidth
// Module 11683 (useChatWidth)
import useChatLayout from "useChatLayout" /* 4651 */;
import useBaseAppContainerDimensions from "useBaseAppContainerDimensions" /* 4653 */;
import useDrawerWidth from "useDrawerWidth" /* 11684 */;
import ChatViewWidthContextDefault from "ChatViewWidthContext" /* 11685 */;
import noop from "module_19" /* 19 */;
const useChatLayoutDefault = useChatLayout;
const useBaseAppContainerDimensionsDefault = useBaseAppContainerDimensions;
require = fn;
const ReactCompilerGating = fn(558);
const size = fn(2);
const result = size.fileFinishedImporting("modules/chat/native/useChatWidth.tsx");
export default ReactCompilerGating.isReactCompilerEnabled() ? ((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;
}) : ((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;
};