import { p as ensure_array_like, e as attr_class, a8 as stringify, d as attr, r as escape_html } from './dev-B6xUe35c.js';
import 'node:module';
import { p as notifications } from './theme-state.svelte-BsNoJAjT.js';

//#region src/lib/components/common/UpdateBanner.svelte
function UpdateBanner($$renderer, $$props) {
	$$renderer.component(($$renderer) => {
		$$renderer.push("<!--[-1-->");
		$$renderer.push(`<!--]-->`);
	});
}
//#endregion
//#region src/lib/components/common/Toast.svelte
function Toast($$renderer, $$props) {
	$$renderer.component(($$renderer) => {
		function kindLabel(t) {
			if (t.kind === "success") return "Success";
			if (t.kind === "error") return "Error";
			return "Notice";
		}
		if (notifications.toasts.length > 0) {
			$$renderer.push("<!--[0-->");
			$$renderer.push(`<div class="toast-stack svelte-c82lj3" aria-live="polite"><!--[-->`);
			const each_array = ensure_array_like(notifications.toasts);
			for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
				let t = each_array[$$index];
				$$renderer.push(`<div${attr_class(`toast toast-${stringify(t.kind)}`, "svelte-c82lj3")}${attr("role", t.kind === "error" ? "alert" : "status")}${attr("aria-live", t.kind === "error" ? "assertive" : "polite")}><span class="toast-icon svelte-c82lj3" aria-hidden="true">`);
				if (t.kind === "success") {
					$$renderer.push("<!--[0-->");
					$$renderer.push(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>`);
				} else if (t.kind === "error") {
					$$renderer.push("<!--[1-->");
					$$renderer.push(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>`);
				} else {
					$$renderer.push("<!--[-1-->");
					$$renderer.push(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>`);
				}
				$$renderer.push(`<!--]--> <span class="sr-only svelte-c82lj3">${escape_html(kindLabel(t))}:</span></span> <span class="toast-message svelte-c82lj3">${escape_html(t.message)}</span> <button type="button" class="toast-dismiss svelte-c82lj3" aria-label="Dismiss">×</button></div>`);
			}
			$$renderer.push(`<!--]--></div>`);
		} else $$renderer.push("<!--[-1-->");
		$$renderer.push(`<!--]-->`);
	});
}
//#endregion
//#region src/routes/+layout.svelte
function _layout($$renderer, $$props) {
	$$renderer.component(($$renderer) => {
		let { children } = $$props;
		UpdateBanner($$renderer);
		$$renderer.push(`<!----> `);
		children?.($$renderer);
		$$renderer.push(`<!----> `);
		Toast($$renderer);
		$$renderer.push(`<!---->`);
	});
}

export { _layout as default };
//# sourceMappingURL=_layout.svelte-oFWL-MU8.js.map
