<script setup lang="ts">
import DirectoryListContextMenu from '~/components/DirectoryListContextMenu.vue';
import RenameEntryDialog from '~/components/actions/RenameEntryDialog.vue';
import { getWarrenDirectory } from '~/lib/api/warrens';

const entries = useAsyncData('current-directory', () =>
    getWarrenDirectory(useWarrenRoute().value)
).data;
</script>

<template>
    <div>
        <DirectoryListContextMenu class="w-full grow">
            <DirectoryList v-if="entries != null" :entries="entries" />
        </DirectoryListContextMenu>
        <RenameEntryDialog />
    </div>
</template>
