<template>
  <v-card
    class="d-flex flex-column"
    color="background"
    flat
    tile
  >
    <DrawerTitle :title="t('labels.mcadTools')" />
    <v-card-text class="d-flex flex-column flex-shrink-0 px-2 pb-1">
      <McadAddObjectBtn />
    </v-card-text>
    <div class="d-flex py-1">
      <McadToggleSortBtn />
      <v-spacer />
      <McadToggleVisibilityBtn />
    </div>
    <v-card-text class="flex-grow-1 px-2 pb-4 pt-0">
      <McadDataTable :items="items" />
    </v-card-text>
  </v-card>
</template>

<script setup lang="ts">
import { useI18n } from 'vue-i18n';
import { DataOverlayMcad } from '@3cr/viewer-types-ts';

interface Props {
  items: DataOverlayMcad[];
}

withDefaults(defineProps<Props>(), {
  items: () => [],
});

const { t } = useI18n();
</script>
