import { Theme } from "@/constant";
import { Meta } from "@storybook/react";
import Popup from "./Popup";

const story: Meta = {
  title: "Components/Popup",
  component: Popup,
  argTypes: {
    theme: {
      control: "radio",
      options: Object.values(Theme),
    },
  },
  decorators: [
    (Story) => (
      <div>
        <Story />
      </div>
    ),
  ],
};

export default story;

const Template: any = (args: any) => <Popup {...args}> test</Popup>;

export const Primary = Template.bind({});
Primary.args = {
  opened: true,
  onClose: () => {
    console.log("popup.close");
  },
  title: "Log in or sign up",
  close: true,
  back: true,
  theme: Theme.DARK,
};
