<template>
    <div class="row" v-if="authStore.isAdmin">
        <div class="col">
            <div class="row m-b-10">
                <div class="col">
                    <div class="font-heading fs-16 all-caps bold m-b-15">Voucher Campaigns ALL CUSTOMERS</div>
                </div>
            </div>
            <div class="row">
                <div class="col">
                    <div class="row padding-10">
                        <div class="col-2 fs-10">Name</div>
                        <div class="col-1 fs-10 text-center">Issued</div>
                        <div class="col-1 fs-10 text-center">Month</div>
                        <div class="col-1 fs-10 text-center">Limit Per Month</div>
                        <div class="col-3 fs-10">Campaign Id</div>
                    </div>

                    <list-component section="voucherCampaignsSection" :endpoint="route('api.voucher.campaigns.list')" :options="options">
                        <template #list="{ data }">
                            <single-voucher-campaign-item-component :data="data"></single-voucher-campaign-item-component>
                        </template>
                    </list-component>
                </div>
            </div>
        </div>
    </div>
</template>

<script setup lang="ts">
import { useAuthStore } from '@/stores/auth';
import route from '@/general/functions/router';

const authStore = useAuthStore();

const options = {
    include_metadata: true,
    is_display: 1
};
</script>
