import { SerializedError } from '@reduxjs/toolkit'; import { FetchBaseQueryError } from '@reduxjs/toolkit/query'; import React, { FC } from 'react'; type LinkAction = { label: string; href: string; }; type Props = { /** * An error with its own header and message. The component shows it as it is. * It has no default texts, no details and no default link. */ error?: AU.IError; /** Shows the status before the header. This applies only to `error`. */ withStatus?: boolean; /** * A raw error from a failed request. * The component shows a friendly header and message. The raw error is behind a toggle. */ fetchError?: FetchBaseQueryError; /** A raw error from code. It is shown in the same way as `fetchError`. */ serializedError?: SerializedError; /** The type of the notification. The default is `warning`. */ type?: 'warning' | 'attention' | 'confirm' | 'information'; /** * Replaces the default message. It is plain text. * Without `error`, `fetchError` and `serializedError`, the component shows this message * (and `header`) in the same layout, without a raw error and without a details toggle. * Use it for a condition that is not a failed request. */ message?: string; /** Replaces the default header. Works without a raw error in the same way as `message`. */ header?: string; /** Does not show the raw error and its toggle. Use it where the space is small. */ hideDetails?: boolean; /** * Replaces single texts of the component: header, message, status link, toggle and copy texts. * `header` and `message` have priority over these texts. * A text that is not given comes from `language`. */ texts?: Partial; /** * The language (`da` or `en`) of the texts that the component shows by itself. * Without it, the component uses the language of the page (``). */ language?: string; /** * The first link button. It opens in a new tab. * The default is a link to the system status page. * Pass `null` for no default link. */ primaryAction?: LinkAction | null; /** * A second link button. * The default is a link to support. The link depends on the signed-in user: * students get the student support page and all others get the employee support page. * When no user is signed in, the component shows one inline button * that links to a support page for all groups. * Pass `null` for no default link. */ secondaryAction?: LinkAction | null; /** Elements for the actions area of the notification. */ actions?: React.JSX.Element[]; }; type Texts = { header: string; message: string; status: string; support: string; show: string; hide: string; copy: string; copied: string; code: string; }; declare const AUErrorComponent: FC; export default AUErrorComponent; //# sourceMappingURL=AUErrorComponent.d.ts.map