"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getBaseUrl = getBaseUrl;
exports.toFullUrl = toFullUrl;
exports.toFullUrls = toFullUrls;
function getBaseUrl() {
    return process.env.APP_BASE_URL || 'https://school.globaldemo.online/schoolcrmbackend';
}
function toFullUrl(relativePath) {
    if (!relativePath)
        return undefined;
    if (relativePath.startsWith('http://') || relativePath.startsWith('https://')) {
        return relativePath;
    }
    const baseUrl = getBaseUrl();
    const cleanPath = relativePath.startsWith('/') ? relativePath : `/${relativePath}`;
    return `${baseUrl}${cleanPath}`;
}
function toFullUrls(paths) {
    const result = {};
    for (const [key, value] of Object.entries(paths)) {
        result[key] = toFullUrl(value);
    }
    return result;
}
//# sourceMappingURL=url.helper.js.map