<script setup lang="ts">
import ButtonBar from '@/components/common/ButtonBar.vue'

defineProps<{ title: string }>()
</script>
<template>
  <div class="app-module">
    <div>
      <h2 class="app-module-header">{{ title }}</h2>
      <slot></slot>
    </div>
    <ButtonBar>
      <slot name="actions"></slot>
    </ButtonBar>
  </div>
</template>
<style lang="css">
.app-module {
  min-width: 300px;
  min-height: 200px;
  flex-grow: 1;
  background-color: var(--bg-lighter);
  border-radius: 0.5rem;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.app-module-header {
  margin: 0;
}
</style>
