//#region src/index.ts
/**
* Host-overridable copy for the common HTTP error pages. Pure data — no status→render wiring
* (that is a thin host template over `ErrorState`), no `noindex`/`Retry-After` (host headers).
* 500 is the universal fallback so {@link errorCopy} always resolves.
*/
const DEFAULT_ERROR_COPY = {
	400: {
		title: "Bad request",
		message: "The request could not be understood. Check the address and try again."
	},
	401: {
		title: "Sign in required",
		message: "You need to sign in to view this page."
	},
	403: {
		title: "Access denied",
		message: "You do not have permission to view this page."
	},
	404: {
		title: "Page not found",
		message: "The page you are looking for does not exist or has moved."
	},
	429: {
		title: "Too many requests",
		message: "You have made too many requests. Please wait a moment and try again."
	},
	500: {
		title: "Something went wrong",
		message: "An unexpected error occurred on our end. Please try again later."
	},
	503: {
		title: "Temporarily unavailable",
		message: "The site is down for maintenance. Please check back shortly."
	}
};
/**
* Resolve copy for an HTTP status code: a per-code override wins, else the default for that code,
* else the 500 copy. ALWAYS resolves — an unknown code never yields `undefined` (the page never
* renders blank).
*/
function errorCopy(code, overrides) {
	return overrides?.[code] ?? DEFAULT_ERROR_COPY[code] ?? DEFAULT_ERROR_COPY[500];
}
//#endregion
export { DEFAULT_ERROR_COPY, errorCopy };
