decord/source/modules/chat/native/useChatWidth.tsx

53 lines
1.5 KiB
TypeScript
Raw Normal View History

2026-09-03 10:05:34 +00:00
// Module ID: 11351
// Function ID: 11352
2026-07-20 16:05:17 +00:00
// Name: useChatWidth
2026-09-03 10:05:34 +00:00
// Dependencies: [19, 4335, 4337, 11352, 11353, 2]
2026-07-20 16:05:17 +00:00
// Exports: default, getChatWidth
2026-09-03 10:05:34 +00:00
// Module 11351 (useChatWidth)
2026-09-01 10:26:29 +00:00
import useChatLayout from "useChatLayout" /* 4335 */;
import useChatLayoutDefault from "useChatLayout" /* 4335 */;
import useBaseAppContainerDimensions from "useBaseAppContainerDimensions" /* 4337 */;
import useBaseAppContainerDimensionsDefault from "useBaseAppContainerDimensions" /* 4337 */;
2026-09-03 10:05:34 +00:00
import sum from "sum" /* 11352 */;
import contextDefault from "context" /* 11353 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "noop" /* 19 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
const result = require("set").fileFinishedImporting("modules/chat/native/useChatWidth.tsx");
2026-07-20 16:05:17 +00:00
export default function useChatWidth(arg0) {
2026-08-24 06:08:38 +00:00
let context = React.useContext(contextDefault);
const width = useBaseAppContainerDimensionsDefault().width;
sum;
2026-07-20 16:05:17 +00:00
if (null == context) {
if (null == arg0) {
let diff = width;
2026-08-24 06:08:38 +00:00
if (useChatLayoutDefault().isChatLockedOpen) {
2026-07-20 16:05:17 +00:00
diff = width - tmp3;
}
2026-07-29 08:29:29 +00:00
let tmp5 = diff;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp5 = width;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
context = tmp5;
2026-07-20 16:05:17 +00:00
}
return context;
};
export const getChatWidth = function getChatWidth(arg0) {
2026-08-24 06:08:38 +00:00
const obj = useChatLayout;
2026-07-29 08:29:29 +00:00
const tmp = require;
2026-08-24 06:08:38 +00:00
const width = useBaseAppContainerDimensions.getBaseAppContainerDimensions().width;
2026-07-20 16:05:17 +00:00
if (null == arg0) {
let diff = width;
if (obj.getChatLayout().isChatLockedOpen) {
2026-08-24 06:08:38 +00:00
diff = width - sum.getDrawerWidth();
const tmpResult = sum;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp3 = diff;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp3 = width;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp3;
2026-07-20 16:05:17 +00:00
};