/** * External dependencies */ import type { OverlaySettings } from '@nelio/popups/types'; /** * Internal dependencies */ import { DEFAULT_POPUP_METAS } from '../defaults'; export function parseOverlaySettings( value?: Partial< OverlaySettings > ): OverlaySettings { if ( ! value ) { return DEFAULT_POPUP_METAS.overlay; } if ( ! value.isEnabled ) { return { isEnabled: false }; } return { isEnabled: true, color: value.color ?? '#000000cc', }; }