import * as __WEBPACK_EXTERNAL_MODULE__chakra_ui_react__ from "@chakra-ui/react";
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
import * as __WEBPACK_EXTERNAL_MODULE__Spinner_mjs__ from "./Spinner.mjs";
const meta = {
    title: 'Components/Spinner',
    component: __WEBPACK_EXTERNAL_MODULE__Spinner_mjs__["default"],
    parameters: {
        design: {
            type: 'figma',
            // TODO: Need to ask design to provide a "loading" animation from Figma
            url: 'https://www.figma.com/file/bJcVrZNilxa06jYuVCGWYd/Redpanda-Design-System-2023?type=design&node-id=23-2487&mode=design&t=zWg3lLHZrInZdU04-4'
        }
    }
};
/* ESM default export */ const Spinner_stories_rslib_entry_ = meta;
const Default = {};
const Custom = {
    args: {
        size: 'xl',
        color: 'green',
        speed: '2s'
    }
};
const Synchronized = {
    render: (props)=>{
        const [count, setCount] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(3);
        const [key, setKey] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(0); // Forces a rerender
        return /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.Stack, {
            spacing: 8
        }, /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.ButtonGroup, null, /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.Button, {
            variant: "solid",
            onClick: ()=>setCount(count + 1)
        }, "Add"), /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.Button, {
            variant: "solid",
            onClick: ()=>setCount(count - 1)
        }, "Remove"), /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.Button, {
            variant: "outline",
            onClick: ()=>setKey(key + 1)
        }, "Rerender")), Array.from({
            length: count
        }).map((_value, index)=>/*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__Spinner_mjs__["default"], {
                key: `${index}-${key}`,
                ...props,
                speed: "1s"
            })));
    }
};
export { Custom, Default, Synchronized, Spinner_stories_rslib_entry_ as default };
