hunk.code_window:   tabs?: NotificationCenterContentComponentProps['tabs'];
     showUserPreferences?: NotificationCenterContentComponentProps['showUserPreferences'];
     allowedNotificationActions?: NotificationCenterContentComponentProps['allowedNotificationActions'];
     popover?: {
       offset?: number;
       position?: FloatingPosition;
     };
     theme?: NotificationCenterContentComponentProps['theme'];
  
hunk.labels: keep keep keep replace keep keep keep keep
hunk.after_edit:   popoverConfig?: {
  
hunk.file_path: packages/notification-center-vue/src/lib/notification-center-component/NotificationCenterComponent.vue
hunk.type: replace
file: import { Injectable, Logger } from '@nestjs/common';
  
  import { LaunchDarklyService } from './launch-darkly.service';
  
  import {
    FeatureFlagsKeysEnum,
    IFeatureFlagContext,
    IFeatureFlagsService,
  } from './types';
  
  const LOG_CONTEXT = 'FeatureFlagsService';
  
  export enum FeatureFlagsProvidersEnum {
    LAUNCH_DARKLY = 'LaunchDarkly',
  }
  
  const featureFlagsProviders = {
    [FeatureFlagsProvidersEnum.LAUNCH_DARKLY]: LaunchDarklyService,
  };
  
  @Injectable()
  export class FeatureFlagsService {
    private service: IFeatureFlagsService;
  
    constructor() {
      Logger.verbose('Feature Flags service initialized', LOG_CONTEXT);
  
      // TODO: In the future we can replace the object key here for an environment variable
      const service =
        featureFlagsProviders[FeatureFlagsProvidersEnum.LAUNCH_DARKLY];
  
      if (service) {
        this.service = new service();
      }
    }
  
    public async gracefullyShutdown(): Promise<void> {
      if (this.isServiceEnabled()) {
        try {
          await this.service.gracefullyShutdown();
          Logger.log(
            'Feature Flags service has been gracefully shut down',
            LOG_CONTEXT
          );
        } catch (error) {
          Logger.error(
            'Feature Flags service has failed when shut down',
            LOG_CONTEXT,
            error
          );
        }
      }
    }
  
    /**
     *  Feature Flags precedence will be this way:
     *  - Feature Flag service defined value
     *  - Feature Flag service cache stored value
     *  - Default value with the value provided by Novu's environment variable if set
     *  - Default value with the value provided by the hardcoded fallback
     */
    public async get<T>(
      key: FeatureFlagsKeysEnum,
      defaultValue: T,
      context: IFeatureFlagContext
    ): Promise<T> {
      if (!this.isServiceEnabled()) {
        return defaultValue;
      }
  
      // TODO: Select here which context we will need in the future
      return (await this.service.getWithUserContext(
        key,
        defaultValue,
        context.userId
      )) satisfies T;
    }
  
    private isServiceEnabled(): boolean {
      return this.service && this.service.isEnabled;
    }
  
    public async onModuleInit(): Promise<void> {
      if (this.isServiceEnabled()) {
        try {
          await this.service.initialize();
          Logger.log(
            'Feature Flags service has been successfully initialized',
            LOG_CONTEXT
          );
        } catch (error) {
          Logger.error(
            'Feature Flags service has failed when initialized',
            LOG_CONTEXT,
            error
          );
        }
      }
    }
  }
  