const prisma = require('../../src/prisma/PrismaClient.js');

const { seedProvinces } = require('./ProvinceSeeder');
const { seedAcehCities } = require('./city/AcehCitySeeder');
const { seedBaliCities } = require('./city/BaliCitySeeder');
const { seedBantenCities } = require('./city/BantenCitySeeder');
const { seedBengkuluCities } = require('./city/BengkuluCitySeeder');
const { seedDIYogyakartaCities } = require('./city/DIYogyakartaCitySeeder');
const { seedDKIJakartaCities } = require('./city/DKIJakartaCitySeeder');
const { seedGorontaloCities } = require('./city/GorontaloCitySeeder');
const { seedJambiCities } = require('./city/JambiCitySeeder');
const { seedJawaBaratCities } = require('./city/JawaBaratCitySeeder');
const { seedJawaTengahCities } = require('./city/JawaTengahCitySeeder');
const { seedJawaTimurCities } = require('./city/JawaTimurCitySeeder');
const { seedKalimantanBaratCities } = require('./city/KalimantanBaratCitySeeder');
const { seedKalimantanSelatanCities } = require('./city/KalimantanSelatanCitySeeder');
const { seedKalimantanTengahCities } = require('./city/KalimantanTengahCitySeeder');
const { seedKalimantanTimurCities } = require('./city/KalimantanTimurCitySeeder');
const { seedKalimantanUtaraCities } = require('./city/KalimantanUtaraCitySeeder');
const { seedKepulauanBangkaBelitungCities } = require('./city/KepulauanBangkaBelitungCitySeeder');
const { seedKepulauanRiauCities } = require('./city/KepulauanRiauCitySeeder');
const { seedLampungCities } = require('./city/LampungCitySeeder');
const { seedMalukuCities } = require('./city/MalukuCitySeeder');
const { seedMalukuUtaraCities } = require('./city/MalukuUtaraCitySeeder');
const { seedNusaTenggaraBaratCities } = require('./city/NusaTenggaraBaratCitySeeder');
const { seedNusaTenggaraTimurCities } = require('./city/NusaTenggaraTimurCitySeeder');
const { seedPapuaCities } = require('./city/PapuaCitySeeder');
const { seedPapuaBaratCities } = require('./city/PapuaBaratCitySeeder');
const { seedPapuaBaratDayaCities } = require('./city/PapuaBaratDayaCitySeeder');
const { seedPapuaPegununganCities } = require('./city/PapuaPegununganCitySeeder');
const { seedPapuaTengahCities } = require('./city/PapuaTengahCitySeeder');
const { seedRiauCities } = require('./city/RiauCitySeeder');
const { seedSulawesiBaratCities } = require('./city/SulawesiBaratCitySeeder');
const { seedSulawesiSelatanCities } = require('./city/SulawesiSelatanCitySeeder');
const { seedSulawesiTengahCities } = require('./city/SulawesiTengahCitySeeder');
const { seedSulawesiTenggaraCities } = require('./city/SulawesiTenggaraCitySeeder');
const { seedSulawesiUtaraCities } = require('./city/SulawesiUtaraCitySeeder');
const { seedSumateraBaratCities } = require('./city/SumateraBaratCitySeeder');
const { seedSumateraSelatanCities } = require('./city/SumateraSelatanCitySeeder');
const { seedSumateraUtaraCities } = require('./city/SumateraUtaraCitySeeder');
const { seedUsers } = require('./UserSeeder.js');
const { seedVendors } = require('./VendorSeeder.js');
const seedUserAreas = require('./UserAreaSeeder.js');
const { seedHospitals } = require('./HospitalSeeder.js');

async function main() {
    await seedProvinces();
    await seedAcehCities();
    await seedBaliCities();
    await seedBantenCities();
    await seedBengkuluCities();
    await seedDIYogyakartaCities();
    await seedDKIJakartaCities();
    await seedGorontaloCities();
    await seedJambiCities();
    await seedJawaBaratCities();
    await seedJawaTengahCities();
    await seedJawaTimurCities();
    await seedKalimantanBaratCities();
    await seedKalimantanSelatanCities();
    await seedKalimantanTengahCities();
    await seedKalimantanTimurCities();
    await seedKalimantanUtaraCities();
    await seedKepulauanBangkaBelitungCities();
    await seedKepulauanRiauCities();
    await seedLampungCities();
    await seedMalukuCities();
    await seedMalukuUtaraCities();
    await seedNusaTenggaraBaratCities();
    await seedNusaTenggaraTimurCities();
    await seedPapuaCities();
    await seedPapuaBaratCities();
    await seedPapuaBaratDayaCities();
    await seedPapuaPegununganCities();
    await seedPapuaTengahCities();
    await seedRiauCities();
    await seedSulawesiBaratCities();
    await seedSulawesiSelatanCities();
    await seedSulawesiTengahCities();
    await seedSulawesiTenggaraCities();
    await seedSulawesiUtaraCities();
    await seedSumateraBaratCities();
    await seedSumateraSelatanCities();
    await seedSumateraUtaraCities();
    await seedUsers();
    await seedVendors();
    await seedUserAreas();
    await seedHospitals();
    await seedVendors();
}

main().then(() => {
    console.log('✅ Seeding completed');
    return prisma.$disconnect();
}).catch((e) => {
    console.error('❌ Seeding error:', e);
    return prisma.$disconnect().then(() => process.exit(1));
});