<template>
  <div class="chat-box">
    <div class="top-chat-list">
      <top-chat-list></top-chat-list>
    </div>
    <div class="chat-list">
      <chat-list></chat-list>
    </div>
    <div class="chat-send">
      <send-box></send-box>
    </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex';
import topChatList from './chatList/topChatList';
import chatList from './chatList/chatList';
import sendBox from '../sendBox';

export default {
  name: 'pc-chat-box',
  components: {
    topChatList,
    chatList,
    sendBox
  },
  data() {
    return {};
  },
  computed: {
    ...mapGetters({
      userInfo: 'userInfo',
      channelInfo: 'channelInfo'
    })
  }
};
</script>

<style lang="less" scoped>
.chat-box {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  .top-chat-list {
    flex: 0 0 auto;
  }
  .chat-list {
    flex: 1;
    height: 100%;
    width: 100%;
    overflow-y: auto;
  }
  .chat-send {
    flex: 0 0 auto;
    padding: 10px;
    height: 140px;
  }
}
</style>
