<?php

namespace Database\Seeders;

use App\Models\SubDistrict;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;

class SubDistrictSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $data = [
            [
                'id' => '1',
                'sub_district' => 'Kec Maesan',
                'latitude' => -8.027360,
                'longitude' => 113.751380
            ],
            [
                'id' => '2',
                'sub_district' => 'Kec Tamanan',
                'latitude' => -8.023010,
                'longitude' => 113.822780
            ],
            [
                'id' => '3',
                'sub_district' => 'Kec Tlogosari',
                'latitude' => -8.034480,
                'longitude' => 113.965540
            ],
            [
                'id' => '4',
                'sub_district' => 'Kec Sukosari',
                'latitude' => -7.941960,
                'longitude' => 113.950670
            ],
            [
                'id' => '5',
                'sub_district' => 'Kec Pujer',
                'latitude' => -7.998430,
                'longitude' => 113.894170
            ],
            [
                'id' => '6',
                'sub_district' => 'Kec Grujugan',
                'latitude' => -7.986890,
                'longitude' => 113.751380
            ],
            [
                'id' => '7',
                'sub_district' => 'Kec Curahdami',
                'latitude' => -7.924800,
                'longitude' => 113.775180
            ],
            [
                'id' => '8',
                'sub_district' => 'Kec Tenggarang',
                'latitude' => -7.940700,
                'longitude' => 113.846580
            ],
            [
                'id' => '9',
                'sub_district' => 'Kec Wonosari',
                'latitude' => -7.907514117741751,
                'longitude' => 113.89351077636458
            ],
            [
                'id' => '10',
                'sub_district' => 'Kec Tapen',
                'latitude' => -7.886949359522907,
                'longitude' => 113.93805790830632
            ],
            [
                'id' => '11',
                'sub_district' => 'Kec Bondowoso',
                'latitude' => -7.918760,
                'longitude' => 113.820640
            ],
            [
                'id' => '12',
                'sub_district' => 'Kec Wringin',
                'latitude' => -7.823850,
                'longitude' => 113.775180
            ],
            [
                'id' => '13',
                'sub_district' => 'Kec Tegalampel',
                'latitude' => -7.881550,
                'longitude' => 113.822780
            ],
            [
                'id' => '14',
                'sub_district' => 'Kec Klabang',
                'latitude' => -7.815340,
                'longitude' => 113.917960
            ],
            [
                'id' => '15',
                'sub_district' => 'Kec Cermee',
                'latitude' => -7.826920,
                'longitude' =>  114.060690
            ],
            [
                'id' => '16',
                'sub_district' => 'Kec Prajekan',
                'latitude' => -7.792350,
                'longitude' =>  113.965540
            ],
            [
                'id' => '17',
                'sub_district' => 'Kec Pakem',
                'latitude' => -7.874685771911456,
                'longitude' =>  113.7364937000255
            ],
            [
                'id' => '18',
                'sub_district' => 'Kec SumberWringin',
                'latitude' => -8.009880,
                'longitude' =>  114.036910
            ],
            [
                'id' => '19',
                'sub_district' => 'Kec Sempol',
                'latitude' => -8.052280,
                'longitude' =>  114.167720
            ],
            [
                'id' => '20',
                'sub_district' => 'Kec Binakal',
                'latitude' => -7.911430,
                'longitude' => 113.745430
            ],
            [
                'id' => '21',
                'sub_district' => 'Kec Taman Krocok',
                'latitude' => -7.858510,
                'longitude' =>  113.870370
            ],
            [
                'id' => '22',
                'sub_district' => 'Kec Botolinggo',
                'latitude' => -7.908970,
                'longitude' =>  114.036910
            ],
            [
                'id' => '23',
                'sub_district' => 'Kec Jambesari',
                'latitude' => -7.981110,
                'longitude' => 113.846580
            ],
        ];

        foreach ($data as $key => $value) {
            SubDistrict::create([
                'id' => $value['id'],
                'sub_district' => $value['sub_district'],
                'latitude' => $value['latitude'],
                'longitude' => $value['longitude']
            ]);
        }
    }
}
