import * as __WEBPACK_EXTERNAL_MODULE__chakra_ui_react__ from "@chakra-ui/react";
import * as __WEBPACK_EXTERNAL_MODULE__Accordion_mjs__ from "./Accordion.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__storybook_test__ from "@storybook/test";
const lorem = `
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
  labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
  laboris nisi ut aliquip ex ea commodo consequat.
`;
const LoremIpsum = ({ iterations = 1, ...rest })=>{
    const texts = [];
    for(let i = 0; i < iterations; i++)texts.push(/*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.Text, rest, lorem));
    return /*#__PURE__*/ React.createElement(React.Fragment, null, texts);
};
/* ESM default export */ const content_helper = LoremIpsum;
const meta = {
    title: 'Components/Accordion',
    component: __WEBPACK_EXTERNAL_MODULE__Accordion_mjs__["default"],
    parameters: {
        design: {
            type: 'figma',
            url: 'https://www.figma.com/file/bJcVrZNilxa06jYuVCGWYd/Redpanda-Design-System-2023?type=design&node-id=42-2782&mode=design'
        }
    }
};
/* ESM default export */ const Accordion_stories_rslib_entry_ = meta;
const Default = {
    args: {
        items: [
            {
                heading: 'Step 1',
                description: 'Description 1'
            },
            {
                heading: 'Step 2',
                description: 'Description 2'
            }
        ]
    },
    play: async ({ canvasElement, step })=>{
        const canvas = (0, __WEBPACK_EXTERNAL_MODULE__storybook_test__.within)(canvasElement);
        await step('Initially there should be no open items', async ()=>{
            (0, __WEBPACK_EXTERNAL_MODULE__storybook_test__.expect)(canvas.getByTestId('accordion-button-0')).toBeVisible();
            (0, __WEBPACK_EXTERNAL_MODULE__storybook_test__.expect)(canvas.getByTestId('accordion-button-0')).toBeEnabled();
            (0, __WEBPACK_EXTERNAL_MODULE__storybook_test__.expect)(canvas.getByTestId('accordion-button-1')).toBeVisible();
            (0, __WEBPACK_EXTERNAL_MODULE__storybook_test__.expect)(canvas.getByTestId('accordion-button-1')).toBeEnabled();
            (0, __WEBPACK_EXTERNAL_MODULE__storybook_test__.expect)(canvas.getByTestId('accordion-button-0')).toHaveAttribute('aria-expanded', 'false');
            (0, __WEBPACK_EXTERNAL_MODULE__storybook_test__.expect)(canvas.getByTestId('accordion-button-1')).toHaveAttribute('aria-expanded', 'false');
            (0, __WEBPACK_EXTERNAL_MODULE__storybook_test__.expect)(canvas.getByTestId('accordion-item-description-0')).not.toBeVisible();
            (0, __WEBPACK_EXTERNAL_MODULE__storybook_test__.expect)(canvas.getByTestId('accordion-item-description-1')).not.toBeVisible();
        });
        __WEBPACK_EXTERNAL_MODULE__storybook_test__.fireEvent.click(canvas.getByTestId('accordion-button-1'));
        await step('Going to step #2 shows step #2 description', async ()=>{
            (0, __WEBPACK_EXTERNAL_MODULE__storybook_test__.expect)(canvas.getByTestId('accordion-item-description-0')).not.toBeVisible();
            (0, __WEBPACK_EXTERNAL_MODULE__storybook_test__.expect)(canvas.getByTestId('accordion-item-description-1')).toHaveTextContent('Description 2');
        });
    }
};
const CompleteStep = {
    args: {
        allowToggle: true,
        items: [
            {
                heading: 'Step 1',
                description: 'Description 1'
            },
            {
                heading: 'Step 2',
                description: 'Description 2'
            }
        ],
        showCompleteStep: true
    }
};
const CustomSingle = {
    args: {
        allowToggle: true,
        allowMultiple: false,
        items: [
            {
                heading: '1. Create a peering connection',
                description: /*#__PURE__*/ React.createElement(content_helper, null)
            },
            {
                heading: '2. Find your Redpanda VPC ID',
                description: /*#__PURE__*/ React.createElement(content_helper, null)
            },
            {
                heading: '3. Create routes from Redpanda to AWS',
                description: /*#__PURE__*/ React.createElement(content_helper, null)
            }
        ],
        defaultIndex: 0,
        showCompleteStep: true,
        nextStepText: /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.Text, null, "Continue")
    }
};
const CustomMultiple = {
    args: {
        allowToggle: true,
        allowMultiple: true,
        items: [
            {
                heading: '1. Create a peering connection',
                description: /*#__PURE__*/ React.createElement(content_helper, null)
            },
            {
                heading: '2. Find your Redpanda VPC ID',
                description: /*#__PURE__*/ React.createElement(content_helper, null)
            },
            {
                heading: '3. Create routes from Redpanda to AWS',
                description: /*#__PURE__*/ React.createElement(content_helper, null)
            }
        ],
        defaultIndex: [
            0
        ],
        showCompleteStep: true,
        nextStepText: /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.Text, null, "Continue")
    }
};
const CompleteStepByProp = {
    args: {
        allowToggle: true,
        allowMultiple: true,
        items: [
            {
                heading: '1. Create a peering connection',
                description: /*#__PURE__*/ React.createElement(content_helper, null)
            },
            {
                heading: '2. Find your Redpanda VPC ID',
                description: /*#__PURE__*/ React.createElement(content_helper, null)
            },
            {
                heading: '3. Create routes from Redpanda to AWS',
                description: /*#__PURE__*/ React.createElement(content_helper, null)
            }
        ],
        completedSteps: [
            0,
            1
        ],
        defaultIndex: [
            0
        ],
        showCompleteStep: true,
        nextStepText: /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.Text, null, "Continue")
    }
};
export { CompleteStep, CompleteStepByProp, CustomMultiple, CustomSingle, Default, Accordion_stories_rslib_entry_ as default };
