import _extends from "@babel/runtime/helpers/extends";
import _Drawer from "@alifd/next/es/drawer";
import _Button from "@alifd/next/es/button";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["visible", "title", "placement", "actions", "children", "onClick"];
import * as React from 'react';
import "./index.scss";
var Drawer = function Drawer(_ref) {
  var visible = _ref.visible,
    title = _ref.title,
    placement = _ref.placement,
    actions = _ref.actions,
    children = _ref.children,
    onClick = _ref.onClick,
    otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
  var _otherProps = otherProps || {};
  return /*#__PURE__*/React.createElement("div", _extends({
    className: "drawer"
  }, _otherProps), /*#__PURE__*/React.createElement(_Drawer, {
    visible: visible,
    title: title,
    placement: placement
  }, children, /*#__PURE__*/React.createElement("div", {
    className: "drawer-actions",
    style: {
      display: 'flex',
      alignItems: 'center',
      justifyContent: 'space-between',
      gap: '16px',
      padding: '16px'
    }
  }, actions && actions.map(function (action, index) {
    return /*#__PURE__*/React.createElement("div", {
      key: index,
      className: "drawer-action"
    }, /*#__PURE__*/React.createElement(_Button, {
      type: action.style,
      onClick: action.action
    }, action.text));
  }))));
};
Drawer.displayName = 'CustomDrawer';
export default Drawer;