'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getPath = exports.pathPropType = undefined;

var _react = require('react');

var pathPropType = exports.pathPropType = _react.PropTypes.oneOfType([_react.PropTypes.arrayOf(_react.PropTypes.string), _react.PropTypes.string]);

var getPath = exports.getPath = function getPath(props) {
  var parentPath = props.parentPath,
      subpath = props.subpath,
      name = props.name;


  return [parentPath, subpath, name].reduce(function (path, part) {
    return part ? path.concat(part) : path;
  }, []);
};