<script setup lang="ts">
  import PrintPreviewHeader from './PrintPreviewHeader.vue'
  import PrintPreviewRecipientDetails from './PrintPreviewRecipientDetails.vue'
  import PrintPreviewItemsList from './PrintPreviewItemsList.vue'
  import PrintPreviewFooter from './PrintPreviewFooter.vue'

  const props = defineProps(["invoice", "total"])
</script>

<template>
  <div class="print-preview">
    <PrintPreviewHeader 
      :invoice="props.invoice" />
    <PrintPreviewRecipientDetails 
      :invoice="props.invoice"/>
    <PrintPreviewItemsList 
      :items="props.invoice.Items"/>
    <PrintPreviewFooter 
      :total="props.total"/>
  </div>
</template>

<style>
.print-preview * {
  font-size: 9pt;
}
.print-preview p {
  margin: 0;
}
.print-preview {
  display: grid;
  grid-template-rows: 1fr 1.5fr auto 1.5fr;
  row-gap: 1em;
}
</style>
