import * as React from "react";
import { action } from "@storybook/addon-actions";
import { withKnobs, text, boolean, select } from "@storybook/addon-knobs";

import Checkboxes from "./Checkboxes";
import { EditorMode } from "../../../../Editor/types";

import { IListItem } from "../types";

export default {
  title: "Modules|CRUD/FormBuilder/Form Fields/Checkboxes",
  component: Checkboxes,
  excludeStories: /.*data$/,
};

export const data: IListItem[] = [
  { id: "1", label: "Kyle" },
  { id: "2", label: "Linda" },
  { id: "3", label: "Mikel" },
  { id: "4", label: "Nevaeh" },
];

export const Live: any = () => (
  <Checkboxes mode={EditorMode.LIVE} data={data} />
);

export const Edit: any = () => (
  <Checkboxes mode={EditorMode.EDITOR} data={data} />
);

Live.story = {
  parameters: {
    jest: ["Checkboxes"],
  },
};
