"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DashboardLayoutNotificationList = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const BellOutlineMd_1 = require("../../icons/BellOutlineMd");
const IconButton_1 = require("../IconButton");
const NotificationList_1 = require("../NotificationList");
const useToggle_1 = require("../useToggle");
const constants_1 = require("./constants");
const styles_1 = require("./styles");
/**
 * Компонент для отображения уведомлений в хедере приложения
 */
const DashboardLayoutNotificationList = ({ unreadNotifications, ...notificationListProps }) => {
    const [isOpen, handleOpen, handleClose] = (0, useToggle_1.useToggle)();
    return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: constants_1.dashboardLayoutNotificationListClassnames.root, children: [(0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { variant: "text", color: "grey", onClick: handleOpen, className: constants_1.dashboardLayoutNotificationListClassnames.button, children: (0, jsx_runtime_1.jsx)(styles_1.StyledBadge, { badgeContent: unreadNotifications?.length, color: "error", variant: "standard", children: (0, jsx_runtime_1.jsx)(BellOutlineMd_1.BellOutlineMd, {}) }) }), (0, jsx_runtime_1.jsx)(NotificationList_1.NotificationList, { isOpen: isOpen, unreadNotifications: unreadNotifications, onClose: handleClose, ...notificationListProps })] }));
};
exports.DashboardLayoutNotificationList = DashboardLayoutNotificationList;
