<script setup lang="ts">
import { computed } from 'vue'

import ExplorerItem from './ExplorerItem.vue'
import { useUiStore } from '@/stores/uiStore'

const uiStore = useUiStore()
const parentNode = computed(() => uiStore.filteredTree)
</script>

<template>
  <div v-if="parentNode" class="relative w-full max-w-full py-2">
    <ExplorerItem
      :key="parentNode.id"
      :item="parentNode"
      :isLastChild="parentNode.children.length != 0"
      :hereditaryOffset="[]"
    />
  </div>
</template>
