import Toasts from "./components/toasts.js";
import Modals from "./components/modals.js";

import { SmartHomeApi } from "./sh/SmartHomeApi.js";

function shApiDebuging() {
	const api = new SmartHomeApi({
	  base_url: "http://shswebclient.local",
	  token: "YOUR_TOKEN",
	  timeout_ms: 3000,
	  on_unauthorized: ({ error }) => console.log("auth problem:", error),
	  proxy_path: "/proxy.php",
	});

	api.scripts.actions_list((err, data, meta) => console.log(data));
	api.scripts.scopes_list((err, data, meta) => console.log(data));
	api.devices.info(4, (err, data, meta) => console.log(data));
}


document.addEventListener("DOMContentLoaded", e => {
	console.log("App init");

	shApiDebuging();
});