/*
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 { GridColumnOptionsViewBase } from "./GridColumnOptionsViewBase";
import { FontInfo } from "igniteui-webcomponents-core";
import { GridColumnOptionsUtilities } from "./GridColumnOptionsUtilities";
import { markType, enumGetBox, runOn, delegateCombine, typeCast } from "igniteui-webcomponents-core";
import { GridColumnOptionsBase } from "./GridColumnOptionsBase";
import { StringComparer } from "igniteui-webcomponents-core";
import { GridColumnOptionsSimpleSectionBase } from "./GridColumnOptionsSimpleSectionBase";
import { ControlDisplayDensity_$type } from "igniteui-webcomponents-core";
import { DeviceUtils } from "igniteui-webcomponents-core";
import { truncate } from "igniteui-webcomponents-core";
import { stringIsNullOrWhiteSpace } from "igniteui-webcomponents-core";
import { stringFormat1 } from "igniteui-webcomponents-core";
/**
 * @hidden
 */
export let GridColumnOptionsView = /*@__PURE__*/ (() => {
    class GridColumnOptionsView extends GridColumnOptionsViewBase {
        constructor() {
            super(...arguments);
            this.u = null;
            this.y = null;
            this.w = null;
            this.x = null;
            this.p = null;
            this.z = null;
            this.s = null;
            this.r = null;
            this.v = null;
            this.q = null;
            this.t = null;
        }
        get n() {
            return this.b;
        }
        o() {
            let a = this.e;
            let b = a.createElement("div");
            let c = a.createElement("header");
            b.append(c);
            let d = a.createElement("h4");
            c.append(d);
            c.setRawText(this.n.du);
            return b;
        }
        ac() {
            if (null != this.t) {
                let a = this.n;
                let b = a.du;
                this.t.setRawText(b);
                if (null != a.cc) {
                    this.t.setStyleProperty("font", a.cc.fontString);
                }
            }
        }
        j() {
            super.j();
            this.m();
        }
        m() {
            super.m();
            if (null != this.g) {
                this.g.setStyleProperty("padding", this.n.d2());
                this.g.setStyleProperty("box-sizing", "border-box");
            }
            this.ac();
            let a;
            let b;
            if (null != this.u) {
                a = this.u;
                b = this.n.cm;
                GridColumnOptionsUtilities.j(a, b, "flex");
            }
            if (null != this.y) {
                a = this.y;
                b = this.n.c0;
                GridColumnOptionsUtilities.j(a, b);
            }
            if (null != this.w) {
                a = this.w;
                b = this.n.cu;
                GridColumnOptionsUtilities.j(a, b);
            }
            if (null != this.x) {
                a = this.x;
                b = this.n.cx;
                GridColumnOptionsUtilities.j(a, b);
            }
            if (null != this.v) {
                a = this.v;
                b = this.n.cr;
                GridColumnOptionsUtilities.j(a, b);
            }
            if (null != this.q) {
                a = this.q;
                b = this.n.cl;
                GridColumnOptionsUtilities.j(a, b);
            }
            if (null != this.p) {
                a = this.p;
                b = this.n.ci;
                GridColumnOptionsUtilities.j(a, b);
            }
            if (null != this.z) {
                a = this.z;
                b = this.n.c3;
                GridColumnOptionsUtilities.j(a, b);
            }
        }
        aa() {
            let a = this.e;
            let b = a.createElement("header");
            this.u.append(b);
            let c = a.createElement("h4");
            c.setStyleProperty("margin-top", "0");
            c.setStyleProperty("margin-bottom", "0");
            b.append(c);
            this.t = c;
            this.s.append(b);
            this.ac();
        }
        ab(a, b, c, d, e, f, g, h, i, j) {
            this.u = a;
            this.y = b;
            this.w = c;
            this.x = d;
            this.p = e;
            this.z = f;
            this.s = g;
            this.r = h;
            this.v = i;
            this.q = j;
            this.r.setStyleProperty("display", "flex");
            this.r.setStyleProperty("flex-direction", "row");
            this.r.setStyleProperty("flex-wrap", "no-wrap");
            this.r.setStyleProperty("align-items", "center");
            this.r.setStyleProperty("justify-content", "space-between");
            this.u.setStyleProperty("display", "flex");
            this.u.setStyleProperty("flex-direction", "row");
            this.u.setStyleProperty("flex-wrap", "no-wrap");
            this.u.setStyleProperty("align-items", "center");
            this.u.setStyleProperty("justify-content", "space-between");
            this.u.setStyleProperty("margin-bottom", "5px");
            this.aa();
            this.y.setStyleProperty("margin-bottom", "8px");
            this.w.setStyleProperty("margin-bottom", "8px");
            this.x.setStyleProperty("margin-bottom", "8px");
        }
    }
    GridColumnOptionsView.$t = /*@__PURE__*/ markType(GridColumnOptionsView, 'GridColumnOptionsView', GridColumnOptionsViewBase.$);
    return GridColumnOptionsView;
})();
/**
 * @hidden
 */
