const store = new Map<string, Record<string, unknown>>()

export const getDraft = (key: string): Record<string, unknown> => store.get(key) ?? {}

export const setDraft = (key: string, draft: Record<string, unknown>) => store.set(key, draft)

export const clearDraft = (key: string) => store.delete(key)
