<form class="row g-3 auto-width" id="doctorForm" action="{{ route('doctor-prescription.update',$id) }}" method="post" enctype='multipart/form-data'>
    @csrf
    @method('PUT')
     <!-- Doctor -->
     <div class="col-md-12">
        <div>
            <label for="position" class="form-label">Positions <span class="text-danger"><b>*</b></span></label>
        </div>
        <div class="input-group">
            <select class="single-select form-control" name="position">
                <option value="Header" {{ $prescriptions->position=='Header'?'selected':''}} >Header</option>
                <option value="Footer" {{ $prescriptions->position=='Footer'?'selected':''}} >Footer</option>
                <option value="Watermark" {{ $prescriptions->position=='Watermark'?'selected':''}} >Watermark</option>
                <option value="Signature" {{ $prescriptions->position=='Signature'?'selected':''}} >Signature</option>
                <option value="Left Side Image" {{ $prescriptions->position=='Left Side Image'?'selected':''}}>Left Side Image</option>
            </select>
        </div>
        <span class="text-danger error_position" style="display: none;">This field is required.</span>
    </div>
    @if($prescriptions->image_url)   
    <div class="col-md-12">
        <img src="{!! getTempUrl($prescriptions->image_url) !!}" style="width:200px;height:auto">
    </div>
    @endif
     <div class="col-md-12">
        <div>
            <label class="form-label">Image <span class="text-danger"><b>*</b></span></label>
        </div>
        <div class="input-group autocomplete">
            <input type="file" name="image" id="image" class="form-control">
        </div>
        <span class="text-danger error_image" style="display:none;">This field is required.</span>
    </div>
    <div class="col-md-6">
        <label for="height" class="form-label">Height in Pixel<span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="height" name="height" aria-describedby="inputGroupPrepend" placeholder="Enter Height" required value="{!! $prescriptions->height !!}">
        <span class="text-danger error_height" style="display:none;">This field is required.</span>
    </div>
    <!-- Width  -->
    <div class="col-md-6">
        <label for="width" class="form-label">Width in Pixel<span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="width" name="width" aria-describedby="inputGroupPrepend" placeholder="Enter Width" required value="{!! $prescriptions->width !!}">
        <span class="text-danger error_width" style="display:none;">This field is required.</span>
    </div>
    <div class="col-md-12">
        <div>
            <label for="margin" class="form-label">Margin in Pixel<span class="text-danger"><b>*</b></span></label>
        </div>
        <div class="input-group">
            <input type="number" id="top_margin" name="top_margin" class="form-control" placeholder="Top Margin" value="{!! $prescriptions->top_margin !!}" maxlength="4">
            <input type="number" id="bottom_margin" name="bottom_margin" class="form-control" placeholder="Bottom Margin" value="{!! $prescriptions->bottom_margin !!}">
            <input type="number" id="left_margin" name="left_margin" class="form-control" placeholder="Left Margin" value="{!! $prescriptions->left_margin !!}">
            <input type="number" id="right_margin" name="right_margin" class="form-control" placeholder="Right Margin" value="{!! $prescriptions->right_margin !!}">
        </div>
        <span class="text-danger error_margin" style="display:none;">The field is required.</span>
    </div>
    <div class="col-md-12">
        <div>
            <label for="padding" class="form-label">Padding in Pixel</span></label>
        </div>
        <div class="input-group">
            <input type="number" id="top_padding" name="top_padding" class="form-control" placeholder="Top Padding" value="{!! $prescriptions->top_padding !!}" maxlength="4">
            <input type="number" id="bottom_padding" name="bottom_padding" class="form-control" placeholder="Bottom Padding" value="{!! $prescriptions->bottom_padding !!}">
            <input type="number" id="left_padding" name="left_padding" class="form-control" placeholder="Left Padding" value="{!! $prescriptions->left_padding !!}">
            <input type="number" id="right_padding" name="right_padding" class="form-control" placeholder="Right Padding" value="{!! $prescriptions->right_padding !!}">
        </div>
        <span class="text-danger error_padding" style="display:none;">The field is required.</span>
    </div>
    <!-- Alignment -->
    <div class="col-md-6">
        <label for="alignment" class="form-label">Alignment <span class="text-danger"><b>*</b></span></label>
        <select class="form-select" aria-label="alignment" name="alignment">
            <option selected value="">Select Alignment</option>
            <option value="left" {!! $prescriptions->alignment=='left'?'selected':'' !!}>Left</option>
            <option value="center" {!! $prescriptions->alignment=='center'?'selected':'' !!}>Center</option>
            <option value="right" {!! $prescriptions->alignment=='right'?'selected':'' !!}>Right</option>
            <option value="justify" {!! $prescriptions->alignment=='justify'?'selected':'' !!}>Justify</option>
        </select>
        <span class="text-danger error_alignment" style="display:none;">This field is required.</span>
    </div>
    <div class="col-md-12">
        <p><b><span class="text-primary">Please Note::</span> Don't write "px" with the value in the box</b></p>
    </div>
     
   
</form>
