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

47 lines
1.3 KiB
TypeScript
Raw Normal View History

2026-08-06 08:05:19 +00:00
// Module ID: 10914
// Function ID: 10915
2026-07-20 16:05:17 +00:00
// Name: useChatWidth
2026-08-06 08:05:19 +00:00
// Dependencies: [19, 4138, 4140, 10915, 10916, 2]
2026-07-20 16:05:17 +00:00
// Exports: default, getChatWidth
2026-08-06 08:05:19 +00:00
// Module 10914 (useChatWidth)
2026-07-29 08:29:29 +00:00
import noop from "noop";
2026-07-23 10:11:24 +00:00
const require = arg1;
const result = require("useBaseAppContainerDimensions").fileFinishedImporting("modules/chat/native/useChatWidth.tsx");
2026-07-20 16:05:17 +00:00
export default function useChatWidth(arg0) {
2026-08-06 08:05:19 +00:00
let context = React.useContext(importDefault(10916));
const width = importDefault(4140)().width;
require(10915) /* sum */;
2026-07-20 16:05:17 +00:00
if (null == context) {
if (null == arg0) {
let diff = width;
2026-08-06 08:05:19 +00:00
if (importDefault(4138)().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-06 08:05:19 +00:00
const obj = require(4138) /* useChatLayout */;
2026-07-29 08:29:29 +00:00
const tmp = require;
2026-08-06 08:05:19 +00:00
const width = require(4140) /* useBaseAppContainerDimensions */.getBaseAppContainerDimensions().width;
2026-07-20 16:05:17 +00:00
if (null == arg0) {
let diff = width;
if (obj.getChatLayout().isChatLockedOpen) {
2026-08-06 08:05:19 +00:00
diff = width - tmp(10915).getDrawerWidth();
const tmpResult = tmp(10915);
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
};