/**
 * PlatformAdapter — interface for platform-specific integrations.
 *
 * Each supported host platform (Shopify, WordPress, etc.) implements this
 * interface so the runtime can react to platform-specific lifecycle events
 * (section load/unload, theme changes, etc.) without coupling to any single
 * platform's API surface.
 */
export interface PlatformAdapter {
    /** Human-readable platform name, e.g. "shopify" */
    readonly name: string;
    /**
     * Synchronously detect whether the current page belongs to this platform.
     * Must be safe to call in any environment (returns false when unsure).
     */
    detect(): boolean;
    /**
     * Async initialization hook. Called once after the adapter is selected.
     * May wait for platform-specific readiness signals (e.g. Shopify sections).
     */
    onInit(): Promise<void>;
    /**
     * Called by the runtime when a region's DOM has been mutated.
     */
    onRegionMutated(regionId: string): void;
    /**
     * Returns a CSS-selector scope prefix for the given anchor element,
     * based on the platform's section/region structure.
     * Returns empty string when the anchor is not inside a known section.
     */
    getAnchorScope(anchor: Element): string;
    /**
     * Subscribe to "region is about to unload" events.
     * Returns an unsubscribe function.
     */
    onRegionWillUnload(callback: (regionId: string) => void): () => void;
    /**
     * Subscribe to "region finished loading" events.
     * Returns an unsubscribe function.
     */
    onRegionDidLoad(callback: (regionId: string) => void): () => void;
    /**
     * Tear down all listeners and internal state.
     */
    destroy(): void;
}
