"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generatePaymentReference = generatePaymentReference;
exports.generateReceiptNumber = generateReceiptNumber;
exports.generateVoucherCode = generateVoucherCode;
exports.generateSessionKey = generateSessionKey;
const crypto_1 = require("crypto");
function generatePaymentReference() {
    const timestamp = Date.now().toString(36).toUpperCase().slice(-8);
    const random6 = (0, crypto_1.randomInt)(100000, 999999).toString();
    return `PAY-${timestamp}-${random6}`;
}
function generateReceiptNumber() {
    const timestamp = Date.now().toString(36).toUpperCase().slice(-8);
    const random4 = (0, crypto_1.randomInt)(1000, 9999).toString();
    return `RCP-${timestamp}-${random4}`;
}
function generateVoucherCode(prefix = 'VCH') {
    const part1 = (0, crypto_1.randomBytes)(2).toString('hex').toUpperCase();
    const part2 = (0, crypto_1.randomBytes)(2).toString('hex').toUpperCase();
    return `${prefix}-${part1}-${part2}`;
}
function generateSessionKey() {
    return (0, crypto_1.randomBytes)(16).toString('hex');
}
