<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="chat-picture"
      :chat-name="chat-name"
      :header-chat="header-chat"
    />
    <ChatList @change-header="changeHeader" />
  </main>
</template>

<script>
export default {
  chatPicture: { type: String, default: "" },
  chatName: { type: String, default: "" },
  headerChat: { type: Boolean, default: false },
  methods: {
    changeHeader(e) {
      this.chatPicture = e[1];
      this.chatName = e[2];
      this.headerChat = true;
    },
  },
};
</script>
