"use strict";

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

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

function _bluebird() {
  const data = require("bluebird");

  _bluebird = function () {
    return data;
  };

  return data;
}

function _path() {
  const data = _interopRequireDefault(require("path"));

  _path = function () {
    return data;
  };

  return data;
}

function _removeEmptyDir() {
  const data = _interopRequireDefault(require("./remove-empty-dir"));

  _removeEmptyDir = function () {
    return data;
  };

  return data;
}

var _default =
/*#__PURE__*/
function () {
  var _removeContainingDirIfEmpty = (0, _bluebird().coroutine)(function* (componentDir) {
    const containingDir = _path().default.dirname(componentDir);

    return (0, _removeEmptyDir().default)(containingDir);
  });

  function removeContainingDirIfEmpty(_x) {
    return _removeContainingDirIfEmpty.apply(this, arguments);
  }

  return removeContainingDirIfEmpty;
}();

exports.default = _default;