hunk.code_window:                 window.location.href = message.url;
                 } else if (message.type === 'notification_click') {
                   if (this.listeners.notification_click) {
                     this.listeners.notification_click(message.notification);
                   }
                 }
               },
               enablePublicMethods: true, // Enable methods within iframe hosted page
  
hunk.labels: keep keep keep keep add keep keep keep
hunk.after_edit:               } else if (message.type === 'action_click') {
                   if (this.listeners.action_click) {
                     this.listeners.action_click({
                       templateIdentifier: message.templateIdentifier,
                       type: message.resultType,
                       notification: message.notification,
                     });
                   }
  
hunk.file_path: libs/embed/src/embed.ts
hunk.type: add
file: import { IMessage } from '@novu/shared';
  
  export function sendUrlChange(url: string) {
    if (!window.parentIFrame) return;
    window.parentIFrame.sendMessage({
      type: 'url_change',
      url,
    });
  }
  
  export function sendNotificationClick(notification: IMessage) {
    if (!window.parentIFrame) return;
    window.parentIFrame.sendMessage({
      type: 'notification_click',
      notification,
    });
  }
  
  export function unseenChanged(unseenCount: number) {
    if ('parentIFrame' in window) {
      // eslint-disable-next-line @typescript-eslint/no-explicit-any
      (window as any).parentIFrame.sendMessage({
        type: 'unseen_count_changed',
        count: unseenCount,
      });
    }
  }
  