<form class="row g-3 auto-width" action="{{ route('api-management.update', $api->id)}}" method="post" enctype='multipart/form-data'>
    @csrf
    @method('patch')
    <div class="col-md-6">
        <label for="api_name" class="form-label">API Name <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="api_name" name="api_name" aria-describedby="inputGroupPrepend" required placeholder="API Name" value="{{$api->api_name}}">
        <span class="text-danger error_api_name" style="display: none;">This field is required.</span>
    </div>
    <div class="col-md-6">
        <label for="api_slug" class="form-label">API Slug <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="api_slug" name="api_slug" aria-describedby="inputGroupPrepend" required placeholder="API Slug" value="{{$api->api_slug}}">
        <span class="text-danger error_api_slug" style="display: none;">This field is required.</span>
    </div>
    <div class="col-md-12">
        <label for="api_key" class="form-label">API Key <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="api_key" name="api_key" aria-describedby="inputGroupPrepend" required placeholder="API Key" value="{{$api->api_key}}">
        <span class="text-danger error_api_key" style="display: none;">This field is required.</span>
    </div>
    <div class="col-md-12">
        <label for="api_secret" class="form-label">API Secret</label>
        <input type="text" class="form-control" id="api_secret" name="api_secret" aria-describedby="inputGroupPrepend" required placeholder="API Secret" value="{{$api->api_secret}}">
        <span class="text-danger error_api_secret" style="display: none;">This field is required.</span>
    </div>
    <div class="col-md-12">
        <label for="api_endpoint" class="form-label">API Endpoint</label>
        <input type="text" class="form-control" id="api_endpoint" name="api_endpoint" aria-describedby="inputGroupPrepend" required placeholder="API Endpoint" value="{{$api->api_endpoint}}">
        <span class="text-danger error_api_endpoint" style="display: none;">This field is required.</span>
    </div>
    <div class="col-md-6">
        <label for="api_type" class="form-label">API Type <span class="text-danger"><b>*</b></span></label>
        <select class="form-select" aria-label="api_type" name="api_type">
            <option value="Sandbox" {{ matchSelected($api->api_type,'Sandbox') }}>Sandbox</option>
            <option value="Live" {{ matchSelected($api->api_type,'Live') }}>Live</option>
        </select>
        <span class="text-danger error_api_type" style="display:none;">This field is required.</span>
    </div>
    <div class="col-md-6">
        <label for="api_endpoint" class="form-label">API Description</label>
        <textarea class="form-textarea" name="api_description" placeholder="API Description">{{$api->api_description}}</textarea>
        <span class="text-danger error_api_endpoint" style="display: none;">This field is required.</span>
    </div>
</form>