/**
 * In preview iframe we need to get the parent customize instance instead
 * the own one, because the API differs.
 */
function getSidebarCustomize(allowParentWindow = true) {
    return (allowParentWindow && (window as any)?.parent?.wp.customize) || (window as any)?.wp.customize;
}

export { getSidebarCustomize };
