import React, { useContext } from "react";
import { NotificationCardHeaderControls } from "./NotificationCardHeaderControls";
import { NotificationCardHeaderLogo } from "./NotificationCardHeaderLogo";
import { NotificationsContext } from "../../../notificationsContext";
import { SelectionMode } from "../../../constants";
import { CheckButton } from "../CheckButton";
import { ErrorBoundary } from "../../../../common/ErrorBoundary";
export const NotificationCardHeaderShell = ({ notification, removeNotification, uiContext = "center", children, }) => {
    const notificationsContext = useContext(NotificationsContext);
    const { selectionMode } = notificationsContext;
    return (React.createElement("div", { className: "notification-card__header" },
        children ? (React.createElement(ErrorBoundary, null,
            selectionMode === SelectionMode.SELECTION ? React.createElement(CheckButton, { notification: notification }) : React.createElement(React.Fragment, null),
            children)) : (React.createElement(React.Fragment, null,
            selectionMode === SelectionMode.SELECTION ? (React.createElement(CheckButton, { notification: notification })) : (React.createElement(NotificationCardHeaderLogo, { headerLogo: notification.headerLogo })),
            React.createElement("div", { className: "notification-card__title" }, notification.title))),
        React.createElement(NotificationCardHeaderControls, { notification: notification, removeNotification: removeNotification, uiContext: uiContext })));
};
//# sourceMappingURL=NotificationCardHeaderShell.js.map