@extends('layouts.app')
@section('title', 'Edit Kecamatan')
@section('content')

<div class="container py-4">
    <div class="row justify-content-center">
        <div class="col-md-10"> <!-- diperluas dari col-md-8 -->

            <div class="card shadow-sm border-0">
                <div class="card-header bg-primary text-white">
                    <h4 class="mb-0"><i class="bi bi-pencil-square me-2"></i>Edit Data Kecamatan</h4>
                </div>

                <div class="card-body">
                    <form action="{{ route('admin.kabupaten.update', $kabupaten->id) }}" method="POST">
                        @csrf
                        @method('PUT')

                        <div class="mb-3">
                            <label for="nama" class="form-label fw-semibold">Nama Kecamatan</label>
                            <input type="text" name="nama" id="nama" class="form-control" value="{{ $kabupaten->nama }}" required>
                        </div>

                        <div class="row">
                            <div class="col-md-6 mb-3">
                                <label for="longitude" class="form-label fw-semibold">Longitude</label>
                                <input type="text" name="longitude" id="longitude" class="form-control" value="{{ $kabupaten->longitude }}" required>
                            </div>
                            <div class="col-md-6 mb-3">
                                <label for="latitude" class="form-label fw-semibold">Latitude</label>
                                <input type="text" name="latitude" id="latitude" class="form-control" value="{{ $kabupaten->latitude }}" required>
                            </div>
                        </div>

                        <div class="d-flex justify-content-between">
                            <a href="{{ route('admin.kabupaten.index') }}" class="btn btn-outline-secondary">
                                <i class="bi bi-arrow-left-circle me-1"></i>Batal
                            </a>
                            <button type="submit" class="btn btn-success">
                                <i class="bi bi-save me-1"></i>Simpan Perubahan
                            </button>
                        </div>
                    </form>
                </div>
            </div>

        </div>
    </div>
</div>
@endsection