import { ElMessage } from 'element-plus';

export const showMessage = (type, message, options = {}) => {
  const windowHeight = window.innerHeight;
  const messageHeight = 60;
  const offset = (windowHeight - messageHeight) / 2;

  ElMessage({
    message,
    type,
    plain: true,
    offset: offset,
    duration: 2000,
    // showClose: true,
    ...options
  });
};
