<?php

namespace Database\Seeders;

use App\Models\State;
use Illuminate\Database\Seeder;

class IndiaStatesSeeder extends Seeder
{
    public function run(): void
    {
        $states = [
            ['name' => 'Andhra Pradesh',    'code' => 'AP',  'capital' => 'Amaravati',    'regulatory_body' => 'CRDA / RERA AP'],
            ['name' => 'Arunachal Pradesh', 'code' => 'AR',  'capital' => 'Itanagar',     'regulatory_body' => 'Town Planning Dept.'],
            ['name' => 'Assam',             'code' => 'AS',  'capital' => 'Dispur',        'regulatory_body' => 'GMDA / RERA Assam'],
            ['name' => 'Bihar',             'code' => 'BR',  'capital' => 'Patna',         'regulatory_body' => 'RERA Bihar / BUIADO'],
            ['name' => 'Chhattisgarh',      'code' => 'CG',  'capital' => 'Raipur',        'regulatory_body' => 'RERA CG'],
            ['name' => 'Goa',               'code' => 'GA',  'capital' => 'Panaji',        'regulatory_body' => 'Town & Country Planning, Goa'],
            ['name' => 'Gujarat',           'code' => 'GJ',  'capital' => 'Gandhinagar',   'regulatory_body' => 'RERA Gujarat / GDCR 2017'],
            ['name' => 'Haryana',           'code' => 'HR',  'capital' => 'Chandigarh',    'regulatory_body' => 'RERA Haryana / DTCP Haryana'],
            ['name' => 'Himachal Pradesh',  'code' => 'HP',  'capital' => 'Shimla',        'regulatory_body' => 'Town & Country Planning HP'],
            ['name' => 'Jharkhand',         'code' => 'JH',  'capital' => 'Ranchi',        'regulatory_body' => 'RERA Jharkhand'],
            ['name' => 'Karnataka',         'code' => 'KA',  'capital' => 'Bengaluru',     'regulatory_body' => 'BDA / BBMP / RERA Karnataka'],
            ['name' => 'Kerala',            'code' => 'KL',  'capital' => 'Thiruvananthapuram', 'regulatory_body' => 'RERA Kerala / RBDCK'],
            ['name' => 'Madhya Pradesh',    'code' => 'MP',  'capital' => 'Bhopal',        'regulatory_body' => 'RERA MP / Town & Country Planning'],
            ['name' => 'Maharashtra',       'code' => 'MH',  'capital' => 'Mumbai',        'regulatory_body' => 'MahaRERA / DCPR 2034'],
            ['name' => 'Manipur',           'code' => 'MN',  'capital' => 'Imphal',        'regulatory_body' => 'Town Planning Dept.'],
            ['name' => 'Meghalaya',         'code' => 'ML',  'capital' => 'Shillong',      'regulatory_body' => 'Town Planning Dept.'],
            ['name' => 'Mizoram',           'code' => 'MZ',  'capital' => 'Aizawl',        'regulatory_body' => 'Town Planning Dept.'],
            ['name' => 'Nagaland',          'code' => 'NL',  'capital' => 'Kohima',        'regulatory_body' => 'Town Planning Dept.'],
            ['name' => 'Odisha',            'code' => 'OD',  'capital' => 'Bhubaneswar',   'regulatory_body' => 'RERA Odisha / BDA'],
            ['name' => 'Punjab',            'code' => 'PB',  'capital' => 'Chandigarh',    'regulatory_body' => 'RERA Punjab / PUDA'],
            ['name' => 'Rajasthan',         'code' => 'RJ',  'capital' => 'Jaipur',        'regulatory_body' => 'RERA Rajasthan / RUDA'],
            ['name' => 'Sikkim',            'code' => 'SK',  'capital' => 'Gangtok',       'regulatory_body' => 'Town Planning Dept.'],
            ['name' => 'Tamil Nadu',        'code' => 'TN',  'capital' => 'Chennai',       'regulatory_body' => 'CMDA / DTCP Tamil Nadu / TNRERA'],
            ['name' => 'Telangana',         'code' => 'TS',  'capital' => 'Hyderabad',     'regulatory_body' => 'HMDA / RERA Telangana'],
            ['name' => 'Tripura',           'code' => 'TR',  'capital' => 'Agartala',      'regulatory_body' => 'Town Planning Dept.'],
            ['name' => 'Uttar Pradesh',     'code' => 'UP',  'capital' => 'Lucknow',       'regulatory_body' => 'RERA UP / UPRERA'],
            ['name' => 'Uttarakhand',       'code' => 'UK',  'capital' => 'Dehradun',      'regulatory_body' => 'RERA Uttarakhand'],
            ['name' => 'West Bengal',       'code' => 'WB',  'capital' => 'Kolkata',       'regulatory_body' => 'WBHIDCO / KMDA / RERA WB'],
            ['name' => 'Delhi',             'code' => 'DL',  'capital' => 'New Delhi',     'regulatory_body' => 'DDA / RERA Delhi / MPD 2041'],
            ['name' => 'Puducherry',        'code' => 'PY',  'capital' => 'Puducherry',    'regulatory_body' => 'Town & Country Planning Puducherry'],
        ];

        foreach ($states as $s) {
            State::firstOrCreate(
                ['code' => $s['code']],
                array_merge($s, ['is_active' => true])
            );
        }
    }
}
