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

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

export default defaultExport;

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

export const Primary: StoryObj<CommuteModeCardProps> =
  CommuteModeCardTemplate.bind({});
Primary.args = {
  options: {
    labels: ["63% Transit", "24% Driving", "9% Walking", "4% Biking"],
    data: [63, 24, 9, 4],
  },
};
