/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ /* eslint-disable @typescript-eslint/no-explicit-any */ import chalk from 'chalk'; import SevenNotification from '../enums/SevenNotification'; /** * Shows styled notification based on type on terminal * @param {SevenNotification} type * @param {string} message * @param {any} data */ const showNotification = (type: SevenNotification, message: string, data?: any): void => { switch (type) { case SevenNotification.ERROR: console.error(chalk.red(message), data || ''); break; case SevenNotification.SUCCESS: console.log(chalk.green(message), data || ''); break; case SevenNotification.INFO: console.log(chalk.blue(message), data || ''); break; case SevenNotification.WARNING: console.log(chalk.yellow(message), data || ''); break; default: console.log(chalk.blue(message), data); } }; export { showNotification };