import { DispatchQueue } from "UIKit";
import { SFSafariViewController } from "SafariServices";
import { UrlLaunch } from "../interface";

export const urlLaunch : UrlLaunch = function (url : string) : void {
	let urlObject = URL(string = url);
	let vc = SFSafariViewController(url = urlObject!)
	DispatchQueue.main.async(execute = () : void => {
		UTSiOS.getCurrentViewController().present(vc, animated = true);
	});
}