/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
 * @module Notification
 */
import * as React from "react";
import { Message, MessageLayout, StatusHelpers, Toast, } from "@itwin/appui-layout-react";
import { MessageLabel } from "./MessageLabel";
import { HollowIcon } from "./HollowIcon";
import { MessageContainer } from "@itwin/core-react";
/** Toast Message React component
 * @public
 * @deprecated in 3.3. Replaced by Toaster from @itwin/itwinui-react.
 */
export function ToastMessage(props) {
    const { id, messageDetails, severity, toastTarget, closeMessage } = props;
    return (React.createElement(Toast // eslint-disable-line deprecation/deprecation
    , { animateOutTo: toastTarget, onAnimatedOut: () => closeMessage(id), timeout: messageDetails.displayTime.milliseconds, content: React.createElement(Message // eslint-disable-line deprecation/deprecation
        , { status: StatusHelpers.severityToStatus(severity), icon: React.createElement(HollowIcon, { iconSpec: MessageContainer.getIconClassName(severity, true) }) },
            React.createElement(MessageLayout, null,
                React.createElement(MessageLabel, { message: messageDetails.briefMessage, className: "uifw-statusbar-message-brief" }),
                messageDetails.detailedMessage &&
                    React.createElement(MessageLabel, { message: messageDetails.detailedMessage, className: "uifw-statusbar-message-detailed" }))) }));
}
//# sourceMappingURL=ToastMessage.js.map