<div>
    {{-- Top Nav --}}
    @include('livewire.about-us.top-nav.card-type')

    @if (session()->has('success'))
    <div
        x-data="{ show: true }"
        x-init="setTimeout(() => show = false, 3000)"
        x-show="show"
        x-transition
        class="text-2xl text-green-700 px-4 py-2 rounded mb-4">
        ✅ {{ session('success') }}
    </div>
    @endif
    <livewire:components.table
        :columns="[
        ['label' => 'Card Type Code', 'field' => 'code'],
        ['label' => 'Card Type Description', 'field' => 'name'],
    ]"
        :rows="$cardTypes"
        :hasActions="true"
        :isViewPage="false"
        :addRoute="route('card-type-create')"
        :rowKey="'cardtype_uuid'"
        :updateRoute="'/main/about-us/card-type-update'"
        :viewRoute="'/main/about-us/card-type-view'"
        :deleteEndpoint="'api/cms/cardType'" 
        :deleteAllEndpoint="'api/cms/cardTypeBatchDelete'"

        />
</div>