@extends('layouts.admin.app')
@section('content')

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.5/jquery.validate.min.js"></script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.ckeditor.com/4.14.0/standard/ckeditor.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.18/css/bootstrap-select.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.18/js/bootstrap-select.min.js"></script>

<main id="main" class="main">
        <div class="page-breadcrumb">
            <div class="row">
                <div class="col-12 d-flex no-block align-items-center justify-content-between px-4 mb-2">
                    <h4 class="page-title">Edit Agent Product</h4>
                    <div class="ml-auto text-right">
                        <a href="{{route('admin.agent.agentProductList', ['id' => encrypt($dataDetails->agent_id)])}}" class="btn btn-outline-info">Back</a>
                    </div>
                </div>
            </div>
        </div>
        <div class="container-fluid">
		    <div class="row">
		        <div class="col-12">
		            <div class="card">
		                <form action="{{url('admin/agent/agent-product-edit')}}/{{encrypt($dataDetails->id)}}" method="POST" class="form-horizontal" id="formadd" enctype="multipart/form-data">
		                    @csrf
		                    <div class="card-body">
		                        <h4 class="card-title">Edit Agent Product</h4>
		                        
		                        <input type="hidden" name="formid" value="<?php echo $dataDetails->id; ?>">

                                <div class="form-group m-t-20">
                                    <label>Product Item</label>
                                    <input type="text" class="form-control" id="item" name="item" value="{{$dataDetails->item}}" placeholder="Enter Product Item Name" required>
                                </div>

		                        <div class="form-group m-t-20">
                                    <label>Product Slug<span>*</span></label>
                                    <div class="input-group">
                                        <input type="text" class="form-control" id="slug" name="slug" value="{{$dataDetails->slug}}" placeholder="Enter Product Slug">
                                    </div>
                                </div>
                                <div class="form-group m-t-20">
                                    <label>Price</label>
                                    <input type="number" class="form-control" id="price" name="price" min="0" step="0.01" value="{{$dataDetails->price}}" placeholder="Enter Product Price" required>
                                </div>
                                <div class="form-group m-t-20">
                                    <label>Gst</label>
                                    <input type="number" class="form-control" id="gst" name="gst" min="0" step="0.01" value="{{$dataDetails->gst}}" placeholder="Enter Product gst" required>
                                </div>
                                <div class="form-group m-t-20">
                                    <label>Price Without Gst</label>
                                    <input type="number" class="form-control" id="without_gst" name="without_gst" min="0" step="0.01" value="{{$dataDetails->price_without_gst}}" placeholder="Enter Product without gst" required>
                                </div>
                                <div class="col-md-6">
                                    <label>Is Personalized</label><br>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="radio" name="is_personalized" value="Y" {{ $dataDetails->is_personalized == 'Y' ? 'checked' : '' }}>
                                        <label class="form-check-label" for="">Yes</label>
                                    </div>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="radio" name="is_personalized" value="N" {{ $dataDetails->is_personalized == 'N' ? 'checked' : '' }}>
                                        <label class="form-check-label" for="">No</label>
                                    </div>
                                </div>
		                    </div>
		                    <div class="border-top">
		                        <div class="card-body">
		                            <input class="btn btn-primary" type="submit" value="UPDATE">
		                        </div>
		                    </div>
		                </form>
		            </div>
		        </div>
		    </div>
		</div>
</main> 

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
  

<script type="text/javascript">

</script>     

@endsection