import Snackbar_default from "./Snackbar.js";
import { c } from "react/compiler-runtime";
import React, { useMemo } from "react";
import { jsx } from "react/jsx-runtime";
var ErrorSnackbar_default = (r) => {
	let i = c(3), { error: a } = r, o;
	bb0: {
		if (!a) {
			o = null;
			break bb0;
		}
		if (typeof a == "string") {
			o = a;
			break bb0;
		} else if (a instanceof Error) {
			o = a.message;
			break bb0;
		}
		o = "An unexpected error occurred.";
	}
	let s = o, l = !!a, u;
	return i[0] !== s || i[1] !== l ? (u = /* @__PURE__ */ jsx(Snackbar_default, {
		message: s,
		variant: "error",
		duration: 4e3,
		position: "bottom-center",
		show: l
	}), i[0] = s, i[1] = l, i[2] = u) : u = i[2], u;
};
export { ErrorSnackbar_default as default };
