<template>
  <list-table-content
    :tableHeader="tableHeader"
    formTitle="Yetklendirme Logları"
    listText="Kayıt"
    :apiList="'CekilisAtamaLog/Cekilis/' + piyangoStore.selectedLottery"
    apiText="Çekiliş Yetkilendirme Log Listesi"
    page="form"
    :refresh="piyangoStore.lotteryYetkiRefresh" />
</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: 'Tarih',
      compute: (v: Record<string, any>): string => {
        return dateStore.dateFormat({ pattern: 'dd-mm-yy', date: v.tarih })
      },
      sort: true,
      style: { width: '20%' }
    },
    {
      name: 'islem',
      title: 'İşlem',
      sort: true
    },
    {
      name: 'islemiYapan',
      title: 'İşlemi Yapan',
      sort: true,
      style: { width: '20%' }
    }
  ])
</script>
