mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-27 21:20:58 +00:00
25 lines
558 B
JavaScript
25 lines
558 B
JavaScript
'use client';
|
|
const positions = [
|
|
"bottom-center",
|
|
"bottom-left",
|
|
"bottom-right",
|
|
"top-center",
|
|
"top-left",
|
|
"top-right"
|
|
];
|
|
function getGroupedNotifications(notifications, defaultPosition) {
|
|
return notifications.reduce(
|
|
(acc, notification) => {
|
|
acc[notification.position || defaultPosition].push(notification);
|
|
return acc;
|
|
},
|
|
positions.reduce((acc, item) => {
|
|
acc[item] = [];
|
|
return acc;
|
|
}, {})
|
|
);
|
|
}
|
|
|
|
export { getGroupedNotifications, positions };
|
|
//# sourceMappingURL=get-grouped-notifications.mjs.map
|