import { SegmentChangedPayload } from '../_contract/event-payloads/segment-changed/segment-changed-payload'; /** * Registers a listener for the event from Struct PIM where the current segment has changed. * Called whenever the segment context changes, providing updated session context * (slug, language, user, segments, etc.). * * The callback receives a {@link SegmentChangedPayload} with the payload used to describe what segment changed. * Extension points might want to be notified about changes to the current segment. For example, if an extension is registered on a product tab, it will receive an event every time the user changes the segment. This can be used to update the content of the extension to reflect the change in segment. * * @example * ```ts * struct.events.onSegmentChangedEvent((ctx) => { * console.log('Segment changed to:', ctx.currentSegments); * }); * ``` */ export declare function onSegmentChangedEvent(callback: (payload: SegmentChangedPayload) => void): () => void; //# sourceMappingURL=on-segment-changed-event.d.ts.map