HEX
Server: LiteSpeed
System: Linux l24.yourwebhosting.net 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64
User: turkishi (1582)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //home/turkishi/www/wp-content/plugins/learnpress/assets/src/js/lpToastify.js
/**
 * Utils functions
 *
 * @param url
 * @param data
 * @param functions
 * @since 4.3.0
 * @version 1.0.0
 */
import Toastify from 'toastify-js';
import 'toastify-js/src/toastify.css';

const argsToastify = {
	text: '',
	gravity: lpData.toast.gravity, // `top` or `bottom`
	position: lpData.toast.position, // `left`, `center` or `right`
	className: `${ lpData.toast.classPrefix }`,
	close: lpData.toast.close == 1,
	stopOnFocus: lpData.toast.stopOnFocus == 1,
	duration: lpData.toast.duration,
};
export const show = ( message, status = 'success', argsCustom ) => {
	let args = argsToastify;
	if ( argsCustom ) {
		args = { ...args, ...argsCustom };
	}

	const toastify = new Toastify( {
		...args,
		text: message,
		className: `${ lpData.toast.classPrefix } ${ status }`,
	} );
	toastify.showToast();
};