<form action="{{ route('admin.level.update', $level->id)  }}" method="POST" enctype="multipart/form-data">
    @csrf
    <div class="row">

        <div class="form-group">
            <label>@lang('Title')</label>
            <input type="text" class="form-control" name="title" value="{{ $level->title }}" required>
        </div>

        <div class="form-group">
            <label>@lang('Level')</label>
            <input type="number" class="form-control" name="level" value="{{ $level->level }}" required>
        </div>
        <div class="form-group">
            <div class="image-upload">
                <div class="thumb">
                    <div class="avatar-preview d-flex justify-content-center">
                        <div class="profilePicPreview"
                            style="background-image: url({{ getImage(getFilePath('levels') . '/' . $level->image, getFileSize('levels')) }}); height: 200px; width: 200px;">
                            <button type="button" class="remove-image"><i class="fa fa-times"></i></button>                        </div>
                    </div>
                    <div class="avatar-edit">
                        <input type="file" class="profilePicUpload" name="image" id="profilePicUpload1"
                            accept=".png, .jpg, .jpeg">
                        <label for="profilePicUpload1" class="bg--success">@lang('Upload Image')</label>
                        <small class="mt-2  ">@lang('Supported files'): <b>@lang('jpeg'), @lang('jpg').</b>
                            @lang('Image will be resized into 400x400px') </small>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label>@lang('Reward Amount')</label>
            <div class="input-group">
                <input type="number" class="form-control" name="reward_amount"
                    value="{{ getAmount($level->reward_amount) }}" required>
                <div class="input-group-text">{{ __($general->cur_text) }}</div>
            </div>
        </div>
        <div class="form-group">
            <label>@lang('Eligibility Duration')</label>
            <input type="number" class="form-control" name="eligibility_duration"
                value="{{ $level->eligibility_duration }}" required>
        </div>
    </div>
    <div class="form-group">
        <button type="submit" class="btn btn--primary">@lang('Submit')</button>
    </div>
</form>
