import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import React from 'react';
import { Collapse } from '@alicloudfe/components';
import cls from 'classnames';
import BDesignTheme from '../theme';

var BDesignCollapse = function BDesignCollapse(props) {
  var className = props.className,
      theme = props.theme,
      triangle = props.triangle,
      solidtriangle = props.solidtriangle,
      rest = _objectWithoutProperties(props, ["className", "theme", "triangle", "solidtriangle"]);

  return /*#__PURE__*/React.createElement(BDesignTheme, {
    theme: theme
  }, function (theme) {
    return /*#__PURE__*/React.createElement(Collapse, _extends({
      className: cls(className, {
        'b-design_icon__container': true,
        'next-collapse-dark': theme === 'dark',
        'next-collapse-right': triangle === 'right',
        'next-collapse-solidtriangle': solidtriangle === true
      })
    }, rest));
  });
};

BDesignCollapse.Panel = Collapse.Panel;
export default BDesignCollapse;