import { prisma } from "@/lib/prisma";

const defaultCurrencies = [
  { code: "IDR", name: "Indonesian Rupiah", description: "Mata uang default sistem." },
  { code: "USD", name: "US Dollar", description: "Mata uang internasional umum." },
  { code: "EUR", name: "Euro", description: "Mata uang utama kawasan Euro." },
  { code: "GBP", name: "British Pound Sterling", description: "Mata uang utama Inggris." },
  { code: "JPY", name: "Japanese Yen", description: "Mata uang utama Jepang." },
  { code: "CNY", name: "Chinese Yuan Renminbi", description: "Mata uang utama Tiongkok." },
  { code: "HKD", name: "Hong Kong Dollar", description: "Mata uang utama Hong Kong." },
  { code: "SGD", name: "Singapore Dollar", description: "Mata uang regional umum." },
  { code: "AUD", name: "Australian Dollar", description: "Mata uang utama Australia." },
  { code: "NZD", name: "New Zealand Dollar", description: "Mata uang utama Selandia Baru." },
  { code: "CAD", name: "Canadian Dollar", description: "Mata uang utama Kanada." },
  { code: "CHF", name: "Swiss Franc", description: "Mata uang utama Swiss." },
  { code: "SEK", name: "Swedish Krona", description: "Mata uang utama Swedia." },
  { code: "NOK", name: "Norwegian Krone", description: "Mata uang utama Norwegia." },
  { code: "DKK", name: "Danish Krone", description: "Mata uang utama Denmark." },
  { code: "PLN", name: "Polish Zloty", description: "Mata uang utama Polandia." },
  { code: "CZK", name: "Czech Koruna", description: "Mata uang utama Ceko." },
  { code: "HUF", name: "Hungarian Forint", description: "Mata uang utama Hungaria." },
  { code: "AED", name: "UAE Dirham", description: "Mata uang utama Uni Emirat Arab." },
  { code: "SAR", name: "Saudi Riyal", description: "Mata uang utama Arab Saudi." },
  { code: "QAR", name: "Qatari Riyal", description: "Mata uang utama Qatar." },
  { code: "KWD", name: "Kuwaiti Dinar", description: "Mata uang utama Kuwait." },
  { code: "BHD", name: "Bahraini Dinar", description: "Mata uang utama Bahrain." },
  { code: "OMR", name: "Omani Rial", description: "Mata uang utama Oman." },
  { code: "INR", name: "Indian Rupee", description: "Mata uang utama India." },
  { code: "PKR", name: "Pakistani Rupee", description: "Mata uang utama Pakistan." },
  { code: "BDT", name: "Bangladeshi Taka", description: "Mata uang utama Bangladesh." },
  { code: "KRW", name: "South Korean Won", description: "Mata uang utama Korea Selatan." },
  { code: "TWD", name: "New Taiwan Dollar", description: "Mata uang utama Taiwan." },
  { code: "THB", name: "Thai Baht", description: "Mata uang utama Thailand." },
  { code: "MYR", name: "Malaysian Ringgit", description: "Mata uang utama Malaysia." },
  { code: "PHP", name: "Philippine Peso", description: "Mata uang utama Filipina." },
  { code: "VND", name: "Vietnamese Dong", description: "Mata uang utama Vietnam." },
  { code: "KHR", name: "Cambodian Riel", description: "Mata uang utama Kamboja." },
  { code: "LAK", name: "Lao Kip", description: "Mata uang utama Laos." },
  { code: "MMK", name: "Myanmar Kyat", description: "Mata uang utama Myanmar." },
  { code: "ZAR", name: "South African Rand", description: "Mata uang utama Afrika Selatan." },
  { code: "NGN", name: "Nigerian Naira", description: "Mata uang utama Nigeria." },
  { code: "EGP", name: "Egyptian Pound", description: "Mata uang utama Mesir." },
  { code: "KES", name: "Kenyan Shilling", description: "Mata uang utama Kenya." },
  { code: "TRY", name: "Turkish Lira", description: "Mata uang utama Turki." },
  { code: "ILS", name: "Israeli New Shekel", description: "Mata uang utama Israel." },
  { code: "MXN", name: "Mexican Peso", description: "Mata uang utama Meksiko." },
  { code: "BRL", name: "Brazilian Real", description: "Mata uang utama Brasil." },
  { code: "ARS", name: "Argentine Peso", description: "Mata uang utama Argentina." },
  { code: "CLP", name: "Chilean Peso", description: "Mata uang utama Chili." },
  { code: "COP", name: "Colombian Peso", description: "Mata uang utama Kolombia." },
  { code: "PEN", name: "Peruvian Sol", description: "Mata uang utama Peru." }
];

export async function ensureDefaultCurrencies() {
  await prisma.currency.createMany({
    data: defaultCurrencies.map((currency) => ({
      ...currency,
      status: "ACTIVE"
    })),
    skipDuplicates: true
  });
}
