import _extends from "@babel/runtime/helpers/extends";
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
import React, { useState } from 'react';
import { addStoryInGroup, MARKETING } from '../../../.storybook/utils';
import MarketingDialog from './MarketingDialog';
import Button from '../button';
export default {
  component: MarketingDialog,
  title: addStoryInGroup(MARKETING, 'MarketingDialog'),
  parameters: {
    design: {
      type: 'figma',
      url: 'https://www.figma.com/file/6nbw3mXc6VpIOYrbmUxn8C/Teamleader-Marketing-components?node-id=926%3A5336'
    }
  }
};
export var Basic = function Basic(props) {
  var _useState = useState(false),
      _useState2 = _slicedToArray(_useState, 2),
      dialogOpen = _useState2[0],
      setDialogOpen = _useState2[1];

  var toggleDialog = function toggleDialog() {
    setDialogOpen(function (dialogOpen) {
      return !dialogOpen;
    });
  };

  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
    onClick: toggleDialog,
    label: "Open a dialog"
  }), /*#__PURE__*/React.createElement(MarketingDialog, _extends({}, props, {
    active: dialogOpen,
    onCloseClick: toggleDialog,
    onEscKeyDown: toggleDialog,
    onOverlayClick: toggleDialog
  })));
};
Basic.args = {
  active: true,
  title: 'Discover our packages for free',
  graphic: /*#__PURE__*/React.createElement("iframe", {
    src: "https://fast.wistia.net/embed/iframe/f7928s2ype?controlsVisibleOnLoad=false&playButton=true"
  }),
  subtitle: 'Create multiple quotations',
  body: /*#__PURE__*/React.createElement(React.Fragment, null, "Switch to a package and improve your sales process by ", /*#__PURE__*/React.createElement("strong", null, "creating and sending multiple quotations"), " in one deal."),
  primaryAction: {
    children: 'Try for free',
    onClick: function onClick() {
      return console.log('primaryAction.onClick');
    }
  },
  secondaryAction: {
    children: 'Read more',
    onClick: function onClick() {
      return console.log('secondaryAction.onClick');
    }
  }
};