export let GridColumnOptions = /*@__PURE__*/ (() => {
    class GridColumnOptions extends GridColumnOptionsBase {
        constructor() {
            super();
            this.by = null;
            this.bv = null;
            this.bx = null;
            this.bu = null;
            this.bt = null;
            this.bq = null;
            this.bz = null;
            this.ce = null;
            this.cb = null;
            this.ca = null;
            this.c6 = truncate(DeviceUtils.g(8));
            this.c8 = truncate(DeviceUtils.g(4));
            this.c7 = truncate(DeviceUtils.g(8));
            this.c5 = truncate(DeviceUtils.g(8));
            this.cn = true;
            this.cy = true;
            this.cs = true;
            this.cv = true;
            this.cp = true;
            this.cj = true;
            this.cg = true;
            this.c1 = true;
            this.e0 = null;
            this.eu = null;
            this.ex = null;
            this.d6 = null;
            this.d9 = null;
            this.ed = null;
            this.ek = null;
            this.en = null;
            this.er = null;
            this.dk = null;
            this.dn = null;
            this.dr = null;
            this.b3 = 0;
            this.b1 = 0;
            this.b2 = 0;
            this.b0 = 0;
            this.dx = null;
            this.filterApplyButtonClick = null;
            this.filterCancelButtonClick = null;
        }
        f() {
            return new GridColumnOptionsView();
        }
        a5() {
            super.a5();
            let a = this.column;
            if (null != this.by) {
                this.by.column = a;
            }
            if (null != this.bv) {
                this.bv.column = a;
            }
            if (null != this.bx) {
                this.bx.column = a;
            }
            if (null != this.bu) {
                this.bu.column = a;
            }
            if (null != this.bt) {
                this.bt.column = a;
            }
            if (null != this.bq) {
                this.bq.column = a;
            }
            if (null != this.bz) {
                this.bz.column = a;
            }
            this.ff();
        }
        a9(a, b) {
            super.a9(a, b);
            switch (b.propertyName) {
                case "HeaderClickAction":
                case "ColumnMovingMode":
                    this.ff();
                    break;
            }
        }
        bc(a, b, c) {
            super.bc(a, b, c);
            switch (a) {
                case "HeaderVisible":
                case "SortOptionsVisible":
                case "MoveOptionsVisible":
                case "PinOptionsVisible":
                case "HideOptionsVisible":
                case "FilterOptionsVisible":
                case "PaddingTop":
                case "PaddingRight":
                case "PaddingBottom":
                case "PaddingLeft":
                    this.ff();
                    break;
                case "ActualLabelTextStyle":
                case "ActualBaseTheme":
                case "ActualButtonDensity":
                case "ActualButtonTextStyle":
                case "ActualDensity":
                case "ActualFilterListDensity":
                case "ActualSummaryListDensity":
                case "BackgroundColor":
                case "TextColor":
                    this.fd();
                    break;
                case "ColumnNameTextStyle":
                    this.fe();
                    break;
                case "ActualColumnNameTextStyle":
                    this.ff();
                    break;
                case "FilterListDensity":
                    this.b4 = this.filterListDensity == 0 ? this.q : this.filterListDensity;
                    break;
                case "SummaryListDensity":
                    this.b5 = this.summaryListDensity == 0 ? this.q : this.summaryListDensity;
                    break;
            }
        }
        ff() {
            this.bw.m();
        }
        get du() {
            let a = this.column;
            return (null != a) ? a.hl : "(No column selected)";
        }
        get cf() {
            if (null == this.ce) {
                this.ce = new FontInfo();
                this.ce.n = "'Segoe UI', Verdana";
                this.ce.d = 16;
            }
            return this.ce;
        }
        get cm() {
            return this.co;
        }
        get c0() {
            return this.cz && this.by.bq();
        }
        get cu() {
            return this.ct && this.bv.bq();
        }
        get cx() {
            return this.cw && this.bx.bq();
        }
        get cr() {
            return this.cq && this.bu.bq();
        }
        get cl() {
            return this.ck && this.bt.bq();
        }
        get ci() {
            return this.ch && this.bq.bq();
        }
        get c3() {
            return this.c2 && this.bz.bq();
        }
        get bw() {
            return this.e;
        }
        get cd() {
            return this.cb;
        }
        set cd(a) {
            let b = this.cb;
            this.cb = a;
            if (b != this.cb) {
                this.ba("ColumnNameTextStyle", b, this.cb);
            }
        }
        get cc() {
            return this.ca;
        }
        set cc(a) {
            let b = this.ca;
            this.ca = a;
            if (this.ca != b) {
                this.ba("ActualColumnNameTextStyle", b, this.ca);
            }
        }
        get de() {
            return this.c6;
        }
        set de(a) {
            let b = this.c6;
            this.c6 = a;
            if (this.c6 != b) {
                this.ba("PaddingLeft", b, this.c6);
            }
        }
        get dg() {
            return this.c8;
        }
        set dg(a) {
            let b = this.c8;
            this.c8 = a;
            if (this.c8 != b) {
                this.ba("PaddingTop", b, this.c8);
            }
        }
        get df() {
            return this.c7;
        }
        set df(a) {
            let b = this.c7;
            this.c7 = a;
            if (this.c7 != b) {
                this.ba("PaddingRight", b, this.c7);
            }
        }
        get dd() {
            return this.c5;
        }
        set dd(a) {
            let b = this.c5;
            this.c5 = a;
            if (this.c5 != b) {
                this.ba("PaddingBottom", b, this.c5);
            }
        }
        get co() {
            return this.cn;
        }
        set co(a) {
            if (a == this.cn) {
                return;
            }
            let b = this.cn;
            this.cn = a;
            this.ba("HeaderVisible", b, this.cn);
        }
        get cz() {
            return this.cy;
        }
        set cz(a) {
            if (a == this.cy) {
                return;
            }
            let b = this.cy;
            this.cy = a;
            this.ba("SortOptionsVisible", b, this.cy);
        }
        get ct() {
            return this.cs;
        }
        set ct(a) {
            if (a == this.cs) {
                return;
            }
            let b = this.cs;
            this.cs = a;
            this.ba("MoveOptionsVisible", b, this.cs);
        }
        get cw() {
            return this.cv;
        }
        set cw(a) {
            if (a == this.cv) {
                return;
            }
            let b = this.cv;
            this.cv = a;
            this.ba("PinOptionsVisible", b, this.cv);
        }
        get cq() {
            return this.cp;
        }
        set cq(a) {
            if (a == this.cp) {
                return;
            }
            let b = this.cp;
            this.cp = a;
            this.ba("HideOptionsVisible", b, this.cp);
        }
        get ck() {
            return this.cj;
        }
        set ck(a) {
            if (a == this.cj) {
                return;
            }
            let b = this.cj;
            this.cj = a;
            this.ba("GroupOptionsVisible", b, this.cj);
        }
        get ch() {
            return this.cg;
        }
        set ch(a) {
            if (a == this.cg) {
                return;
            }
            let b = this.cg;
            this.cg = a;
            this.ba("FilterOptionsVisible", b, this.cg);
        }
        get c2() {
            return this.c1;
        }
        set c2(a) {
            if (a == this.c1) {
                return;
            }
            let b = this.c1;
            this.c1 = a;
            this.ba("SummaryOptionsVisible", b, this.c1);
        }
        get e1() {
            return this.e0 != null ? this.e0 : !stringIsNullOrWhiteSpace(this.ai.b1("Column_Sort")) ? this.ai.b1("Column_Sort") : "Sort";
        }
        set e1(a) {
            let b = this.e1;
            if (0 == StringComparer.b.compare(a, b)) {
                return;
            }
            this.e0 = a;
            if (null != this.by) {
                this.by.bw = a;
            }
            this.ba("SortHeaderCaption", b, this.e0);
        }
        get ev() {
            return this.eu != null ? this.eu : !stringIsNullOrWhiteSpace(this.ai.b1("Column_Sort_Ascending")) ? this.ai.b1("Column_Sort_Ascending") : "Asc";
        }
        set ev(a) {
            let b = this.ev;
            if (0 == StringComparer.b.compare(a, b)) {
                return;
            }
            this.eu = a;
            if (null != this.by) {
                this.by.b3 = a;
            }
            this.ba("SortAscendingCaption", b, this.eu);
        }
        get ey() {
            return this.ex != null ? this.ex : !stringIsNullOrWhiteSpace(this.ai.b1("Column_Sort_Descending")) ? this.ai.b1("Column_Sort_Descending") : "Desc";
        }
        set ey(a) {
            let b = this.ey;
            if (0 == StringComparer.b.compare(a, b)) {
                return;
            }
            this.ex = a;
            if (null != this.by) {
                this.by.b7 = a;
            }
            this.ba("SortDescendingCaption", b, this.ex);
        }
        get d7() {
            return this.d6 != null ? this.d6 : !stringIsNullOrWhiteSpace(this.ai.b1("Column_Move")) ? this.ai.b1("Column_Move") : "Move";
        }
        set d7(a) {
            let b = this.d7;
            if (0 == StringComparer.b.compare(a, b)) {
                return;
            }
            this.d6 = a;
            if (null != this.bv) {
                this.bv.bw = a;
            }
            this.ba("MoveHeaderCaption", b, this.d6);
        }
        get ea() {
            return this.d9 != null ? this.d9 : !stringIsNullOrWhiteSpace(this.ai.b1("Column_Move_Left")) ? this.ai.b1("Column_Move_Left") : "Left";
        }
        set ea(a) {
            let b = this.ea;
            if (0 == StringComparer.b.compare(a, b)) {
                return;
            }
            this.d9 = a;
            if (null != this.bv) {
                this.bv.b5 = a;
            }
            this.ba("MoveLeftCaption", b, this.d9);
        }
        get ee() {
            return this.ed != null ? this.ed : !stringIsNullOrWhiteSpace(this.ai.b1("Column_Move_Right")) ? this.ai.b1("Column_Move_Right") : "Right";
        }
        set ee(a) {
            let b = this.ee;
            if (0 == StringComparer.b.compare(a, b)) {
                return;
            }
            this.ed = a;
            if (null != this.bv) {
                this.bv.b9 = a;
            }
            this.ba("MoveRightCaption", b, this.ed);
        }
        get el() {
            return this.ek != null ? this.ek : !stringIsNullOrWhiteSpace(this.ai.b1("Column_Pin")) ? this.ai.b1("Column_Pin") : "Pin";
        }
        set el(a) {
            let b = this.el;
            if (0 == StringComparer.b.compare(a, b)) {
                return;
            }
            this.ek = a;
            if (null != this.bx) {
                this.bx.bw = a;
            }
            this.ba("PinHeaderCaption", b, this.ek);
        }
        get eo() {
            return this.en != null ? this.en : !stringIsNullOrWhiteSpace(this.ai.b1("Column_Pin_Left")) ? this.ai.b1("Column_Pin_Left") : "Left";
        }
        set eo(a) {
            let b = this.eo;
            if (0 == StringComparer.b.compare(a, b)) {
                return;
            }
            this.en = a;
            if (null != this.bx) {
                this.bx.b4 = a;
            }
            this.ba("PinLeftCaption", b, this.en);
        }
        get es() {
            return this.er != null ? this.er : !stringIsNullOrWhiteSpace(this.ai.b1("Column_Pin_Right")) ? this.ai.b1("Column_Pin_Right") : "Right";
        }
        set es(a) {
            let b = this.es;
            if (0 == StringComparer.b.compare(a, b)) {
                return;
            }
            this.er = a;
            if (null != this.bx) {
                this.bx.b8 = a;
            }
            this.ba("PinRightCaption", b, this.er);
        }
        get dl() {
            return this.dk != null ? this.dk : !stringIsNullOrWhiteSpace(this.ai.b1("Apply")) ? this.ai.b1("Apply") : "Apply";
        }
        set dl(a) {
            let b = this.dl;
            if (0 == StringComparer.b.compare(a, b)) {
                return;
            }
            this.dk = a;
            if (null != this.bq) {
                this.bq.b7 = a;
            }
            this.ba("ApplyFiltersButtonCaption", b, this.dk);
        }
        get dp() {
            return this.dn != null ? this.dn : !stringIsNullOrWhiteSpace(this.ai.b1("Cancel")) ? this.ai.b1("Cancel") : "Cancel";
        }
        set dp(a) {
            let b = this.dp;
            if (0 == StringComparer.b.compare(a, b)) {
                return;
            }
            this.dn = a;
            if (null != this.bq) {
                this.bq.cb = a;
            }
            this.ba("CancelFiltersButtonCaption", b, this.dn);
        }
        get ds() {
            return this.dr != null ? this.dr : !stringIsNullOrWhiteSpace(this.ai.b1("Clear_Column_Filter")) ? this.ai.b1("Clear_Column_Filter") : "Clear column filters";
        }
        set ds(a) {
            let b = this.ds;
            if (0 == StringComparer.b.compare(a, b)) {
                return;
            }
            this.dr = a;
            if (null != this.bq) {
                this.bq.cf = a;
            }
            this.ba("ClearColumnFiltersCaption", b, this.dr);
        }
        get summaryListDensity() {
            return this.b3;
        }
        set summaryListDensity(a) {
            let b = this.b3;
            this.b3 = a;
            if (b != this.b3) {
                this.ba("SummaryListDensity", enumGetBox(ControlDisplayDensity_$type, b), enumGetBox(ControlDisplayDensity_$type, this.b3));
            }
        }
        get b5() {
            return this.b1;
        }
        set b5(a) {
            let b = this.b1;
            this.b1 = a;
            if (b != this.b1) {
                this.ba("ActualSummaryListDensity", enumGetBox(ControlDisplayDensity_$type, b), enumGetBox(ControlDisplayDensity_$type, this.b1));
            }
        }
        get filterListDensity() {
            return this.b2;
        }
        set filterListDensity(a) {
            let b = this.b2;
            this.b2 = a;
            if (b != this.b2) {
                this.ba("FilterListDensity", enumGetBox(ControlDisplayDensity_$type, b), enumGetBox(ControlDisplayDensity_$type, a));
            }
        }
        get b4() {
            return this.b0;
        }
        set b4(a) {
            let b = this.b0;
            this.b0 = a;
            if (b != this.b0) {
                this.ba("ActualFilterListDensity", enumGetBox(ControlDisplayDensity_$type, b), enumGetBox(ControlDisplayDensity_$type, a));
            }
        }
        get dy() {
            return this.dx != null ? this.dx : !stringIsNullOrWhiteSpace(this.ai.b1("Search")) ? this.ai.b1("Search") : "Search";
        }
        set dy(a) {
            if (0 == StringComparer.b.compare(a, this.dx)) {
                return;
            }
            let b = this.dx;
            this.dx = a;
            if (null != this.bq) {
                this.bq.ck = a;
            }
            this.ba("FilterListPlaceholderText", b, this.dx);
        }
        notifySizeChanged() {
            this.e.j();
        }
        provideContent(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) {
            this.bw.ab(a, b, c, d, e, f, g, h, i, j);
            this.by = k;
            this.by.bw = this.e1;
            this.by.b3 = this.ev;
            this.by.b7 = this.ey;
            this.bv = l;
            this.bv.bw = this.d7;
            this.bv.b5 = this.ea;
            this.bv.b9 = this.ee;
            this.bx = m;
            this.bx.bw = this.el;
            this.bx.b4 = this.eo;
            this.bx.b8 = this.es;
            this.bu = n;
            this.bu.bu = false;
            this.bt = o;
            this.bt.bu = false;
            this.bq = p;
            this.bq.b7 = this.dl;
            this.bq.cb = this.dp;
            this.bq.cf = this.ds;
            this.bq.ck = this.dy;
            let r = this.by;
            r.propertyChanged = delegateCombine(r.propertyChanged, runOn(this, this.e8));
            let s = this.bv;
            s.propertyChanged = delegateCombine(s.propertyChanged, runOn(this, this.e8));
            let t = this.bx;
            t.propertyChanged = delegateCombine(t.propertyChanged, runOn(this, this.e8));
            let u = this.bu;
            u.propertyChanged = delegateCombine(u.propertyChanged, runOn(this, this.e8));
            let v = this.bt;
            v.propertyChanged = delegateCombine(v.propertyChanged, runOn(this, this.e8));
            let w = this.bq;
            w.propertyChanged = delegateCombine(w.propertyChanged, runOn(this, this.e8));
            let x = this.bq;
            x.applyButtonClick = delegateCombine(x.applyButtonClick, runOn(this, this.e6));
            let y = this.bq;
            y.cancelButtonClick = delegateCombine(y.cancelButtonClick, runOn(this, this.e7));
            this.bz = q;
            this.fe();
            this.bj();
            this.bg();
            this.fd();
        }
        d2() {
            return stringFormat1("{0}px {1}px {2}px {3}px", this.dg.toString(), this.df.toString(), this.dd.toString(), this.de.toString());
        }
        fe() {
            this.cc = (null == this.cd) ? this.cf : this.cd;
        }
        fd() {
            let a = [this.by, this.bv, this.bx, this.bu, this.bt, this.bq, this.bz];
            for (let c = 0; c < a.length; c++) {
                let b = a[c];
                if (null != b) {
                    b.bm = this.bm;
                    b.bp = this.bp;
                    b.density = this.q;
                    b.buttonDensity = this.p;
                    b.j = this.i;
                }
                let d = typeCast(GridColumnOptionsSimpleSectionBase.$, b);
                if (null != d) {
                    d.ag = this.aa;
                    d.ab = this.z;
                }
            }
            if (null != this.bq) {
                this.bq.b1 = this.b4;
            }
            if (null != this.bz) {
                this.bz.b0 = this.b5;
            }
        }
        fa(a) {
            let b = [this.by, this.bv, this.bx, this.bu, this.bt, this.bq, this.bz];
            for (let d = 0; d < b.length; d++) {
                let c = b[d];
                c.br();
            }
            if (null != this.filterApplyButtonClick) {
                this.filterApplyButtonClick(this, a);
            }
        }
        fb(a) {
            let b = [this.by, this.bv, this.bx, this.bu, this.bt, this.bq, this.bz];
            for (let d = 0; d < b.length; d++) {
                let c = b[d];
                c.bs();
            }
            if (null != this.filterCancelButtonClick) {
                this.filterCancelButtonClick(this, a);
            }
        }
        e6(a, b) {
            this.fa(b);
        }
        e7(a, b) {
            this.fb(b);
        }
        e8(a, b) {
            switch (b.propertyName) {
            }
        }
    }
    GridColumnOptions.$t = /*@__PURE__*/ markType(GridColumnOptions, 'GridColumnOptions', GridColumnOptionsBase.$);
    return GridColumnOptions;
})();
//# sourceMappingURL=GridColumnOptionsView_combined.js.map
