22 lines
1.1 KiB
TypeScript
22 lines
1.1 KiB
TypeScript
// Metro module 10889 (f10890).
|
|
import { useContext } from "react";
|
|
import useChatLayout, { getChatLayout } from "./useChatLayout";
|
|
import useBaseAppContainerDimensions, { getBaseAppContainerDimensions } from "../../screen/native/useBaseAppContainerDimensions";
|
|
import { useDrawerWidth, getDrawerWidth } from "../../screen/native/drawer/useDrawerWidth";
|
|
import ChatViewWidthContext from "./ChatViewWidthContext";
|
|
export default function useChatWidth(a0) {
|
|
let r9 = useContext(ChatViewWidthContext);
|
|
const isChatLockedOpen = useChatLayout().isChatLockedOpen;
|
|
const width = useBaseAppContainerDimensions().width;
|
|
const drawerWidth = useDrawerWidth();
|
|
if (r9 == null) {
|
|
r9 = a0 != null ? a0 === 0 ? isChatLockedOpen ? width - drawerWidth : width : width : isChatLockedOpen ? width - drawerWidth : width;
|
|
}
|
|
return r9;
|
|
};
|
|
export function getChatWidth(a0) {
|
|
const isChatLockedOpen = getChatLayout().isChatLockedOpen;
|
|
const width = getBaseAppContainerDimensions().width;
|
|
return a0 != null ? a0 === 0 ? isChatLockedOpen ? width - getDrawerWidth() : width : width : isChatLockedOpen ? width - getDrawerWidth() : width;
|
|
}
|