"use strict";

exports.__esModule = true;
exports.default = void 0;

var _ramda = require("ramda");

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

/**
 * Maps responsive CSS values from `styled-system`.
 *
 * @see https://styled-system.com/responsive-styles
 * @example
 *
 * mapResponsiveProperty(x => x + 1, 1) // 2
 * mapResponsiveProperty(x => x + 1, [1, 2]) // [2, 3]
 * mapResponsiveProperty(x => x + 1, { _: 1, xs: 3 }) // [2, 4]
 *
 * @param {Function} mapingFunction
 * @param {any} propertyValue
 *
 * @return {Object|Array}
 */
var mapResponsiveProperty = (0, _ramda.curry)(function (mapingFunction, propertyValue) {
  return (0, _ramda.o)((0, _ramda.map)(mapingFunction), (0, _ramda.unless)(_ramdaExtension.isPlainObject, _ramdaExtension.ensureArray))(propertyValue);
});
var _default = mapResponsiveProperty;
exports.default = _default;