package com.yourname.premiumah.util;

import java.security.SecureRandom;

public final class IdGenerator {
    private static final char[] ALPHABET = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789".toCharArray();
    private static final SecureRandom RANDOM = new SecureRandom();

    private IdGenerator() {
    }

    public static String listingId() {
        return "AH-" + random(8);
    }

    public static String claimId() {
        return "CL-" + random(10);
    }

    private static String random(int length) {
        char[] chars = new char[length];
        for (int i = 0; i < length; i++) {
            chars[i] = ALPHABET[RANDOM.nextInt(ALPHABET.length)];
        }
        return new String(chars);
    }
}
