'use strict';

var React = require('react');
var PropTypes = require('prop-types');
var styledComponents = require('styled-components');
var layout = require('@carbon/layout');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var React__default = /*#__PURE__*/_interopDefault(React);
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);

var StyledDiv = styledComponents.styled.div.withConfig({
  displayName: "PageWorkArea__StyledDiv",
  componentId: "sc-wobn0e-0"
})(["width:100%;padding:", " ", ";"], layout.spacing07, layout.spacing05);
var propTypes = {
  isOpen: PropTypes__default.default.bool,
  children: PropTypes__default.default.node.isRequired,
  testId: PropTypes__default.default.string
};
var defaultProps = {
  isOpen: false,
  testId: 'page-work-area'
};

/** work area with transitions */
var PageWorkArea = function PageWorkArea(_ref) {
  var isOpen = _ref.isOpen,
    children = _ref.children,
    testId = _ref.testId;
  return isOpen ? /*#__PURE__*/React__default.default.createElement(StyledDiv, {
    "data-testid": testId
  }, children) : null;
};
PageWorkArea.propTypes = propTypes;
PageWorkArea.defaultProps = defaultProps;
PageWorkArea.__docgenInfo = {
  "description": "work area with transitions",
  "methods": [],
  "displayName": "PageWorkArea",
  "props": {
    "isOpen": {
      "defaultValue": {
        "value": "false",
        "computed": false
      },
      "description": "",
      "type": {
        "name": "bool"
      },
      "required": false
    },
    "testId": {
      "defaultValue": {
        "value": "'page-work-area'",
        "computed": false
      },
      "description": "",
      "type": {
        "name": "string"
      },
      "required": false
    },
    "children": {
      "description": "",
      "type": {
        "name": "node"
      },
      "required": true
    }
  }
};
var PageWorkArea$1 = PageWorkArea;

module.exports = PageWorkArea$1;
