<form class="row g-3 auto-width" action="{{route('update-broker_details',$brokers->id)}}" method="post" enctype='multipart/form-data'>
        @csrf
         <div class="col-md-6 ">
        <div>
            <label for="name" class="form-label">Broker Name <span class="text-danger"><b>*</b></span></label>
        </div>
        <div class="input-group">
            <input type="text" id="brokers_id" class="form-control"  value="{{ $broker->name }}" 
            placeholder="Full Name">
            <input type="hidden" name="brokers_id" value="{{ $broker->id }}">
             <button class="btn  btn-btn-white " id="edit_broker" type="button"  title="Edit"><i class="bi bi-pencil-square"></i></button>
                </button> 
        </div>
    </div>
                
    <div class="col-md-6">
            <label class="form-label">Broker Commission </label>
            <input type="text" class="form-control" placeholder="Broker Commission " name="broker_commission" value="{{$brokers->broker_commission}}"   />
    </div>
    <div class="col-md-6">
            <label class="form-label">Broker Note </label>
            <input type="text" class="form-control" placeholder="Broker Note "   />
    </div>
</form>
@section('js')
<script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/12.1.10/js/intlTelInput.js"></script>
<script type="text/javascript" src="{{ asset('admin/plugins/datepicker/js/bootstrap-datepicker.js') }}"></script>
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
<script>

    function delay(callback, ms) {
        var timer = 0;
        return function() {
            var context = this,
                args = arguments;
            clearTimeout(timer);
            timer = setTimeout(function() {
                callback.apply(context, args);
            }, ms || 0);
        };
    }

     function isNumber(value) 
    {
    return typeof value === 'number';
    }

    function reinitializeTelInput(countryCode) {
        var telInput = $('#commonModal').find('#phone_no , #whatsapp_no , #alternative_no');
        telInput.intlTelInput('destroy'); // Destroy the existing instances

        telInput.intlTelInput({
            utilsScript: "https://cdn.jsdelivr.net/npm/intl-tel-input@18.2.1/build/js/utils.js",
            initialCountry: countryCode || '{!! $countryCode ?? '' !!}',
            separateDialCode: true
        });
    }

    
</script>

@endsection