@extends('layouts.app')
@section('title', 'تعديل الاشتراك')
@section('content')
<div class="min-h-screen bg-gray-50 py-8">
    <div class="max-w-4xl mx-auto">
        <h1 class="text-3xl font-bold text-gray-900">تحديث خطة الاشتراك</h1>
        <div class="bg-white rounded-lg mt-6 p-6">
            <form action="{{ route('subscriptions.update', $subscription) }}" method="POST">
                @csrf
                @method('PUT')
                <div class="mb-6">
                    <label for="subscription_plan_id" class="block font-semibold mb-2">اختر خطة جديدة</label>
                    <select id="subscription_plan_id" name="subscription_plan_id" required class="w-full px-4 py-2 border rounded">
                        <option>اختر خطة</option>
                        @foreach($plans as $plan)
                        <option value="{{ $plan->id }}">{{ $plan->name }}</option>
                        @endforeach
                    </select>
                </div>
                <div class="flex gap-3 justify-end">
                    <a href="{{ route('subscriptions.show', $subscription) }}" class="px-6 py-3 bg-gray-100 rounded">إلغاء</a>
                    <button type="submit" class="px-6 py-3 bg-blue-600 text-white rounded">تحديث</button>
                </div>
            </form>
        </div>
    </div>
</div>
@endsection
