function create(titleText, message = "", options = {}) {
	if (!message && titleText) {
		message = titleText;
		titleText = "";
	}

	const $oldLoader = tag.get("#__loader");
	const $oldMask = tag.get("#__loader-mask");

	if ($oldLoader) $oldLoader.remove();

	const $message = new Ref();
	const $titleSpan = new Ref();

	const $mask = $oldMask || <span className="mask" id="__loader-mask"></span>;
	const $dialog = $oldLoader || (
		<div className="prompt alert" id="__loader">
			<strong ref={$titleSpan} className="title">
				{titleText}
			</strong>
			<span className="message loader">
				<span className="loader"></span>
				<div
					ref={$message}
					className="message"
					innerHTML={DOMPurify.sanitize(message)}
					style={{ whiteSpace: "pre-wrap" }}
				></div>
			</span>
		</div>
	);

	const { timeout, oncancel } = options;
	if (typeof oncancel === "function") {
		onCancelCallback = oncancel;
	}

	if (typeof timeout === "number") {
		setTimeout(() => {
			$dialog.append(
				<div className="button-container">
					<button onclick={destroy}>{strings.cancel}</button>
				</div>,
			);
		}, timeout);
	}

	if (!$oldLoader) {
		actionStack.freeze();
		document.body.append($dialog, $mask);
		restoreTheme(true);
	}

	return {
		setTitle(title) {
			$titleSpan.textContent = title;
		},
		setMessage(message) {
			$message.innerHTML = DOMPurify.sanitize(message);
		},
		hide,
		show,
		destroy,
	};
}
Creates new loading dialog
@param {string} titleText Title text
@param {string} [message] Loading message
@param {LoaderOptions} [options] Loader options
@returns {Loader}