/*
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 { Base, markType } from "igniteui-angular-core";
import { AlignmentInfo } from "./AlignmentInfo";
import { BorderInfo } from "./BorderInfo";
import { FillInfo } from "./FillInfo";
import { SerializationNumberFormatInfo } from "./SerializationNumberFormatInfo";
import { ProtectionInfo } from "./ProtectionInfo";
import { ExcelUtils } from "./ExcelUtils";
import { NoOpFontDefaultsResolver } from "./NoOpFontDefaultsResolver";
/**
 * @hidden
 */
export let DxfInfo = /*@__PURE__*/ (() => {
    class DxfInfo extends Base {
        constructor(a, ..._rest) {
            super();
            this.b = null;
            this.c = null;
            this.e = null;
            this.a = null;
            this.d = null;
            this.g = null;
            this.f = null;
            a = (a == void 0) ? 0 : a;
            switch (a) {
                case 0: break;
                case 1:
                    {
                        let c = _rest[0];
                        let d = _rest[1];
                        if (ExcelUtils.by(d.formatOptions, 2)) {
                            this.b = AlignmentInfo.e(d, true);
                        }
                        if (ExcelUtils.by(d.formatOptions, 8)) {
                            this.c = BorderInfo.a(c, d);
                        }
                        if (ExcelUtils.by(d.formatOptions, 16)) {
                            this.e = FillInfo.a(c, d);
                        }
                        if (ExcelUtils.by(d.formatOptions, 1)) {
                            this.g = SerializationNumberFormatInfo.a(d);
                        }
                        if (ExcelUtils.by(d.formatOptions, 32)) {
                            this.f = ProtectionInfo.b(d, true);
                        }
                        if (ExcelUtils.by(d.formatOptions, 4)) {
                            this.a = d._bp.d._ak(NoOpFontDefaultsResolver.a);
                        }
                    }
                    break;
            }
        }
        h(a) {
            let b = a._b._cd(2);
            if (this.b != null) {
                this.b.ai(b);
            }
            if (this.c != null) {
                this.c.x(b, a);
            }
            if (this.e != null) {
                this.e.h(b, a);
            }
            if (this.a != null) {
                b.font.setFontFormatting(this.a);
            }
            if (this.d != null) {
                b.font.colorInfo = this.d.c(a);
            }
            if (this.g != null) {
                this.g.d(b);
            }
            if (this.f != null) {
                this.f.k(b);
            }
            return b;
        }
    }
    DxfInfo.$t = markType(DxfInfo, 'DxfInfo');
    return DxfInfo;
})();
