import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
import React__default, { forwardRef } from 'react';
import { cx } from '../../utils/index.js';
import { base as base$2 } from './variations/_view/base.js';
import { base as base$1 } from './variations/_size/base.js';
import { classes } from './Toolbar.tokens.js';
import { base } from './Toolbar.styles.js';

var _excluded = ["children", "orientation", "hasShadow", "className"];
var toolbarRoot = function toolbarRoot(Root) {
  return /*#__PURE__*/forwardRef(function (props, ref) {
    var children = props.children,
      _props$orientation = props.orientation,
      orientation = _props$orientation === void 0 ? 'vertical' : _props$orientation,
      _props$hasShadow = props.hasShadow,
      hasShadow = _props$hasShadow === void 0 ? true : _props$hasShadow,
      className = props.className,
      rest = _objectWithoutProperties(props, _excluded);
    var orientationClassName = orientation === 'horizontal' ? classes.horizontal : classes.vertical;
    var shadowClassName = hasShadow ? classes.shadow : undefined;
    return /*#__PURE__*/React__default.createElement(Root, _extends({
      ref: ref,
      orientation: orientation,
      hasShadow: hasShadow,
      className: cx(className, orientationClassName, shadowClassName)
    }, rest), children);
  });
};
var toolbarConfig = {
  name: 'Toolbar',
  tag: 'div',
  layout: toolbarRoot,
  base: base,
  variations: {
    size: {
      css: base$1
    },
    view: {
      css: base$2
    }
  },
  defaults: {
    view: 'default'
  }
};

export { toolbarConfig, toolbarRoot };
