import { __decorate, __metadata } from "tslib";
import { FormGroupProperty } from '@anglr/common/forms';
import { mapValuesToThis } from '@jscrpt/common';
import { LayoutPropertyDescription, LayoutPropertyName, LayoutPropertyObject, LayoutPropertyType } from '../../decorators';
import { LayoutPropertyMetadata } from '../types';
import { MarginModel } from './margin.model';
import { PaddingModel } from './padding.model';
/**
 * Component styling model for properties editor
 */
export class ComponentStylingModel {
    //######################### constructor #########################
    constructor(value) {
        //######################### public properties #########################
        this.cssClass = null;
        /**
         * @inheritdoc
         */
        this.margin = null;
        /**
         * @inheritdoc
         */
        this.padding = null;
        /**
         * @inheritdoc
         */
        this.textStyling = null;
        mapValuesToThis.bind(this)(value);
        this.margin = new MarginModel(value === null || value === void 0 ? void 0 : value.margin);
        this.padding = new PaddingModel(value === null || value === void 0 ? void 0 : value.padding);
    }
}
__decorate([
    LayoutPropertyName('Css class'),
    LayoutPropertyDescription('Css class that should be applied to component'),
    LayoutPropertyType('inputString'),
    __metadata("design:type", Object)
], ComponentStylingModel.prototype, "cssClass", void 0);
__decorate([
    LayoutPropertyName('Margin'),
    LayoutPropertyDescription('Margin of component'),
    LayoutPropertyObject(MarginModel, [LayoutPropertyMetadata]),
    FormGroupProperty(),
    __metadata("design:type", Object)
], ComponentStylingModel.prototype, "margin", void 0);
__decorate([
    LayoutPropertyName('Padding'),
    LayoutPropertyDescription('Padding of component'),
    LayoutPropertyObject(PaddingModel, [LayoutPropertyMetadata]),
    FormGroupProperty(),
    __metadata("design:type", Object)
], ComponentStylingModel.prototype, "padding", void 0);
//# sourceMappingURL=componentStyling.model.js.map