'use strict';

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

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

var Wrapper =
/*#__PURE__*/
function () {
  function Wrapper(router, url) {
    _classCallCheck(this, Wrapper);

    _defineProperty(this, "router", void 0);

    _defineProperty(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(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;
}();

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