@extends('layouts.vertical', ['subtitle' => 'Create'])

@section('content')

@include('layouts.partials/page-title', ['title' => 'Data Settings', 'subtitle' => 'Setting Dashboard'])

<x-toast-notification />
<div class="row d-flex justify-content-center">
	<div class="col-lg-6">
		<div class="card">
			<div class="card-body">
				<form id="formUpdateDataSettings" action="{{ route('data-settings.update', $data->id) }}" method="POST">
					@csrf
					@method('PUT')
					<div class="mb-3">
						<label for="key" class="form-label">Key</label>
						<input type="text" id="key" class="form-control" name="key" value="{{$data->key}}">
					</div>
					<div class="mb-3">
						<label for="value" class="form-label">Value</label>
						<input type="text" id="value" class="form-control" name="value" value="{{$data->value}}">
					</div>
					<div class="mb-3">
						<label for="type" class="form-label">Type</label>
						<input type="text" id="type" class="form-control" name="type" value="{{$data->type}}">
					</div>
          <button class="btn btn-primary me-1" type="button" id="btnUpdateDataSettings">
              <span id="spinner" class="spinner-border spinner-border-sm me-1 d-none" role="status" aria-hidden="true"></span>
              Update
          </button>
				</form>
			</div>
		</div>
	</div>
</div>

@endsection

@section('scripts')
@vite(['resources/js/data-settings/update.js'])
@endsection