import { jsx as _jsx } from "react/jsx-runtime";
import { ErrorPagination } from './ErrorPagination';
import { withShadowPortal } from '../../../storybook/with-shadow-portal';
import { useState } from 'react';
const meta = {
    title: 'ErrorPagination',
    component: ErrorPagination,
    parameters: {
        layout: 'centered'
    },
    decorators: [
        withShadowPortal
    ]
};
export default meta;
// Mock errors for stories
const mockErrors = [
    {
        id: 1,
        runtime: true,
        error: new Error('First error'),
        frames: []
    },
    {
        id: 2,
        runtime: true,
        error: new Error('Second error'),
        frames: []
    },
    {
        id: 3,
        runtime: true,
        error: new Error('Third error'),
        frames: []
    }
];
export const SingleError = {
    render: function ErrorPaginationStory() {
        const [activeIdx, setActiveIdx] = useState(0);
        return /*#__PURE__*/ _jsx(ErrorPagination, {
            activeIdx: activeIdx,
            readyErrors: [
                mockErrors[0]
            ],
            onActiveIndexChange: setActiveIdx
        });
    }
};
export const MultipleErrors = {
    render: function ErrorPaginationStory() {
        const [activeIdx, setActiveIdx] = useState(1);
        return /*#__PURE__*/ _jsx(ErrorPagination, {
            activeIdx: activeIdx,
            readyErrors: mockErrors,
            onActiveIndexChange: setActiveIdx
        });
    }
};
export const LastError = {
    render: function ErrorPaginationStory() {
        const [activeIdx, setActiveIdx] = useState(2);
        return /*#__PURE__*/ _jsx(ErrorPagination, {
            activeIdx: activeIdx,
            readyErrors: mockErrors,
            onActiveIndexChange: setActiveIdx
        });
    }
};

//# sourceMappingURL=ErrorPagination.stories.js.map