"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function browserInfo() {
    var userAgent = navigator === null || navigator === void 0 ? void 0 : navigator.userAgent;
    if (!userAgent) {
        return { userAgent: userAgent, browser: "node" };
    }
    var browser;
    var useragent = userAgent.toLowerCase();
    if (/chrom(e|ium)/.test(useragent)) {
        browser = "chrome";
    }
    else if (useragent.includes("firefox")) {
        browser = "firefox";
    }
    else if (useragent.match(/Mac/) &&
        navigator.maxTouchPoints &&
        navigator.maxTouchPoints > 2) {
        browser = "ipados";
    }
    else if (useragent.match(/iPhone|iPod/i)) {
        browser = "ios";
    }
    else if (useragent.includes("safari")) {
        browser = "safari";
    }
    else {
        browser = "other";
    }
    return { userAgent: userAgent, browser: browser };
}
exports.default = browserInfo;
//# sourceMappingURL=browser-info.js.map