<script lang="ts">
  import Table from '$lib/data-table/Table.svelte'

  const table = {
    caption: "List of users",
    columns: [
      {
        field: "id",
        heading: "ID",
      },
      {
        field: "email",
        heading: "Email",
      },
      {
        field: "first_name",
        heading: "First Name",
      },
      {
        field: "last_name",
        heading: "Last Name",
      },
      {
        field: "created",
        heading: "Created",
        type: 'date',
      },
      {
        field: "updated",
        heading: "Updated",
        type: 'date',
      },
    ],
    itemCountEndpoint: "/api/users/total/",
    itemsEndpoint: "/api/users/",
  };
</script>

<Table {...table} />
