@extends('layouts.admin')

@section('content')
<div class="content-area">
    <div class="mr-breadcrumb">
        <div class="row">
            <div class="col-lg-12">
                <h4 class="heading">প্যাকেজ এডিট করুন <a class="add-btn" href="{{ route('admin.fraud-packages.index') }}"><i class="fas fa-arrow-left"></i> ফিরে যান</a></h4>
            </div>
        </div>
    </div>

    <div class="add-product-content">
        <div class="row">
            <div class="col-lg-12">
                <div class="product-description">
                    <div class="body-area">
                        @include('includes.admin.form-error') 
                        
                        <form action="{{ route('admin.fraud-packages.update', $package->id) }}" method="POST">
                            @csrf
                            @method('PUT')

                            <div class="row">
                                <div class="col-lg-4">
                                    <div class="left-area">
                                        <h4 class="heading">প্যাকেজের নাম *</h4>
                                    </div>
                                </div>
                                <div class="col-lg-7">
                                    <input type="text" class="input-field" name="title" value="{{ $package->title }}" required>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-lg-4">
                                    <div class="left-area">
                                        <h4 class="heading">মূল্য (টাকা) *</h4>
                                    </div>
                                </div>
                                <div class="col-lg-7">
                                    <input type="number" class="input-field" name="price" value="{{ $package->price }}" required>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-lg-4">
                                    <div class="left-area">
                                        <h4 class="heading">সর্বমোট লিমিট *</h4>
                                    </div>
                                </div>
                                <div class="col-lg-7">
                                    <input type="number" class="input-field" name="limit" value="{{ $package->limit }}" required>
                                </div>
                            </div>

                            {{-- [নতুন] ডেইলি লিমিট এডিট --}}
                            <div class="row">
                                <div class="col-lg-4">
                                    <div class="left-area">
                                        <h4 class="heading">দৈনিক লিমিট *</h4>
                                    </div>
                                </div>
                                <div class="col-lg-7">
                                    <input type="number" class="input-field" name="daily_limit" value="{{ $package->daily_limit }}" required>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-lg-4">
                                    <div class="left-area">
                                        <h4 class="heading">মেয়াদ (দিন) *</h4>
                                    </div>
                                </div>
                                <div class="col-lg-7">
                                    <input type="number" class="input-field" name="duration" value="{{ $package->duration }}" required>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-lg-4">
                                    <div class="left-area">
                                        <h4 class="heading">স্ট্যাটাস *</h4>
                                    </div>
                                </div>
                                <div class="col-lg-7">
                                    <select name="status" class="input-field">
                                        <option value="1" {{ $package->status == 1 ? 'selected' : '' }}>সক্রিয় (Active)</option>
                                        <option value="0" {{ $package->status == 0 ? 'selected' : '' }}>নিষ্ক্রিয় (Inactive)</option>
                                    </select>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-lg-4">
                                    <div class="left-area"></div>
                                </div>
                                <div class="col-lg-7">
                                    <button class="addProductSubmit-btn" type="submit">আপডেট করুন</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection