@extends('layouts.admin', ['heading' => 'Edit Member', 'subheading' => $member->member_code.' • '.$member->name])

@section('content')
    <div class="admin-card p-5">
        <form method="POST" action="{{ route('admin.members.update', $member) }}" class="grid grid-cols-1 gap-4 md:grid-cols-2">
            @csrf
            <input name="name" value="{{ $member->name }}" class="rounded border p-2" required>
            <input name="mobile" value="{{ $member->mobile }}" class="rounded border p-2" required>
            <input name="email" value="{{ $member->email }}" class="rounded border p-2">
            <input name="package_amount" type="number" step="0.01" min="0" value="{{ $member->package_amount }}" class="rounded border p-2">
            <select name="status" class="rounded border p-2">
                @foreach(['pending','active','blocked'] as $option)
                    <option value="{{ $option }}" @selected($member->status === $option)>{{ ucfirst($option) }}</option>
                @endforeach
            </select>
            <button class="rounded bg-slate-900 px-4 py-2 text-sm text-white md:col-span-2">Save Changes</button>
        </form>
    </div>
@endsection
