import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
import React__default, { forwardRef } from 'react';
import { IconWrapper, Description, StyledButton, base } from './EmptyState.styles.js';

/**
 * Компонент для альтернативного показа содержимого выпадающего списка.
 */
var emptyStateRoot = function emptyStateRoot(Root) {
  return /*#__PURE__*/forwardRef(function (props, ref) {
    var icon = props.icon,
      description = props.description,
      buttonText = props.buttonText,
      buttonAction = props.buttonAction;
    return /*#__PURE__*/React__default.createElement(Root, _extends({}, props, {
      ref: ref
    }), icon && /*#__PURE__*/React__default.createElement(IconWrapper, null, icon), /*#__PURE__*/React__default.createElement(Description, null, description), buttonText && /*#__PURE__*/React__default.createElement(StyledButton, {
      stretching: "filled",
      onClick: buttonAction
    }, buttonText));
  });
};
var emptyStateConfig = {
  name: 'EmptyState',
  tag: 'div',
  layout: emptyStateRoot,
  base: base,
  defaults: {
    size: 'l'
  },
  variations: {}
};

export { emptyStateConfig, emptyStateRoot };
