'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
var _createClass = require('@babel/runtime/helpers/createClass');
var _defineProperty = require('@babel/runtime/helpers/defineProperty');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var _classCallCheck__default = /*#__PURE__*/_interopDefaultLegacy(_classCallCheck);
var _createClass__default = /*#__PURE__*/_interopDefaultLegacy(_createClass);
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);

var Wrapper = /*#__PURE__*/function () {
  function Wrapper(router, url) {
    _classCallCheck__default['default'](this, Wrapper);

    _defineProperty__default['default'](this, "router", void 0);

    _defineProperty__default['default'](this, "url", void 0);

    this.router = router;
    this.url = url;
  }
  /**
   * stores route rules for http OPTIONS method
   *
   * @param callback - route callback handler
   * @param options - route configuration object or middleware or array of middlewares
   */


  _createClass__default['default'](Wrapper, [{
    key: "options",
    value: function options(callback, _options) {
      this.router.options(this.url, callback, _options);
      return this;
    }
    /**
     * stores route rules for http HEAD method
     *
     * @param callback - route callback handler
     * @param options - route configuration object or middleware or array of middlewares
     */

  }, {
    key: "head",
    value: function head(callback, options) {
      this.router.head(this.url, callback, options);
      return this;
    }
    /**
     * stores route rules for http GETmethod
     *
     * @param callback - route callback handler
     * @param options - route configuration object or middleware or array of middlewares
     */

  }, {
    key: "get",
    value: function get(callback, options) {
      this.router.get(this.url, callback, options);
      return this;
    }
    /**
     * stores route rules for http POST method
     *
     * @param callback - route callback handler
     * @param options - route configuration object or middleware or array of middlewares
     */

  }, {
    key: "post",
    value: function post(callback, options) {
      this.router.post(this.url, callback, options);
      return this;
    }
    /**
     * stores route rules for http PUT method
     *
     * @param callback - route callback handler
     * @param options - route configuration object or middleware or array of middlewares
     */

  }, {
    key: "put",
    value: function put(callback, options) {
      this.router.put(this.url, callback, options);
      return this;
    }
    /**
     * stores route rules for http DELETE method
     *
     * @param callback - route callback handler
     * @param options - route configuration object or middleware or array of middlewares
     */

  }, {
    key: "delete",
    value: function _delete(callback, options) {
      this.router["delete"](this.url, callback, options);
      return this;
    }
  }]);

  return Wrapper;
}();

exports.Wrapper = Wrapper;
//# sourceMappingURL=Wrapper.js.map
