"use strict";
// The require scope
var __webpack_require__ = {};
/************************************************************************/ // webpack/runtime/compat_get_default_export
(()=>{
    // getDefaultExport function for compatibility with non-ESM modules
    __webpack_require__.n = function(module) {
        var getter = module && module.__esModule ? function() {
            return module['default'];
        } : function() {
            return module;
        };
        __webpack_require__.d(getter, {
            a: getter
        });
        return getter;
    };
})();
// webpack/runtime/define_property_getters
(()=>{
    __webpack_require__.d = function(exports1, definition) {
        for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
            enumerable: true,
            get: definition[key]
        });
    };
})();
// webpack/runtime/has_own_property
(()=>{
    __webpack_require__.o = function(obj, prop) {
        return Object.prototype.hasOwnProperty.call(obj, prop);
    };
})();
// webpack/runtime/make_namespace_object
(()=>{
    // define __esModule on exports
    __webpack_require__.r = function(exports1) {
        if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
            value: 'Module'
        });
        Object.defineProperty(exports1, '__esModule', {
            value: true
        });
    };
})();
/************************************************************************/ var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
    CompleteStep: ()=>/* binding */ CompleteStep,
    CustomSingle: ()=>/* binding */ CustomSingle,
    Default: ()=>/* binding */ Default,
    default: ()=>/* binding */ Accordion_stories_rslib_entry_,
    CustomMultiple: ()=>/* binding */ CustomMultiple,
    CompleteStepByProp: ()=>/* binding */ CompleteStepByProp
});
const react_namespaceObject = require("@chakra-ui/react");
const external_Accordion_js_namespaceObject = require("./Accordion.js");
var external_Accordion_js_default = /*#__PURE__*/ __webpack_require__.n(external_Accordion_js_namespaceObject);
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(react_namespaceObject.Text, rest, lorem));
    return /*#__PURE__*/ React.createElement(React.Fragment, null, texts);
};
/* ESM default export */ const content_helper = LoremIpsum;
const test_namespaceObject = require("@storybook/test");
const meta = {
    title: 'Components/Accordion',
    component: external_Accordion_js_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, test_namespaceObject.within)(canvasElement);
        await step('Initially there should be no open items', async ()=>{
            (0, test_namespaceObject.expect)(canvas.getByTestId('accordion-button-0')).toBeVisible();
            (0, test_namespaceObject.expect)(canvas.getByTestId('accordion-button-0')).toBeEnabled();
            (0, test_namespaceObject.expect)(canvas.getByTestId('accordion-button-1')).toBeVisible();
            (0, test_namespaceObject.expect)(canvas.getByTestId('accordion-button-1')).toBeEnabled();
            (0, test_namespaceObject.expect)(canvas.getByTestId('accordion-button-0')).toHaveAttribute('aria-expanded', 'false');
            (0, test_namespaceObject.expect)(canvas.getByTestId('accordion-button-1')).toHaveAttribute('aria-expanded', 'false');
            (0, test_namespaceObject.expect)(canvas.getByTestId('accordion-item-description-0')).not.toBeVisible();
            (0, test_namespaceObject.expect)(canvas.getByTestId('accordion-item-description-1')).not.toBeVisible();
        });
        test_namespaceObject.fireEvent.click(canvas.getByTestId('accordion-button-1'));
        await step('Going to step #2 shows step #2 description', async ()=>{
            (0, test_namespaceObject.expect)(canvas.getByTestId('accordion-item-description-0')).not.toBeVisible();
            (0, test_namespaceObject.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(react_namespaceObject.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(react_namespaceObject.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(react_namespaceObject.Text, null, "Continue")
    }
};
var __webpack_export_target__ = exports;
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
    value: true
});
