"use strict";

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

var _ramda = require("ramda");

var _ramdaExtension = require("ramda-extension");

/**
 * Returns the display name of a React component, falling back appropriately.
 *
 * @param {React.Component} Component React component to get the name of
 * @returns {string}
 */
var getDisplayName = (0, _ramdaExtension.dispatch)([(0, _ramda.prop)('displayName'), (0, _ramda.prop)('name'), (0, _ramda.unless)((0, _ramda.both)(_ramdaExtension.isString, _ramdaExtension.isNotEmpty), (0, _ramda.always)('Component'))]);
var _default = getDisplayName;
exports["default"] = _default;