"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const client_1 = require("@prisma/client");
const prisma = new client_1.PrismaClient();
async function main() {
    console.log('Seeding Payment Gateways Settings...');
    const gateways = [
        {
            gatewayName: 'RAZORPAY',
            displayName: 'Razorpay Secure Checkout',
            isEnabled: true,
            environment: 'sandbox',
            keyId: 'rzp_test_mock_key_id',
            currency: 'INR',
            sortOrder: 1,
        },
        {
            gatewayName: 'PHONEPE',
            displayName: 'PhonePe PG Payment',
            isEnabled: true,
            environment: 'sandbox',
            merchantId: 'MOCK_MERCHANT_ID',
            currency: 'INR',
            sortOrder: 2,
        },
        {
            gatewayName: 'PAYU',
            displayName: 'PayU Checkout Pay',
            isEnabled: true,
            environment: 'sandbox',
            keyId: 'MOCK_PAYU_KEY',
            currency: 'INR',
            sortOrder: 3,
        },
        {
            gatewayName: 'STRIPE',
            displayName: 'Stripe Credit/Debit Card',
            isEnabled: true,
            environment: 'sandbox',
            keyId: 'pk_test_mock_key',
            currency: 'INR',
            sortOrder: 4,
        },
        {
            gatewayName: 'PAYPAL',
            displayName: 'PayPal Remittance',
            isEnabled: true,
            environment: 'sandbox',
            clientId: 'mock_paypal_client_id',
            currency: 'USD',
            sortOrder: 5,
        },
        {
            gatewayName: 'UPI',
            displayName: 'Dynamic UPI QR Code',
            isEnabled: true,
            environment: 'sandbox',
            merchantId: 'indianbooks@okaxis',
            currency: 'INR',
            sortOrder: 6,
        },
    ];
    for (const g of gateways) {
        await prisma.paymentGatewaySetting.upsert({
            where: { gatewayName: g.gatewayName },
            update: {},
            create: g,
        });
    }
    console.log('Payment Gateways seeded successfully!');
}
main()
    .catch((e) => {
    console.error(e);
    process.exit(1);
})
    .finally(async () => {
    await prisma.$disconnect();
});
//# sourceMappingURL=seed-gateways.js.map