import React from "react";
import { storiesOf } from "@storybook/react";
import PluginDialog from "./";
storiesOf("PluginDialog", module).add("Basic", function () {
  var renderDialog = function renderDialog(_ref) {
    var elm = _ref.elm,
        dataset = _ref.dataset,
        setInDataset = _ref.setInDataset,
        addAction = _ref.addAction,
        removeAction = _ref.removeAction,
        onSuccess = _ref.onSuccess;
    elm.innerHTML = "\n\n      Click the \"Delete All Samples\" button to delete all of your samples!\n\n      ".trim();
    addAction({
      text: "Delete All Samples",
      onClick: function onClick() {
        setInDataset(dataset, ["samples"], []);
        onSuccess("All samples deleted!");
      }
    });
  };

  return /*#__PURE__*/React.createElement(PluginDialog, {
    open: true,
    name: "Delete All Samples",
    renderDialog: renderDialog
  });
});