/**
 * MK1 Feed Store - Operations feed storage (last N events)
 */
import { eventBus } from './eventBus.js';
const MAX_FEED_EVENTS = 100;
const MAX_DISPLAY_EVENTS = 15;
class FeedStore {
    events = [];
    constructor() {
        // Subscribe to all events
        eventBus.subscribeAll((event) => {
            this.add(event);
        });
    }
    /**
     * Add event to store
     */
    add(event) {
        this.events.push(event);
        // Keep only last N events
        if (this.events.length > MAX_FEED_EVENTS) {
            this.events.shift();
        }
    }
    /**
     * Get last N events for display
     */
    getRecent(count = MAX_DISPLAY_EVENTS) {
        return this.events.slice(-count);
    }
    /**
     * Get all events
     */
    getAll() {
        return [...this.events];
    }
    /**
     * Clear all events
     */
    clear() {
        this.events = [];
    }
    /**
     * Get count
     */
    getCount() {
        return this.events.length;
    }
}
export const feedStore = new FeedStore();
//# sourceMappingURL=feedStore.js.map