"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));

var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));

var _react = _interopRequireDefault(require("react"));

var _components = require("@alicloudfe/components");

var _classnames = _interopRequireDefault(require("classnames"));

var _theme = _interopRequireDefault(require("../theme"));

var BDesignCollapse = function BDesignCollapse(props) {
  var className = props.className,
      theme = props.theme,
      triangle = props.triangle,
      solidtriangle = props.solidtriangle,
      rest = (0, _objectWithoutProperties2.default)(props, ["className", "theme", "triangle", "solidtriangle"]);
  return /*#__PURE__*/_react.default.createElement(_theme.default, {
    theme: theme
  }, function (theme) {
    return /*#__PURE__*/_react.default.createElement(_components.Collapse, (0, _extends2.default)({
      className: (0, _classnames.default)(className, {
        'b-design_icon__container': true,
        'next-collapse-dark': theme === 'dark',
        'next-collapse-right': triangle === 'right',
        'next-collapse-solidtriangle': solidtriangle === true
      })
    }, rest));
  });
};

BDesignCollapse.Panel = _components.Collapse.Panel;
var _default = BDesignCollapse;
exports.default = _default;