/*
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 { DependencyObject } from "igniteui-react-core/ES2015/DependencyObject";
import { INotifyPropertyChanged_$type, PropertyChangedEventArgs, Type, markType } from "igniteui-react-core/ES2015/type";
import { IAxisAnnotation_$type } from "./IAxisAnnotation";
import { DependencyProperty } from "igniteui-react-core/ES2015/DependencyProperty";
import { Brush } from "igniteui-react-core/ES2015/Brush";
import { Thickness } from "igniteui-react-core/ES2015/Thickness";
import { PropertyMetadata } from "igniteui-react-core/ES2015/PropertyMetadata";
/**
 * @hidden
 */
export class AxisAnnotation extends DependencyObject {
    constructor() {
        super(...arguments);
        this.propertyChanged = null;
        this.k = false;
        this._formatLabel = null;
        this.j = false;
    }
    resetCachedExtent() {
        this.k = true;
    }
    checkForExtentReset(a) {
        if (this.k) {
            this.k = false;
            a();
        }
    }
    aa(a, b, c) {
        this.z(a, b, c);
        if (this.propertyChanged != null) {
            this.propertyChanged(this, new PropertyChangedEventArgs(a));
        }
    }
    z(a, b, c) {
        this.j = true;
    }
    resolveLabelValue() {
        if (this.text != null) {
            return this.text;
        }
        if (this.formatLabel != null) {
            return this.formatLabel(this.value);
        }
        if (this.value == null) {
            return null;
        }
        return this.value.toString();
    }
    get formatLabel() {
        return this._formatLabel;
    }
    set formatLabel(a) {
        this._formatLabel = a;
    }
    get backgroundPadding() {
        return new Thickness(1, this.backgroundPaddingLeft, this.backgroundPaddingTop, this.backgroundPaddingRight, this.backgroundPaddingBottom);
    }
    set backgroundPadding(a) {
        this.backgroundPaddingLeft = a.c;
        this.backgroundPaddingTop = a.e;
        this.backgroundPaddingRight = a.d;
        this.backgroundPaddingBottom = a.b;
    }
}
AxisAnnotation.$t = markType(AxisAnnotation, 'AxisAnnotation', DependencyObject.$, [INotifyPropertyChanged_$type, IAxisAnnotation_$type]);
Type.dep(DependencyProperty, PropertyMetadata, AxisAnnotation, 'aa', ['BackgroundPaddingBottom', [1, NaN], 'BackgroundPaddingLeft', [1, NaN], 'BackgroundPaddingRight', [1, NaN], 'BackgroundPaddingTop', [1, NaN], 'Background', [Brush.$, null], 'Outline', [Brush.$, null], 'StrokeThickness', [1, 0], 'TextColor', [Brush.$, null], 'Text', [2, null], 'Value', [4, null]]);
