/**
 * studio-url.ts — canonical Sanity CORE-shell Studio URLs.
 *
 * Studios that live behind the unified Sanity dashboard are addressed by
 * their CORE-shell URL —
 * `https://www.sanity.io/@<org>/studio/<studioId>/<workspace>` — not by the
 * bare deploy origin (e.g. `https://admin.sanity.io`). Two reasons:
 *
 *  1. The CORE shell forwards the studio router path (including
 *     `/intent/edit/…`) into the embedded studio, so deep links resolve to
 *     the document the same as against the standalone deploy.
 *  2. In-dashboard clicks on a bare-origin link (`admin.sanity.io`) are
 *     intercepted by the CORE shell and SPA-routed, which swallows
 *     `target="_blank"`. The CORE-shell URL routes correctly instead.
 *
 * This module is the single source of truth for that URL shape so the
 * dashboard (`apps/dashboard/src/lib/sanity-config.ts`) and the Studio plugin
 * (`packages/studio/src/lib/constants.ts`) cannot drift on the org handle or
 * a studio id.
 */
/**
 * Sanity org handle — the `@<handle>` segment of a CORE-shell URL. The AILF
 * editor Studio and the editorial/website Studio live under the same org, so
 * the handle is declared once here rather than re-typed at each call site.
 */
export const SANITY_ORG_HANDLE = "oSyH1iET5";
/**
 * Build the canonical CORE-shell base URL for a Studio workspace:
 * `https://www.sanity.io/@<org>/studio/<studioId>/<workspace>`.
 *
 * Returns no trailing slash, so callers append routes directly —
 * `${coreShellStudioUrl(ref)}/intent/edit/id=<id>;type=<type>/`.
 */
export function coreShellStudioUrl(ref) {
    return `https://www.sanity.io/@${ref.orgHandle}/studio/${ref.studioId}/${ref.workspace}`;
}
/**
 * The editorial/website Studio that hosts the `next` dataset — `article`
 * documents and content releases. AILF links to it for "edit this document"
 * and "open release" affordances. Formerly addressed as the bare
 * `https://admin.sanity.io` origin; the CORE-shell URL built from this ref is
 * the canonical form.
 */
export const EDITORIAL_STUDIO_REF = {
    orgHandle: SANITY_ORG_HANDLE,
    studioId: "s6414xxopd34fx9vvgzkj49b",
    workspace: "default",
};
