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

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

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

    setDefaults: function () {
        this._super();
        this.props("id", "view-grid/find-in-results-dialog");
        this.props("enabled", true);
        this.props("icon", "search-1.14px.font"),
        this.props("label", "Find In Results Settings...");
        this.props("tooltip", "Find In Results Settings");
    },

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

        PDJS.Shared.Views.ColumnsDialog.open({
            viewStateId: this.get_viewStateId(),
            componentType: "findinresults",
            select: {
                ok: () => {
                    this.get_viewGrid().build();
                }
            }
        });

    },

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

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

});