import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
import { useCallback } from "react";
import { ThemeProvider } from "styled-components";
import theme from "../theme/equilibrium-v2.theme";
import { Notification } from "./notification";
import { NotificationType } from "../../../types/notification";
import { NotificationProvider, useNotification, } from "../../../contexts/notification";
export default {
    component: Notification,
    title: "New/Notification",
    decorators: [
        (Story) => (_jsx(ThemeProvider, { theme: theme, children: _jsx(NotificationProvider, { children: _jsx(Story, {}) }) })),
    ],
};
export const NotificationStories = () => {
    const { notify } = useNotification();
    const handleNotify = useCallback((type) => {
        notify({
            type,
        });
    }, [notify]);
    return (_jsxs(_Fragment, { children: [_jsx(Notification, { type: NotificationType.info, title: "title", desc: "desc", actions: [{ label: "label" }] }), _jsx(Notification, { type: NotificationType.error, title: "title", desc: "desc", actions: [{ label: "label" }] }), _jsx(Notification, { type: NotificationType.inProgress, title: "title title title title title title title title title title title title title title title title ", desc: "desc desc desc desc desc desc desc desc desc desc desc desc desc desc desc desc desc desc desc desc ", actions: [{ label: "label" }], onClose: () => { } }), _jsx("button", { onClick: () => handleNotify(NotificationType.info), children: NotificationType.info }), _jsx("button", { onClick: () => handleNotify(NotificationType.error), children: NotificationType.error }), _jsx("button", { onClick: () => handleNotify(NotificationType.inProgress), children: NotificationType.inProgress })] }));
};
//# sourceMappingURL=notification.stories.js.map