"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * the resolved assets path is the path ot the assets folder in the running environment
 */
exports.resolveAssetsPath = (buildPath, serverName, assetsPath) => {
    const path = require('path');
    const resolvedPath = path.resolve(buildPath, serverName, assetsPath);
    return !resolvedPath.endsWith("/") ? resolvedPath + "/" : resolvedPath;
};
exports.getStaticBucketName = (stackName, assetsPath, stage) => {
    return `${stackName}-${assetsPath !== undefined ? assetsPath + "-" : ""}${stage}`;
};
exports.getBasename = () => {
    // first check whether we are a client
    if (typeof window != 'undefined' && window.__BASENAME__) {
        return window.__BASENAME__;
        // we do not delete the basename here, because we may need it at different places
        //delete window.__BASENAME__;
    }
    return process.env.STAGE_PATH !== undefined && process.env.STAGE_PATH !== "undefined" ?
        "/" + process.env.STAGE_PATH : "/";
};
//# sourceMappingURL=iso-libs.js.map