@extends('layouts.app')

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

@section('content')
<div class="container-fluid py-4">
    <div class="row justify-content-center">
        <div class="card">
            <div class="card-header border-0 bg-transparent">
                <h5 class="mb-0">View Card Member</h5>
            </div>
            <div class="card-body">
                <div class="mb-3">
                    <label class="form-label">Card Number</label>
                    <input type="text" class="form-control" value="{{ $member['cardNumber'] }}" readonly>
                </div>
                <div class="mb-3">
                    <label class="form-label">First Name</label>
                    <input type="text" class="form-control" value="{{ $member['firstName'] }}" readonly>
                </div>
                <div class="mb-3">
                    <label class="form-label">Last Name</label>
                    <input type="text" class="form-control" value="{{ $member['lastName'] }}" readonly>
                </div>
                <div class="mb-3">
                    <label class="form-label">Birthday</label>
                    <input type="text" class="form-control" value="{{ $member['birthday'] ? date('F d, Y', strtotime($member['birthday'])) : 'N/A' }}" readonly>
                </div>
                <div class="mb-3">
                    <label class="form-label">Card Type</label>
                    <input type="text" class="form-control" value="{{ $member['cardType'] }}" readonly>
                </div>
                <div class="mb-3">
                    <label class="form-label">Status</label>
                    <input type="text" class="form-control" value="{{ $member['status'] }}" readonly>
                </div>
                <div class="mb-3">
                    <label class="form-label">Lock Status</label>
                    <input type="text" class="form-control" value="{{ $member['is_locked'] == 1 ? 'Locked' : 'Unlocked' }}" readonly>
                </div>
                <div class="text-end">
                    <a href="{{ route('card-member') }}" class="btn btn-primary">Back</a>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection