<template>
  <component :is="as" class="page-shell">
    <PageHeader v-if="title" :title="title" :subtitle="subtitle" />
    <slot />
  </component>
</template>

<script setup>
defineProps({
  title: { type: String, default: '' },
  subtitle: { type: String, default: '' },
  as: { type: String, default: 'div' },
})
</script>

<style scoped>
.page-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}
</style>
