import Toast from 'react-native-toast-message';

export const showSuccess = (message?: string) => {
  const text = (message ?? '').trim() || 'Action completed successfully';
  Toast.show({
    type: 'success',
    text1: text,
  });
};

export const showError = (message?: string) => {
  const text = (message ?? '').trim() || 'Something went wrong';
  Toast.show({
    type: 'error',
    text1: text,
  });
};
export const showWarning = (message?: string) => {
  const text = (message ?? '').trim() || 'Please check this';
  Toast.show({
    type: 'warning',
    text1: text,
  });
};
export const showInfo = (message?: string) => {
  const text = (message ?? '').trim() || 'Here is some information';
  Toast.show({
    type: 'info',
    text1: text,
  });
};