<template>
  <div class="tableTitle">
    <div class="tableTitleBox">
      <span class="tableFloatLine"></span>
      <div>{{name}}</div>
    </div>
    <img src="@/assets/chat/addUser.png" @click="handleAddUser">
  </div>
</template>

<script>
export default {
  props: {
    name: {
      type: String,
      required: true,
    },
  },
  data() {
    return {
      someData: '',
    };
  },
  methods: {
    handleAddUser() {
      this.$emit('addUser'); // Emit an event to notify the parent
    }
  }
};
</script>

<style scoped lang="less">
  .tableTitle {
    color:#333333;
    position: relative;
    padding-bottom: 20px;
    padding-top: 37px;
    padding-right: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    img {
      cursor: pointer;
    }
    .tableFloatLine {
      width: 3px;
      height:16px;
      background:#5570F1;
      display: inline-block;
    }
    .tableTitleBox {
      display: flex;
      align-items: center;
      font-size: 18px;
      font-weight: bold;
      span {
        margin-right: 25px;
      }
    }
  }
</style>
