import type { CTAHistory, } from '../types/CTAHistory'; import type { CTAState, } from '../types/CTAState'; export default function createCTAHistory( ctaHistory: Partial, 'initial'>> & { initial: Initial }, ): CTAHistory { const { changes = null, initial, current = initial, previous = null, previousInitial = null, } = ctaHistory; return { changes, current, initial, previous, previousInitial, }; }