import React from "react";
import { StoryFn, StoryObj, Meta } from "@storybook/react";
import { Root, OwnersRentersCard } from "../index";
import { type OwnersRentersCardProps } from "./types";

const defaultExport: Meta<typeof Root> = {
  title: "Unofficial/Demographics/OwnersRentersCard",
  component: Root,
};

export default defaultExport;

const OwnersRentersCardTemplate: StoryFn<typeof OwnersRentersCard> = (args) => (
  <Root>
    <OwnersRentersCard {...args} />
  </Root>
);

export const Primary: StoryObj<OwnersRentersCardProps> =
  OwnersRentersCardTemplate.bind({});
Primary.args = {
  options: {
    datasets: [
      {
        label: "Owners",
        data: 20,
      },
      {
        label: "Renters",
        data: 80,
      },
    ],
  },
};
