<script setup lang="ts">
/**
 * NexusLayout — V2 Dashboard Shell
 * Flex row, 100vh, overflow hidden.
 * Sidebar (248px) + Main (flex:1, flex-column)
 */
import { RouterView } from 'vue-router'
import { useAgentStore } from '../stores/agents'
import GalaxyBackground from '../components/background/GalaxyBackground.vue'
import Sidebar from '../components/layout/Sidebar.vue'
import Topbar from '../components/layout/Topbar.vue'

const agentStore = useAgentStore()
</script>

<template>
  <div class="nexus-layout">
    <GalaxyBackground />
    <Sidebar />
    <main class="nexus-main">
      <Topbar :connected="agentStore.isConnected" />
      <div class="nexus-content">
        <RouterView />
      </div>
    </main>
  </div>
</template>

<style scoped>
.nexus-layout {
  display: flex;
  flex-direction: row;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

.nexus-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.nexus-content {
  flex: 1;
  overflow: hidden;
  min-height: 0;
}
</style>
