/*
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 { PointData } from "igniteui-react-core/ES2015/PointData";
import { SizeData } from "igniteui-react-core/ES2015/SizeData";
import { StringBuilder } from "igniteui-react-core/ES2015/StringBuilder";
import { Base, markType } from "igniteui-react-core/ES2015/type";
export class AxisLabelVisualData extends Base {
    constructor() {
        super();
        this._labelValue = null;
        this._labelPosition = 0;
        this._position = null;
        this._panelPosition = null;
        this._appearance = null;
        this._size = null;
        this.position = new PointData(NaN, NaN);
        this.size = new SizeData(NaN, NaN);
        this.panelPosition = new PointData(NaN, NaN);
    }
    get labelValue() {
        return this._labelValue;
    }
    set labelValue(a) {
        this._labelValue = a;
    }
    get labelPosition() {
        return this._labelPosition;
    }
    set labelPosition(a) {
        this._labelPosition = a;
    }
    get position() {
        return this._position;
    }
    set position(a) {
        this._position = a;
    }
    get panelPosition() {
        return this._panelPosition;
    }
    set panelPosition(a) {
        this._panelPosition = a;
    }
    get appearance() {
        return this._appearance;
    }
    set appearance(a) {
        this._appearance = a;
    }
    get size() {
        return this._size;
    }
    set size(a) {
        this._size = a;
    }
    serialize() {
        let a = new StringBuilder(0);
        a.u("{");
        a.u("position: " + "{ x: " + this.position.x + ", y: " + this.position.y + "},");
        a.u("size: " + "{ width: " + this.size.width + ", height: " + this.size.height + "},");
        a.u("labelPosition: " + this.labelPosition + ",");
        a.u("appearance: " + (this.appearance != null ? this.appearance.serialize() : "null"));
        a.u("}");
        return a.toString();
    }
    h(a, b) {
        if (b) {
            this.labelPosition = (this.labelPosition - a.left) / a.width;
        }
        else {
            this.labelPosition = (this.labelPosition - a.top) / a.height;
        }
        let c = (this.position.x - a.left) / a.width;
        let d = (this.position.y - a.top) / a.height;
        this.position = new PointData(c, d);
        let e = (this.size.width) / a.width;
        let f = (this.size.height) / a.height;
        this.size = new SizeData(e, f);
        ;
    }
}
AxisLabelVisualData.$t = markType(AxisLabelVisualData, 'AxisLabelVisualData');
