import type { ComputedRef, Ref } from 'vue' import { createContext } from '.' export interface PageContext { // pages may render sidebar content in #sidebar-teleport-target instead of in the main layout when true hierarchicalSidebarAvailable: Ref showAds: Ref floatingActionBarOffsets?: { left: Ref | ComputedRef right: Ref | ComputedRef } intercomBubble?: { width: Ref | ComputedRef horizontalPadding: Ref | ComputedRef requestVerticalClearance: (id: symbol, clearance: number | null) => void } featureFlags?: { serverRamAsBytesAlwaysOn?: Ref } openExternalUrl: (url: string) => void } export const [injectPageContext, providePageContext] = createContext( 'root', 'pageContext', )