/*! ratio-ui · design system for knowledge sharing · https://github.com/losol/ratio-ui · (c) 2026 Losol AS · MPL-2.0 */
import { cn } from "../../utils/cn.js";
import "react";
import { jsx, jsxs } from "react/jsx-runtime";
//#region src/pages/ErrorPage/ErrorPage.tsx
var statusCls = {
	neutral: "bg-neutral-100 border-neutral-500 text-neutral-800",
	info: "bg-info-bg border-info-border text-info-text",
	success: "bg-success-bg border-success-border text-success-text",
	warning: "bg-warning-bg border-warning-border text-warning-text",
	error: "bg-error-bg border-error-border text-error-text"
};
function StatusIcon({ status }) {
	return /* @__PURE__ */ jsxs("svg", {
		"aria-hidden": true,
		viewBox: "0 0 24 24",
		className: "h-7 w-7 mr-2",
		children: [
			(status === "error" || status === "neutral") && /* @__PURE__ */ jsx("path", {
				d: "M12 9v4m0 4h.01M12 2a10 10 0 110 20 10 10 0 010-20z",
				stroke: "currentColor",
				strokeWidth: 2,
				fill: "none",
				strokeLinecap: "round",
				strokeLinejoin: "round"
			}),
			status === "warning" && /* @__PURE__ */ jsx("path", {
				d: "M12 9v4m0 4h.01M10.29 3.86l-8.48 14.7a1.5 1.5 0 001.29 2.24h16.18a1.5 1.5 0 001.29-2.24l-8.48-14.7a1.5 1.5 0 00-2.58 0z",
				stroke: "currentColor",
				strokeWidth: 2,
				fill: "none",
				strokeLinecap: "round",
				strokeLinejoin: "round"
			}),
			status === "info" && /* @__PURE__ */ jsx("path", {
				d: "M12 8h.01M11 12h2v4h-2z M12 2a10 10 0 110 20 10 10 0 010-20z",
				stroke: "currentColor",
				strokeWidth: 2,
				fill: "none",
				strokeLinecap: "round",
				strokeLinejoin: "round"
			}),
			status === "success" && /* @__PURE__ */ jsx("path", {
				d: "M20 6l-11 11-5-5",
				stroke: "currentColor",
				strokeWidth: 2,
				fill: "none",
				strokeLinecap: "round",
				strokeLinejoin: "round"
			})
		]
	});
}
function Root({ status = "error", fullScreen = true, className, children }) {
	return /* @__PURE__ */ jsx("div", {
		className: cn(fullScreen ? "fixed inset-0" : "relative", "bg-black/90 flex p-10"),
		children: /* @__PURE__ */ jsx("div", {
			className: cn("w-full border-l-4 p-6 self-center", statusCls[status], className),
			role: "alert",
			"aria-live": "assertive",
			children: /* @__PURE__ */ jsxs("div", {
				className: "flex items-start",
				children: [/* @__PURE__ */ jsx(StatusIcon, { status }), /* @__PURE__ */ jsx("div", {
					className: "flex-1",
					children
				})]
			})
		})
	});
}
function Title({ children }) {
	return /* @__PURE__ */ jsx("h1", {
		className: "text-2xl font-bold",
		children
	});
}
function Description({ children }) {
	return /* @__PURE__ */ jsx("p", {
		className: "mt-2",
		children
	});
}
function Extra({ children }) {
	return /* @__PURE__ */ jsx("div", {
		className: "mt-4",
		children
	});
}
function Action({ children }) {
	return /* @__PURE__ */ jsx("div", {
		className: "mt-6",
		children
	});
}
var ErrorPage = Object.assign(Root, {
	Title,
	Description,
	Extra,
	Action
});
//#endregion
export { ErrorPage };

//# sourceMappingURL=ErrorPage.js.map