<script setup lang="ts">
import { defineProps } from 'vue'
const props = defineProps(["invoice"])
</script>

<template>
  <div class="row g-3">
    <div class="col-md-2"><!-- spacer --></div>

    <!-- customer details -->
    <div class="col-md-3">
      <table class="table">
        <tr>
          <td>Invoice Number</td>
          <td>{{ props.invoice.InvoiceNumber }}</td>
        </tr>

        <tr>
          <td>Invoice Date</td>
          <td>{{ props.invoice.InvoiceDate }}</td>
        </tr>

        <tr>
          <td>Customer</td>
          <td>{{ props.invoice.CustomerName }}</td>
        </tr>

        <tr>
          <td>GSTIN</td>
          <td>{{ props.invoice.CustomerGstin }}</td>
        </tr>

        <tr>
          <td>Contact Name</td>
          <td>{{ props.invoice.CustomerContactName }}</td>
        </tr>

        <tr>
          <td>Phone</td>
          <td>{{ props.invoice.CustomerPhone }}</td>
        </tr>

        <tr>
          <td>Email</td>
          <td>{{ props.invoice.CustomerEmail }}</td>
        </tr>

        <tr>
          <td>Website</td>
          <td>{{ props.invoice.CustomerWebsite }}</td>
        </tr>
      </table>
    </div>

    <!-- billing address -->
    <div class="col-md-3">
      <table class="table">
        <tr>
          <td>Billing Address</td>
          <td>{{ props.invoice.BillingAddress.AddressText }}</td>
        </tr>

        <tr>
          <td>City</td>
          <td>{{ props.invoice.BillingAddress.City }}</td>
        </tr>

        <tr>
          <td>State</td>
          <td>{{ props.invoice.BillingAddress.State }}</td>
        </tr>

        <tr>
          <td>Postal Code</td>
          <td>{{ props.invoice.BillingAddress.PostalCode }}</td>
        </tr>

        <tr>
          <td>Country</td>
          <td>{{ props.invoice.BillingAddress.Country }}</td>
        </tr>
      </table>
    </div>

    <!-- shipping address -->
    <div class="col-md-3">
      <table class="table">
        <tr>
          <td>Shipping Address</td>
          <td>{{ props.invoice.ShippingAddress.AddressText }}</td>
        </tr>

        <tr>
          <td>City</td>
          <td>{{ props.invoice.ShippingAddress.City }}</td>
        </tr>

        <tr>
          <td>State</td>
          <td>{{ props.invoice.ShippingAddress.State }}</td>
        </tr>

        <tr>
          <td>Postal Code</td>
          <td>{{ props.invoice.ShippingAddress.PostalCode }}</td>
        </tr>

        <tr>
          <td>Country</td>
          <td>{{ props.invoice.ShippingAddress.Country }}</td>
        </tr>
      </table>
    </div>
  </div>
</template>
