/** * Best-effort "which surface is this?" for swatch-switch reports. * * Unlike the grid emitters (v-next, SSR) and the reporting library's PDP detector — each of which * knows its surface structurally — the SDK's productSwatchSwitch is a public API a merchant can call * from anywhere, so the surface has to come from the caller or be detected. * * Detection reads Shopify's own theme globals, the same object getShopifyCustomerId() already uses: * window.ShopifyAnalytics.meta.page.pageType ("product" | "collection" | "search" | …) * window.__st.p (the same value, older themes) * Verified live on a Shopify storefront 2026-08-18: "product" on a PDP, "collection" on a collection. * * Returns undefined rather than guessing when the page type is unknown or absent — non-Shopify * storefronts (BigCommerce, Magento, headless) have neither global. The server drops anything that * isn't "pdp"/"plp", so an undetected surface leaves the row unlabeled, which is the honest outcome: * a wrong label is worse than none, and those rows are still separable via the sort_by fallback. * * Both globals are stamped at page render. On an SPA route change they can go stale — which is the * behavior we want here, because a swatch switch belongs to the page it STARTED on. */ export declare function getSwatchSurface(): "pdp" | "plp" | undefined;