import { globalShareState } from '@vben-core/shared/global-state';

function initMessageAdapter() {
  globalShareState.defineMessage({
    copyPreferencesSuccess: (title, content) => {
      void import('element-plus/es/components/notification/index').then(
        ({ ElNotification }) => {
          ElNotification({
            title,
            message: content,
            position: 'bottom-right',
            duration: 0,
            type: 'success',
          });
        },
      );
    },
  });
}

export { initMessageAdapter };
