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

import BehaviorsAndActions from "./BehaviorsAndActions";
import {
  ActionSelector,
  ActionSubSelector,
  BehaviorSelector,
  BehaviorSubSelector,
} from "./components";

import {
  PopupOptions,
  GoToUrl,
  SubmitForm,
  TriggerPurchase,
  TriggerUpsell,
  ShowHide,
  CreateTag,
} from "./subselectors";

export default {
  title: "Modules|Properties/Sections/Behaviors And Actions",
  component: BehaviorsAndActions,
  excludeStories: /.*Data$/,
  subcomponents: {
    ActionSelector,
    // ActionSubSelector,
    // BehaviorSelector,
    // BehaviorSubSelector,
    PopupOptions,
    GoToUrl,
    // SubmitForm,
    // TriggerPurchase,
    // TriggerUpsell,
    // ShowHide,
    // CreateTag,
  },
};

export const Default: any = () => (
  <BehaviorsAndActions>
    <span onClick={() => action("Clicked")}>This is an action!</span>
  </BehaviorsAndActions>
);

Default.story = {
  parameters: {
    jest: ["BehaviorsAndActions"],
  },
};
