// Renderers for the connector namespace picker and connector catalog pages.
// Styled to match the reference connector extension UI.
import { CATEGORY } from "./categories.mjs";
import { buildSandboxUrl } from "./sandbox.mjs";
const CONNECT_ICON = '';
// Official Azure Connector Namespace mark — a gray viewfinder frame wrapping
// two interlocking blue-gradient chain links. Path + gradient data is lifted
// verbatim from the portal's ConnectorNamespaceIcon brand asset. idSuffix keeps
// the gradient element IDs unique when the mark renders more than once per page.
export function brandMark(size = 28, idSuffix = "m") {
const g0 = `cn-g0-${idSuffix}`;
const g1 = `cn-g1-${idSuffix}`;
return ``;
}
export function baseStyles() {
return ``;
}
// ---------------------------------------------------------------------------
// Setup / Namespace Picker
// ---------------------------------------------------------------------------
export function renderSetupHtml(subscriptions = [], notice = "", capabilityToken = "", { linkedNamespace = "" } = {}) {
const hasLinkedNamespace = typeof linkedNamespace === "string" && linkedNamespace.length > 0;
const pageTitle = hasLinkedNamespace ? "Sign in to MCP Connectors" : "Select Connector Namespace";
const heading = hasLinkedNamespace ? "Sign in to see your connectors" : "Select a Connector Namespace";
const subheading = hasLinkedNamespace
? `Connector namespace ${esc(linkedNamespace)} is already linked.`
: "Choose which connector namespace to browse. This choice is saved for future sessions.";
const defaultSigninMessage = hasLinkedNamespace
? "Sign in to Azure to view and manage its connectors."
: "Sign in to Azure to load your subscriptions and connector namespaces.";
const subOptions = subscriptions.map((s) =>
``
).join("");
return `
${esc(config.gatewayName)} · RG ${esc(config.resourceGroup)}