import React from "react";
import { StoryFn, StoryObj, Meta } from "@storybook/react";
import { Root } from "../index";
import { AvgIncomeCard } from "./index";
import { AvgIncomeCardProps } from "./types";

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

export default defaultExport;

const Template: StoryFn<typeof AvgIncomeCard> = (args) => (
  <AvgIncomeCard {...args} />
);

export const Primary: StoryObj<AvgIncomeCardProps> = Template.bind({});
Primary.args = {
  options: {
    incomeTypes: [
      {
        variable: "avg_individual_income",
        value: 33500.0,
      },
      {
        variable: "avg_household_income",
        value: 88555.55,
      },
    ],
  },
};
