'use client';
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
import React from 'react';
import { Toaster } from 'sonner';
import { Error } from './icons/Error.js';
import { Info } from './icons/Info.js';
import { Success } from './icons/Success.js';
import { Warning } from './icons/Warning.js';
export const ToastContainer = ({ config })=>{
    const { admin: { toast: { duration, expand, limit, position } = {} } = {} } = config;
    return /*#__PURE__*/ _jsxDEV(Toaster, {
        className: "payload-toast-container",
        closeButton: true,
        // @ts-expect-error
        dir: "undefined",
        duration: duration ?? 4000,
        expand: expand ?? false,
        gap: 8,
        icons: {
            error: /*#__PURE__*/ _jsxDEV(Error, {}, void 0, false, {
                fileName: "src/providers/ToastContainer/index.tsx",
                lineNumber: 27,
                columnNumber: 16
            }, void 0),
            info: /*#__PURE__*/ _jsxDEV(Info, {}, void 0, false, {
                fileName: "src/providers/ToastContainer/index.tsx",
                lineNumber: 28,
                columnNumber: 15
            }, void 0),
            success: /*#__PURE__*/ _jsxDEV(Success, {}, void 0, false, {
                fileName: "src/providers/ToastContainer/index.tsx",
                lineNumber: 29,
                columnNumber: 18
            }, void 0),
            warning: /*#__PURE__*/ _jsxDEV(Warning, {}, void 0, false, {
                fileName: "src/providers/ToastContainer/index.tsx",
                lineNumber: 30,
                columnNumber: 18
            }, void 0)
        },
        offset: "calc(var(--gutter-h) / 2)",
        position: position ?? 'bottom-right',
        toastOptions: {
            classNames: {
                closeButton: 'payload-toast-close-button',
                content: 'toast-content',
                error: 'toast-error',
                icon: 'toast-icon',
                info: 'toast-info',
                success: 'toast-success',
                title: 'toast-title',
                toast: 'payload-toast-item',
                warning: 'toast-warning'
            },
            unstyled: true
        },
        visibleToasts: limit ?? 5
    }, void 0, false, {
        fileName: "src/providers/ToastContainer/index.tsx",
        lineNumber: 18,
        columnNumber: 5
    }, this);
};

//# sourceMappingURL=index.js.map