"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.buildDocsTopicWebUrl = buildDocsTopicWebUrl;
exports.openDocsTopicWeb = openDocsTopicWeb;
const browser_1 = require("../core/browser");
const branding_1 = require("../core/branding");
function buildDocsTopicWebUrl(doc) {
    return `${branding_1.PACKAGE_GITHUB_BASE_URL}/blob/main/${doc.path
        .split("/")
        .map((segment) => encodeURIComponent(segment))
        .join("/")}`;
}
async function openDocsTopicWeb(doc) {
    const url = buildDocsTopicWebUrl(doc);
    await (0, browser_1.openUrlInBrowser)(url);
    return url;
}
