"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.ToolbarItemBox = ToolbarItemBox;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _designSystem = require("@wix/design-system");
var _react = _interopRequireDefault(require("react"));
var _ToolbarItemBoxStCss = require("./ToolbarItemBox.st.css.js");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/ToolbarItemBox/ToolbarItemBox.tsx";
function ToolbarItemBox(props) {
  const {
    label,
    children,
    removeStartPadding,
    expandable,
    ...rest
  } = props;
  let child = children;
  if (label) {
    child = /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
      marginLeft: 2,
      __self: this,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 19,
        columnNumber: 13
      }
    }, child);
  }
  return /*#__PURE__*/_react.default.createElement(_designSystem.TableToolbar.Item, (0, _extends2.default)({
    className: (0, _ToolbarItemBoxStCss.st)(_ToolbarItemBoxStCss.classes.root, {
      removeStartPadding,
      expandable
    })
  }, rest, {
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 23,
      columnNumber: 5
    }
  }), label && /*#__PURE__*/_react.default.createElement(_designSystem.TableToolbar.Label, {
    dataHook: "table-toolbar-label",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 31,
      columnNumber: 9
    }
  }, label), child);
}
//# sourceMappingURL=ToolbarItemBox.js.map