<script setup lang="ts">
import { useSessionStore } from '~/stores/session.store'

const sessions = useSessionStore()
</script>

<template>
  <div class="flex h-8 bg-gray-950 border-b border-gray-800 overflow-x-auto shrink-0">
    <SessionTab
      v-for="session in sessions.sessions"
      :key="session.id"
      :session="session"
      :is-active="session.id === sessions.activeSessionId"
      @activate="sessions.setActive(session.id)"
      @close="sessions.removeSession(session.id)"
    />
  </div>
</template>
