<template>
  <section class="section-list">
    <list-table-content
      :tableHeader="tableHeader"
      icon="draws"
      title="Piyango Logları"
      listText="Kayıt"
      :apiList="'CekilisAtamaLog/Cekilis/' + piyangoStore.selectedLottery"
      apiText="Piyango Logları" />
  </section>
</template>
<script setup lang="ts">
  import { ref } from 'vue'
  import { useDateStore } from '@/stores/dateStore'
  const dateStore = useDateStore()
  import { usePiyangoStore } from '../stores/piyangoStore'
  const piyangoStore = usePiyangoStore()

  const tableHeader = ref<Record<string, any>[]>([
    {
      name: 'tarih',
      title: 'İşlem Tarihi',
      compute: (v: Record<string, any>): string => {
        return dateStore.dateFormat({ date: v.tarih })
      },
      sort: true,
      style: { width: '20%' }
    },
    {
      name: 'islemiYapan',
      title: 'İşlemi yapan',
      sort: true
    },
    {
      name: 'islem',
      title: 'İşlem',
      sort: true
    }
  ])
</script>
