"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.startObservabilityBlockletServer = startObservabilityBlockletServer;
const node_fs_1 = __importDefault(require("node:fs"));
const node_path_1 = __importDefault(require("node:path"));
const base_js_1 = require("./base.js");
async function startObservabilityBlockletServer(options) {
    const { app, server } = await (0, base_js_1.startServer)(options);
    app.get("/api/static/model-prices.json", (_req, res) => {
        res.set("Cache-Control", "public, max-age=86400, immutable");
        res.type("application/javascript");
        res.send(`window._modelPricesAndContextWindow = ${node_fs_1.default.readFileSync(node_path_1.default.join(__dirname, "./utils/modelPricesAndContextWindow.json"), "utf8")}`);
    });
    return { app, server };
}
