File size: 976 Bytes
8b7b267
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/**
 * Toast Helper Functions
 * Simple wrapper around Toast class for easy usage
 */

import Toast from './toast.js';

/**
 * Show toast notification
 */
export function showToast(icon, message, type = 'info') {
  // Initialize toast if needed
  Toast.init();
  
  // Convert icon+message format to standard toast
  const fullMessage = icon ? `${icon} ${message}` : message;
  
  return Toast.show(fullMessage, type);
}

/**
 * Show success toast
 */
export function showSuccess(message) {
  return showToast('✅', message, 'success');
}

/**
 * Show error toast
 */
export function showError(message) {
  return showToast('❌', message, 'error');
}

/**
 * Show warning toast
 */
export function showWarning(message) {
  return showToast('⚠️', message, 'warning');
}

/**
 * Show info toast
 */
export function showInfo(message) {
  return showToast('ℹ️', message, 'info');
}

export default {
  showToast,
  showSuccess,
  showError,
  showWarning,
  showInfo
};