decord/source/modules/chat/native/useChatWidth.tsx
2026-09-03 10:05:34 +00:00

52 lines
1.5 KiB
TypeScript

// Module ID: 11351
// Function ID: 11352
// Name: useChatWidth
// Dependencies: [19, 4335, 4337, 11352, 11353, 2]
// Exports: default, getChatWidth
// Module 11351 (useChatWidth)
import useChatLayout from "useChatLayout" /* 4335 */;
import useChatLayoutDefault from "useChatLayout" /* 4335 */;
import useBaseAppContainerDimensions from "useBaseAppContainerDimensions" /* 4337 */;
import useBaseAppContainerDimensionsDefault from "useBaseAppContainerDimensions" /* 4337 */;
import sum from "sum" /* 11352 */;
import contextDefault from "context" /* 11353 */;
import closure_3 from "noop" /* 19 */;
require = arg1;
const result = require("set").fileFinishedImporting("modules/chat/native/useChatWidth.tsx");
export default function useChatWidth(arg0) {
let context = React.useContext(contextDefault);
const width = useBaseAppContainerDimensionsDefault().width;
sum;
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 tmp = require;
const width = useBaseAppContainerDimensions.getBaseAppContainerDimensions().width;
if (null == arg0) {
let diff = width;
if (obj.getChatLayout().isChatLockedOpen) {
diff = width - sum.getDrawerWidth();
const tmpResult = sum;
}
let tmp3 = diff;
} else {
tmp3 = width;
}
return tmp3;
};