import { Meta } from "@storybook/react";
import { ListViewHeaderProps } from "./ListViewHeaderProps";
import ListViewHeader from "./ListViewHeader";

export default {
  title: "Design System/ListView/ListViewHeader",
  component: ListViewHeader,
  tags: ["autodocs"],
  parameters: {
    docs: {
      description: {
        component:
          'ListViewHeader component is a functional component that accepts several properties. \n\n```javascript\nimport { ListViewHeader } from "@renault-ui-library"\n```\n',
      },
    },
  },
  argTypes: {
    dataTestId: {
      control: { type: "text" },
      description: "Specifies the data-test-id attribute for testing purposes.",
    },
    children: {
      control: { type: "text" },
      description:
        "Sets the ListViewHeader children elements. It is of type `React.ReactNode`.",
    },
    className: {
      control: { type: "text" },
      description:
        "Adds additional classes to the ListViewHeader. It is of type `string`.",
    },
    style: {
      control: { type: "object" },
      description:
        "Adds additional CSS styles to the ListViewHeader. It is of type `React.CSSProperties`.",
    },
  },
} as Meta;

export const Default = (args: ListViewHeaderProps): JSX.Element => (
  <ListViewHeader {...args} />
);

Default.args = {
  dataTestId: "list-view-header-data-testid",
  children: "ListViewHeader",
  className: "default-class",
  style: { padding: "10px", backgroundColor: "lightgray" },
};
