'use client';

import Side from './Side';
import { useChatStore } from '../../store';
import { memo } from 'react';
import { Drawer } from '@/components';
import ChatHistory from './ChatHisory';

const Left = memo(() => {
  const historyListOpen = useChatStore((state) => state.historyListOpen);

  return (
    <div className="relative flex h-full w-112">
      {/* 左侧路由Bar */}
      <Side />
      {/* 聊天历史 */}
      <Drawer position="left" width={448} open={historyListOpen} destroyOnClose>
        <ChatHistory />
      </Drawer>
    </div>
  );
});
export default Left;
