text: "use strict";
  
  exports.__esModule = true;
  exports.default = void 0;
  
  var _directionalProperty =
  /*#__PURE__*/
  _interopRequireDefault(
  /*#__PURE__*/
  require("../helpers/directionalProperty"));
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
  
  var positionMap = ['absolute', 'fixed', 'relative', 'static', 'sticky'];
  /**
   * Shorthand accepts up to five values, including null to skip a value, and maps them to their respective directions. The first value can optionally be a position keyword.
   * @example
   * // Styles as object usage
   * const styles = {
   *   ...position('12px', '24px', '36px', '48px')
   * }
   *
   * // styled-components usage
   * const div = styled.div`
   *   ${position('12px', '24px', '36px', '48px')}
   * `
   *
   * // CSS as JS Output
   *
   * div {
   *   'top': '12px',
   *   'right': '24px',
   *   'bottom': '36px',
   *   'left': '48px'
   * }
   *
   * // Styles as object usage
   * const styles = {
   *   ...position('absolute', '12px', '24px', '36px', '48px')
   * }
   *
   * // styled-components usage
   * const div = styled.div`
   *   ${position('absolute', '12px', '24px', '36px', '48px')}
   * `
   *
   * // CSS as JS Output
   *
   * div {
   *   'position': 'absolute',
   *   'top': '12px',
   *   'right': '24px',
   *   'bottom': '36px',
   *   'left': '48px'
   * }
   */
  
  function position(positionKeyword) {
    for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
      values[_key - 1] = arguments[_key];
    }
  
    if (positionMap.indexOf(positionKeyword) >= 0) {
      return _extends({
        position: positionKeyword
      }, _directionalProperty.default.apply(void 0, [''].concat(values)));
    } else {
      var firstValue = positionKeyword; // in this case position is actually the first value
  
      return _directionalProperty.default.apply(void 0, ['', firstValue].concat(values));
    }
  }
  
  var _default = position;
  exports.default = _default;
  module.exports = exports["default"];