@extends('website.layouts.app')

@section('title')
    Kalkulasi kecamatan | Hasil Preferensi
@endsection

@section('content')
    <div class="row">
        <div class="col-12">
            <div class="page-title-box d-sm-flex align-items-center justify-content-between">
                <h4 class="mb-sm-0">Perhitungan TOPSIS</h4>

                <div class="page-title-right">
                    <ol class="breadcrumb m-0">
                        <li class="breadcrumb-item"><a href="javascript: void(0);">Perhitungan TOPSIS</a></li>
                        <li class="breadcrumb-item active">Kecamatan</li>
                    </ol>
                </div>

            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-header d-flex flex-column flex-sm-row align-items-sm-center justify-content-between gap-2">
                    <h4 class="card-title mb-0 flex-grow-1">Perhitungan Topsis | Hasil Preferensi Kecamatan
                    </h4>

                    <div class="d-flex">
                        <select class="form-select w-100 w-sm-auto" id="choiceMonth" aria-label="pilih-bulan">
                            <option selected value="01">01</option>
                            <option value="02">02</option>
                            <option value="03">03</option>
                            <option value="04">04</option>
                            <option value="05">05</option>
                            <option value="06">06</option>
                            <option value="07">07</option>
                            <option value="08">08</option>
                            <option value="09">09</option>
                            <option value="10">10</option>
                            <option value="11">11</option>
                            <option value="12">12</option>
                        </select>
                        <select class="form-select w-100 w-sm-auto" id="choiceYear" aria-label="pilih-tahun">
                            @foreach ($years as $year)
                                <option selected value="{{ $year }}">{{ $year }}</option>
                            @endforeach
                        </select>
                    </div>
                </div><!-- end card header -->

                <div class="card-body">
                    <div id="table-result-preference-sub-district" class="table-responsive">
                    </div>
                </div><!-- end card-body -->
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-header">
                    <h4 class="card-title mb-0">Hasil Preferensi Kecamatan (Map)</h4>
                </div><!-- end card header -->

                <div class="card-body">
                    <div id="map" class="map" style="height: 500px; width: 100%;"></div>
                </div>

            </div><!-- end card -->
        </div>
    </div>


    <script src="{{ asset('assets/libs/prismjs/prism.js') }}"></script>
    <script src="{{ asset('assets/libs/gridjs/gridjs.umd.js') }}"></script>
    <script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>

    {{-- <script src="{{ asset('assets/js/pages/gridjs.init.js') }}"></script> --}}
    <!-- leaflet plugin -->
    <script src="{{ asset('assets/libs/leaflet/leaflet.js') }}"></script>
    {{-- <script src="{{ asset('assets/js/pages/leaflet-map.init.js') }}"></script> --}}

    {{-- custom js --}}
    <script src="{{ asset('assets/js/custom/sub-district-result-preference.js') }}"></script>
@endsection
