function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
import React from 'react';
import { Drawer as OriginDrawer } from 'antd';
import ArrowLeft from '@pisell/icon/es/ArrowLeft';
import "./index.less";
import classNames from 'classnames';
/**
 * @title: 自定义抽屉
 * @description:
 * @param {PisellDrawerProps} props
 * @return {*}
 * @Author: zhiwei.Wang
 * @Date: 2024-01-30 16:51
 */
var Drawer = function Drawer(props) {
  var _props$hideScrollBar = props.hideScrollBar,
    hideScrollBar = _props$hideScrollBar === void 0 ? true : _props$hideScrollBar,
    _props$showGoBack = props.showGoBack,
    showGoBack = _props$showGoBack === void 0 ? true : _props$showGoBack,
    _props$mask = props.mask,
    mask = _props$mask === void 0 ? false : _props$mask;
  return /*#__PURE__*/React.createElement(OriginDrawer, _extends({
    width: '600px',
    closable: false,
    zIndex: 999
  }, props, {
    className: classNames('pisell-lowcode__booking-drawer', props.className, {
      'pisell-lowcode__booking-drawer-hide-scrollbar': hideScrollBar
    }),
    title: false,
    bodyStyle: {
      padding: 0
    },
    push: false,
    mask: mask
  }), /*#__PURE__*/React.createElement("div", {
    className: classNames('pisell-lowcode__booking-drawer-title-wrap')
  }, /*#__PURE__*/React.createElement("div", {
    className: "pisell-lowcode__booking-drawer-title-line",
    onClick: function onClick(e) {
      var _props$onClose;
      (_props$onClose = props.onClose) === null || _props$onClose === void 0 || _props$onClose.call(props, e);
    }
  }, showGoBack && /*#__PURE__*/React.createElement(ArrowLeft, {
    className: "pisell-lowcode__booking-drawer-back"
  }), /*#__PURE__*/React.createElement("div", {
    className: classNames('pisell-lowcode__booking-drawer-title', {
      'pisell-lowcode__booking-drawer-title-no-wrap': props.titleNoWrap
    })
  }, props.title)), props.header), /*#__PURE__*/React.createElement("div", null, props.children));
};
export default Drawer;