import { PropsWithChildren } from 'react' import { useMediaQuery } from '@janhq/joi' import { useAtomValue } from 'jotai' import { twMerge } from 'tailwind-merge' import { MainViewState } from '@/constants/screens' import { leftPanelWidthAtom } from '../LeftPanelContainer' import { rightPanelWidthAtom } from '../RightPanelContainer' import { mainViewStateAtom, showLeftPanelAtom, showRightPanelAtom, } from '@/helpers/atoms/App.atom' import { reduceTransparentAtom } from '@/helpers/atoms/Setting.atom' type Props = { isShowStarterScreen?: boolean } & PropsWithChildren const CenterPanelContainer = ({ children, isShowStarterScreen }: Props) => { const reduceTransparent = useAtomValue(reduceTransparentAtom) const matches = useMediaQuery('(max-width: 880px)') const showLeftPanel = useAtomValue(showLeftPanelAtom) const showRightPanel = useAtomValue(showRightPanelAtom) const mainViewState = useAtomValue(mainViewStateAtom) const rightPanelWidth = useAtomValue(rightPanelWidthAtom) const leftPanelWidth = useAtomValue(leftPanelWidthAtom) return (