(function ($) {
  $.widget("sqs.ModuleRestaurantPlannings", $.sqs.resaModule, {
    widgetEventPrefix: "",
    options: {
      reservationUrl : undefined,
      restoreFocus: false,
      'sqs.onchangedate': undefined,
      reservationId: undefined,
    },


    _create: function () {
      this._super();
    },

    _getLoadParams: function () {
      return {};
    },

    _onLoad: function (data) {
      var that = this;
      var loadData = data.data;

      this._registerEvent();
    },

    _onRefresh: function () {
    },

    _registerEvent: function () {
      var that =this;
      this.getElement("button[planning-id]").on("click", function (){
        that.redirect(that.options.reservationUrl,{_ast_planningId:$(this).attr("planning-id")});
      });
    },
  });
})(astJQuery);
