// #region Imports
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { Disableable } from '../../../Behaviors/Disableable';
import { Themeable } from '../../../Behaviors/Themeable';
import { Variantable } from '../../../Behaviors/Variantable';
import { Attribute } from '../../../Decorators/AttributeDecorator';
import { Component } from '../../../Decorators/ComponentDecorator';
import { Property } from '../../../Decorators/PropertyDecorator';
import { TextAlignment } from '../../../Types/TextAlignment';
import { CustomElement } from '../../Abstracts/CustomElement';
import { numberElementTemplate } from './NumberElementTemplate';
import { numberElementCosmopolitanStyle } from './Themes/NumberElement.Cosmopolitan';
import { numberElementJoyStyle } from './Themes/NumberElement.Joy';
import { numberElementMemphisStyle } from './Themes/NumberElement.Memphis';
// #endregion
/**
 * Number - The number element is used to display a number.
 *
 * @description
 * TBD
 *
 * @element mosaik-number
 * @category Display
 *
 * @slot number - The number slot.
 *
 * @example
 * ```html
 * <mosaik-number number="100">
 * </mosaik-number>
 * ```
 *
 * @public
 */
let NumberElement = class NumberElement extends Themeable(Variantable(Disableable(CustomElement))) {
    // #region Fieldss
    _number;
    _readonly;
    _alignment;
    // #endregion
    // #region Ctor
    /**
     * Constructs a new instance of the `NumberElement` class.
     *
     * @public
     */
    constructor() {
        super();
        this._number = null;
        this._readonly = false;
        this._alignment = TextAlignment.Left;
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `is` property.
     *
     * @public
     * @static
     * @readonly
    */
    static get is() {
        return 'mosaik-number';
    }
    /**
     * Gets or sets the `number` property.
     *
     * @public
     */
    get number() {
        return this._number;
    }
    set number(value) {
        if (this._number !== value) {
            this._number = value;
            this.requestUpdate('number');
        }
    }
    /**
     * Gets or sets the `readonly` property.
     *
     * @public
     * @attr
     */
    get readonly() {
        return this._readonly;
    }
    set readonly(value) {
        if (this._readonly !== value) {
            this._readonly = value;
            this.requestUpdate('readonly');
        }
    }
    /**
     * Gets or sets the `alignment` property.
     *
     * Posible values are:
     * * `center`
     * * `justify`
     * * `left`
     * * `right`
     *
     * @public
     * @attr
     */
    get alignment() {
        return this._alignment;
    }
    set alignment(value) {
        if (this._alignment !== value) {
            this._alignment = value;
            this.requestUpdate('alignment');
        }
    }
};
__decorate([
    Property({ type: Number }),
    __metadata("design:type", Object),
    __metadata("design:paramtypes", [Object])
], NumberElement.prototype, "number", null);
__decorate([
    Attribute({
        type: Boolean,
        useDefault: true
    }),
    __metadata("design:type", Boolean),
    __metadata("design:paramtypes", [Boolean])
], NumberElement.prototype, "readonly", null);
__decorate([
    Attribute({ type: TextAlignment }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], NumberElement.prototype, "alignment", null);
NumberElement = __decorate([
    Component({
        selector: 'mosaik-number',
        template: numberElementTemplate,
        themes: {
            joy: numberElementJoyStyle,
            memphis: numberElementMemphisStyle,
            cosmopolitan: numberElementCosmopolitanStyle
        },
        imports: []
    }),
    __metadata("design:paramtypes", [])
], NumberElement);
export { NumberElement };
//# sourceMappingURL=NumberElement.js.map