import { Meta } from "@storybook/react";
import { ToolbarItemProps } from "./ToolbarItemProps";
import ToolbarItem from "./ToolbarItem";

export default {
  title: "Design System/Buttons/Toolbar/ToolbarItem",
  component: ToolbarItem,
  tags: ["autodocs"],
  parameters: {
    docs: {
      description: {
        component:
          'The `ToolbarItem` component is a wrapper for the [KendoReact ToolbarItem component](https://www.telerik.com/kendo-react-ui/components/buttons/api/ToolbarItem/).  \n\n```javascript\nimport { ToolbarItem } from "@renault-ui-library"\n```',
      },
    },
  },
  argTypes: {
    dataTestId: {
      control: { type: "text" },
      description: "Specifies the data-test-id attribute for testing purposes.",
    },
    children: {
      control: { type: "text" },
      description: "Children nodes for the ToolbarItem component",
    },
    className: {
      control: { type: "text" },
      description: "Additional classes for the ToolbarItem component",
    },
    id: {
      control: { type: "text" },
      description: "ID attribute for the ToolbarItem component",
    },
    style: {
      control: { type: "object" },
      description: "CSS styles for the ToolbarItem component",
    },
  },
} as Meta;

export const Default = (args: ToolbarItemProps): JSX.Element => (
  <ToolbarItem {...args} />
);
Default.args = {
  dataTestId: "toolbar-item-data-testid",
  children: "ToolbarItem Content",
};
