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

.app-module-header {
  margin: 0;
}

.app-module-actions {
  text-align: right;
}
</style>
