import _extends from "@babel/runtime/helpers/extends";
// Copyright 1999-2021. Plesk International GmbH. All rights reserved.
import React, { useState } from 'react';
import Button from '../Button';
import Drawer from './Drawer';
import image from '../../docs/public/placeholders/placeholder_400x400.svg';
export const Basic = args => {
  const [isOpen, setIsOpen] = useState(false);
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
    onClick: () => setIsOpen(true),
    "data-id": "trigger"
  }, 'Open'), /*#__PURE__*/React.createElement(Drawer, _extends({}, args, {
    "data-type": "test",
    isOpen: isOpen,
    onClose: () => setIsOpen(false)
  })));
};
Basic.args = {
  children: 'Drawer content.',
  title: 'Title',
  subtitle: 'Subtitle'
};
export const WithForm = args => /*#__PURE__*/React.createElement(Basic, args);
WithForm.args = { ...Basic.args,
  form: {}
};
export const WithSideBanner = args => /*#__PURE__*/React.createElement(Basic, args);
WithSideBanner.args = { ...Basic.args,
  size: 'xs',
  sideBanner: /*#__PURE__*/React.createElement("img", {
    src: image
  }),
  sideBannerContainer: {
    background: 'skyblue'
  }
};
export const WithClosingConfirmation = args => /*#__PURE__*/React.createElement(Basic, args);
WithClosingConfirmation.args = { ...Basic.args,
  closingConfirmation: true
};