export function createUrlProgressStatusState() {
    return {
        summaryText: null,
        slidesActive: false,
        slidesText: null,
        lastSlideRenderAt: 0,
    };
}
export function applySummaryText(state, text) {
    state.summaryText = text;
    return { renderText: state.slidesActive ? null : text };
}
export function applySlidesText(state, text, nowMs) {
    const previousSlidesText = state.slidesText;
    state.slidesActive = true;
    state.slidesText = text;
    if (previousSlidesText == null || nowMs - state.lastSlideRenderAt >= 100) {
        state.lastSlideRenderAt = nowMs;
        return { renderText: text };
    }
    return { renderText: null };
}
export function clearSlidesText(state) {
    state.slidesActive = false;
    state.slidesText = null;
    return { renderText: state.summaryText, summaryText: state.summaryText };
}
//# sourceMappingURL=progress-status-state.js.map