import { type HTMLAttributes, type ReactNode } from 'react'; import { type VariantProps } from 'class-variance-authority'; import { type ErrorPageMood } from './error-page-illustration'; declare const errorPageVariants: (props?: ({ layout?: "page" | "embedded" | null | undefined; surface?: "background" | "card" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; /** A host's own main action: a link (`href`) or a button (`onClick`). * The label is shown as given, so pass it already translated. A link may * also take `onClick`, e.g. to record the click: it runs, and the link * still opens. */ export type ErrorPageCustomAction = { label: string; href: string; onClick?: () => void; icon?: ReactNode; } | { label: string; onClick: () => void; href?: never; icon?: ReactNode; }; export interface ErrorPageProps extends Omit, 'title'>, VariantProps { /** `'page'` fills the viewport; `'embedded'` fills its container, under * the host's own header. Default `'page'`, or `'embedded'` with * `surface="card"`. */ layout?: VariantProps['layout']; /** `'card'` takes a card's colour, for a page set inside a `Card`, and * then defaults to `layout="embedded"` and `as="div"`. Default * `'background'`. */ surface?: VariantProps['surface']; /** HTTP status, `'offline'` for a network error in the browser, or * `'maintenance'` for planned downtime with no HTTP error behind it. * Statuses without their own copy show the generic page. */ status: number | 'offline' | 'maintenance'; /** Where "Go to the home page" leads. Default `/`. Like every link * here it may be a path on the same site or an `http(s)`, `mailto:` * or `tel:` address; anything else is replaced with `#`. */ homeHref?: string; /** Where "Log in" leads for 401 and 419. Without it, those statuses * offer "Try again" instead. */ loginHref?: string; /** Adds "Contact support". A path, a web address, `mailto:` or `tel:`. */ supportHref?: string; /** "Try again". Default: reload the page. */ onRetry?: () => void; /** Shown for support to quote, e.g. the host's X-Request-Id. */ requestId?: string; /** When planned maintenance should end, for 503 and `'maintenance'`. * Shown in the visitor's own time zone and language. Pass a `Date`, or * an ISO string with its offset (`2026-10-01T22:00:00+02:00`): without * one the browser reads it as the visitor's local time. */ backAt?: Date | string; /** The host's language. Always wins when the kit ships it. */ locale?: string; /** True when `` is only the site default, as on an error * raised before routing: the page then skips it when choosing. */ hostLocaleIsDefault?: boolean; /** Replaces the status title. Pass it already translated. */ title?: string; /** Replaces the status message. Pass it already translated. */ message?: string; /** Replaces the status's main button with the host's own, e.g. "Book * an appointment". Where the main button was Home (400, 403, 404, * 405, 410 and any status without its own copy), the home link goes * with it; where it was "Try again" or "Log in", the home link * stays as the second button. */ primaryAction?: ErrorPageCustomAction; /** Shows "Go to the home page". Default true. False hides it on every * status, leaving the status's own main button ("Try again" or "Log * in"), or `primaryAction` in its place, and "Contact support" when * `supportHref` is set. On a status whose main button was Home, that * can leave no button at all. */ showHomeLink?: boolean; /** Picks the mark's mood whatever the status, e.g. for a status * without its own copy. */ mood?: ErrorPageMood; /** Shows "Error 404" above the title. Default true. Turn it off when * the page reports an outcome inside an app rather than an HTTP * error. */ showStatusLabel?: boolean; /** Signs the page with the Alfadocs wordmark. Default true. */ showLogo?: boolean; /** Renders as `
` or as `
` when the host already has a main * landmark. Default `'main'`, or `'div'` with `surface="card"`. */ as?: 'main' | 'div'; /** Moves focus to the heading once shown, and again when the status * or `focusKey` changes. Default true. */ focusHeading?: boolean; /** Moves focus to the heading again when it changes, even under the * same status: a retry count, say, so a retry that fails the same way * is announced again. Copy that changes on its own never moves focus. */ focusKey?: string | number; /** Scrolls the heading into view, if it is not, when it takes focus. * Default false, so focus never moves the host's page. Turn it on when * the page can appear below the fold, as in a long form. */ scrollOnFocus?: boolean; /** The heading's level. Default 1; pass 2 inside an app page that * already has its own `h1`. */ headingLevel?: 1 | 2 | 3; } export declare const ErrorPage: import("react").ForwardRefExoticComponent>; export {}; //# sourceMappingURL=error-page.d.ts.map