import { Meta } from "@storybook/react";
import { ListViewFooterProps } from "./ListViewFooterProps";
import ListViewFooter from "./ListViewFooter";

export default {
  title: "Design System/ListView/ListViewFooter",
  component: ListViewFooter,
  tags: ["autodocs"],
  parameters: {
    docs: {
      description: {
        component:
          'ListViewFooter component is a functional component that accepts several properties. \n\n```javascript\nimport { ListViewFooter } 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 ListViewFooter children elements. It is of type `React.ReactNode`.",
    },
    className: {
      control: { type: "text" },
      description:
        "Adds additional classes to the ListViewFooter. It is of type `string`.",
    },
    style: {
      control: { type: "object" },
      description:
        "Adds additional CSS styles to the ListViewFooter. It is of type `React.CSSProperties`.",
    },
  },
} as Meta;

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

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