import * as __WEBPACK_EXTERNAL_MODULE__storybook_test__ from "@storybook/test";
import * as __WEBPACK_EXTERNAL_MODULE__NumberInput_mjs__ from "./NumberInput.mjs";
const meta = {
    title: 'Components/Inputs/NumberInput',
    component: __WEBPACK_EXTERNAL_MODULE__NumberInput_mjs__["default"],
    argTypes: {
        onClick: {
            action: 'clicked'
        },
        onBlur: {
            action: 'blurred'
        }
    },
    parameters: {
        design: {
            type: 'figma',
            url: 'https://www.figma.com/file/bJcVrZNilxa06jYuVCGWYd/Redpanda-Design-System-2023?type=design&node-id=23-331&mode=design&t=cVtmR0UCPQ2Em08Q-4'
        }
    }
};
/* ESM default export */ const NumberInput_stories_rslib_entry_ = meta;
const Default = {
    args: {
        name: 'someNumber',
        placeholder: '521',
        onChange: (0, __WEBPACK_EXTERNAL_MODULE__storybook_test__.fn)()
    },
    play: async ({ canvasElement, step })=>{
        const canvas = (0, __WEBPACK_EXTERNAL_MODULE__storybook_test__.within)(canvasElement);
        await step('Check defaults', async ()=>{
            (0, __WEBPACK_EXTERNAL_MODULE__storybook_test__.expect)(canvas.getByPlaceholderText('521')).toBeVisible();
            (0, __WEBPACK_EXTERNAL_MODULE__storybook_test__.expect)(canvas.getByTestId('someNumber_field')).not.toHaveValue();
        });
        await step('Change via input', async ()=>{
            __WEBPACK_EXTERNAL_MODULE__storybook_test__.fireEvent.change(canvas.getByTestId('someNumber_field'), {
                target: {
                    value: '12345'
                }
            });
            (0, __WEBPACK_EXTERNAL_MODULE__storybook_test__.expect)(canvas.getByTestId('someNumber_field')).toHaveValue('12345');
        });
        await step('Increment', async ()=>{
            __WEBPACK_EXTERNAL_MODULE__storybook_test__.fireEvent.click(canvas.getByTestId('number-input-add-icon'));
            __WEBPACK_EXTERNAL_MODULE__storybook_test__.fireEvent.focus(canvas.getByTestId('someNumber_field'));
        });
        await step('Decrement', async ()=>{
            __WEBPACK_EXTERNAL_MODULE__storybook_test__.fireEvent.click(canvas.getByTestId('number-input-minus-icon'));
            __WEBPACK_EXTERNAL_MODULE__storybook_test__.fireEvent.focus(canvas.getByTestId('someNumber_field'));
        });
    }
};
const Step = {
    args: {
        name: 'someNumber',
        min: 521,
        max: 600,
        step: 50,
        placeholder: '521'
    }
};
const NoIconButtons = {
    args: {
        name: 'someNumber',
        min: 521,
        max: 600,
        step: 50,
        placeholder: '521',
        showIconButtons: false
    }
};
export { Default, NoIconButtons, Step, NumberInput_stories_rslib_entry_ as default };
