import Avatar1Svg from "../assets/avatar1.svg";
import Avatar2Svg from "../assets/avatar2.svg";
import Avatar3Svg from "../assets/avatar3.svg";
import Avatar4Svg from "../assets/avatar4.svg";
import Avatar5Svg from "../assets/avatar5.svg";
import Avatar6Svg from "../assets/avatar6.svg";
import Avatar7Svg from "../assets/avatar7.svg";
import Avatar8Svg from "../assets/avatar8.svg";
import Avatar9Svg from "../assets/avatar9.svg";
import Avatar10Svg from "../assets/avatar10.svg";
import Avatar11Svg from "../assets/avatar11.svg";
import Avatar12Svg from "../assets/avatar12.svg";
import Avatar13Svg from "../assets/avatar13.svg";
import Avatar14Svg from "../assets/avatar14.svg";
import Avatar15Svg from "../assets/avatar15.svg";
import Avatar16Svg from "../assets/avatar16.svg";
import Avatar17Svg from "../assets/avatar17.svg";
import Avatar18Svg from "../assets/avatar18.svg";
import Avatar19Svg from "../assets/avatar19.svg";
import Avatar20Svg from "../assets/avatar20.svg";
import Avatar21Svg from "../assets/avatar21.svg";
import Avatar22Svg from "../assets/avatar22.svg";
import Avatar23Svg from "../assets/avatar23.svg";
import Avatar24Svg from "../assets/avatar24.svg";
export const getDevice = () => {
    let userAgent = window.navigator.userAgent;
    if (userAgent.toLowerCase().match(/android/i)) {
        return 'Android';
    }
    if (userAgent.toLowerCase().match(/iphone/i)) {
        return 'iPhone';
    }
    if (userAgent.toLowerCase().match(/ipad|ipod/i)) {
        return 'iPad';
    }
    return 'PC';
};
export const getUniqueRandomNumbers = (total, count) => {
    const numbers = new Set();
    while (numbers.size < count) {
        numbers.add(Math.floor(Math.random() * total) + 1);
    }
    return Array.from(numbers);
};
export const getRandomAvatars = (count) => {
    const avatars = [Avatar1Svg, Avatar2Svg, Avatar3Svg, Avatar4Svg, Avatar5Svg,
        Avatar6Svg, Avatar7Svg, Avatar8Svg, Avatar9Svg, Avatar10Svg,
        Avatar11Svg, Avatar12Svg, Avatar13Svg, Avatar14Svg, Avatar15Svg,
        Avatar16Svg, Avatar17Svg, Avatar18Svg, Avatar19Svg, Avatar20Svg,
        Avatar21Svg, Avatar22Svg, Avatar23Svg, Avatar24Svg];
    const avatarNos = getUniqueRandomNumbers(avatars.length, count);
    return avatarNos.map(no => {
        return avatars[no - 1];
    });
};
