"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.assetUrl = exports.assetPublicBaseUrl = exports.assetStorageDir = void 0;
const path_1 = __importDefault(require("path"));
exports.assetStorageDir = path_1.default.resolve(process.env.ASSET_STORAGE_DIR || path_1.default.join(process.cwd(), 'storage'));
exports.assetPublicBaseUrl = (process.env.ASSET_PUBLIC_BASE_URL || '/assets').replace(/\/$/, '');
const assetUrl = (storageKey) => `${exports.assetPublicBaseUrl}/${storageKey
    .split('/')
    .map((segment) => encodeURIComponent(segment))
    .join('/')}`;
exports.assetUrl = assetUrl;
//# sourceMappingURL=assets.js.map