/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import * as tslib_1 from "tslib";
import { GridColumnOptionsViewBase } from "./GridColumnOptionsViewBase";
import { Size } from "igniteui-webcomponents-core";
import { GridColumnOptionsUtilities } from "./GridColumnOptionsUtilities";
import { runOn, delegateCombine, markType } from "igniteui-webcomponents-core";
import { GridColumnOptionsSimpleSectionBase } from "./GridColumnOptionsSimpleSectionBase";
/**
 * @hidden
 */
var GridColumnHideOptionsView = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(GridColumnHideOptionsView, _super);
    function GridColumnHideOptionsView() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.s = null;
        _this.p = null;
        _this.r = null;
        _this.o = null;
        _this.t = null;
        _this.q = false;
        return _this;
    }
    Object.defineProperty(GridColumnHideOptionsView.prototype, "n", {
        get: function () {
            return this.b;
        },
        enumerable: true,
        configurable: true
    });
    GridColumnHideOptionsView.prototype.x = function () {
        if (null == this.p) {
            return;
        }
        this.q = true;
        try {
            var a = this.n.b1;
            if (a) {
                this.p.svgPath = GridColumnHideOptionsView.v;
            }
            else {
                this.p.svgPath = GridColumnHideOptionsView.u;
            }
        }
        finally {
            this.q = false;
        }
    };
    GridColumnHideOptionsView.prototype.k = function () {
        var _this = this;
        _super.prototype.k.call(this);
        if (null == this.g || null == this.e) {
            return;
        }
        var a = this.e;
        var b = this.n;
        var c = this.g;
        this.r = ((function () { var d = GridColumnOptionsUtilities.g(a, GridColumnHideOptionsView.u, 1, b.p, b.j, new Size(1, 24, 24), _this.o, _this.p, _this.s, _this.t, false, true, false); _this.o = d.p6; _this.p = d.p7; _this.s = d.p8; _this.t = d.p9; return d.ret; })());
        var d = this.o;
        d.clicked = delegateCombine(d.clicked, runOn(this, this.w));
        c.append(this.r);
    };
    GridColumnHideOptionsView.prototype.m = function () {
        _super.prototype.m.call(this);
        this.x();
        var a = this.n;
        if (null != this.s) {
            this.s.setRawText(this.n.bw);
            var b = this.n.bu;
            GridColumnOptionsUtilities.j(this.s, b, "inline-block");
            if (b) {
                this.o.s = 1;
                this.o.fv = "stretch";
                this.t.setStyleProperty("justify-content", "space-between");
            }
            else {
                this.o.s = 4;
                this.o.fv = "center";
                this.t.setStyleProperty("justify-content", "center");
            }
            this.s.setStyleProperty("font", a.aa.fontString);
        }
        a.bf(this.o);
    };
    GridColumnHideOptionsView.prototype.w = function (a, b) {
        if (this.q) {
            return;
        }
        this.n.b1 = !this.n.b1;
    };
    GridColumnHideOptionsView.$t = markType(GridColumnHideOptionsView, 'GridColumnHideOptionsView', GridColumnOptionsViewBase.$);
    GridColumnHideOptionsView.v = "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z";
    GridColumnHideOptionsView.u = "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z";
    return GridColumnHideOptionsView;
}(GridColumnOptionsViewBase));
export { GridColumnHideOptionsView };
/**
 * @hidden
 */
var GridColumnHideOptions = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(GridColumnHideOptions, _super);
    function GridColumnHideOptions() {
        return _super.call(this) || this;
    }
    GridColumnHideOptions.prototype.f = function () {
        return new GridColumnHideOptionsView();
    };
    GridColumnHideOptions.prototype.get_by = function () {
        return "Hide Column";
    };
    Object.defineProperty(GridColumnHideOptions.prototype, "by", {
        get: function () {
            return this.get_by();
        },
        enumerable: true,
        configurable: true
    });
    GridColumnHideOptions.prototype.bq = function () {
        if (null == this.column) {
            return false;
        }
        return true;
    };
    GridColumnHideOptions.prototype.a6 = function (a, b) {
        _super.prototype.a6.call(this, a, b);
        var c = this.column;
        if (null == c) {
            return;
        }
        switch (b.propertyName) {
            case "IsHidden":
                this.b0.m();
                break;
        }
    };
    GridColumnHideOptions.prototype.bc = function (a, b, c) {
        _super.prototype.bc.call(this, a, b, c);
    };
    Object.defineProperty(GridColumnHideOptions.prototype, "b1", {
        get: function () {
            var a = this.column;
            if (null != a) {
                return a.gh;
            }
            return false;
        },
        set: function (a) {
            var b = this.column;
            if (null != b) {
                b.gh = a;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(GridColumnHideOptions.prototype, "b0", {
        get: function () {
            return this.e;
        },
        enumerable: true,
        configurable: true
    });
    GridColumnHideOptions.$t = markType(GridColumnHideOptions, 'GridColumnHideOptions', GridColumnOptionsSimpleSectionBase.$);
    return GridColumnHideOptions;
}(GridColumnOptionsSimpleSectionBase));
export { GridColumnHideOptions };
//# sourceMappingURL=GridColumnHideOptionsView_combined.js.map
