@extends('layouts.app')

@section('page_title', 'Card Member')

@section('content')
    @php
        $members = [
            ['id' => 1, 'cardNumber' => '1234-5678-9012-3456', 'firstName' => 'John', 'lastName' => 'Doe', 'birthday' => '1990-05-15', 'cardType' => 'Gold', 'status' => 'Active'],
            ['id' => 2, 'cardNumber' => '9876-5432-1098-7654', 'firstName' => 'Jane', 'lastName' => 'Smith', 'birthday' => '1985-11-22', 'cardType' => 'Silver', 'status' => 'Inactive'],
            ['id' => 3, 'cardNumber' => '4567-8901-2345-6789', 'firstName' => 'Alice', 'lastName' => 'Johnson', 'birthday' => '1992-03-10', 'cardType' => 'Platinum', 'status' => 'Active'],
            ['id' => 4, 'cardNumber' => '3210-9876-5432-1098', 'firstName' => 'Bob', 'lastName' => 'Brown', 'birthday' => '1988-07-30', 'cardType' => 'Gold', 'status' => 'Active']
        ];
    @endphp

    @include('components.table-component', [
        'pageTitle' => 'Card Member',
        'data' => $members,
        'columns' => [
            ['name' => 'Card Number', 'key' => 'cardNumber', 'sortable' => true],
            ['name' => 'First Name', 'key' => 'firstName', 'sortable' => true],
            ['name' => 'Last Name', 'key' => 'lastName', 'sortable' => true],
            ['name' => 'Birthday', 'key' => 'birthday', 'sortable' => true],
            ['name' => 'Card Type', 'key' => 'cardType', 'sortable' => true],
            ['name' => 'Status', 'key' => 'status', 'sortable' => true]
        ],
        'actions' => ['view'],
        'showAddButton' => false,
        'showCheckboxes' => false,
        'showBatchDelete' => false,
        'showEditModal' => false,
        'showViewModal' => true
    ])
@endsection