/// class PD.Web.UI.Controls.ViewGridShowDesignFiltersDialogCommand
/// using PD.Web.UI.Controls.ViewGridCommand

PD.Web.UI.Controls.ViewGridShowDesignFiltersDialogCommand =
PD.Web.UI.Controls.ViewGridCommand.extend({

    //===================================
    // PUBLIC METHODS
    //===================================

    setDefaults: function () {
        this._super();
        this.props("id", "view-grid/design-filters-dialog");
        this.props("enabled", true);
        this.props("icon", "filter.14px.font");
        this.props("label", "Filters...");
        this.props("tooltip", "Filters...");
    },

    execute: function (e) {
        this._super(e);

        PDJS.Shared.Views.FiltersDialog.open({
            viewStateId: this.get_viewStateId(),
            componentType: "design",
            select: {
                ok: (sender, e) => {
                    sender.close();
                    this.get_viewGrid().build();
                }
            }
        });

    }

});