import { Meta, StoryObj } from "@storybook/react"
import { NumberDisplay } from "./NumberDisplay"

type Story = StoryObj<typeof NumberDisplay>

const meta: Meta<typeof NumberDisplay> = {
  title: "Design System/NumberDisplay",
  component: NumberDisplay,
  args: {
    value: 123,
  },
}

export default meta

export const Default: Story = {}

export const WithPrefix: Story = {
  args: {
    prefix: "$",
  },
}

export const WithSuffix: Story = {
  args: {
    suffix: "ETH",
  },
}

export const Null: Story = {
  args: {
    value: null,
  },
}

export const LargeNumberDisplay: Story = {
  args: {
    value: 1234567890,
  },
}

export const Custom: Story = {
  args: {
    value: 0.3333333,
    display: "percent",
    custom: {
      maximumFractionDigits: 3,
    },
  },
}
