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

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

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

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

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

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

    },

    //===================================
    // PRIVATE METHODS
    //===================================

    _isVisible: function () {
        return this.get_viewGrid().get_configuration().get_settings().isEditor;
    }

});