<script setup>
//TODO: Fixare passaggio promps a header
import ChatList from "@/components/ChatList.vue";
import Header from "@/components/Header.vue";
</script>

<template>
  <main>
    <Header
      :chat-picture="chatPicture"
      :chat-name="chatName"
      :header-chat="headerChat"
    />
    <ChatList @change-header="changeHeader" />
  </main>
</template>

<script>
export default {
  data() {
    return {
      chatPicture: "",
      chatName: "",
      headerChat: false,
    };
  },
  methods: {
    changeHeader(e) {
      this.chatPicture = e[0];
      this.chatName = e[1];
      this.headerChat = true;
      console.table("header", e);
    },
  },
};
</script>
