import { Component, ElementRef, Inject, Directive, NgModule } from '@angular/core';
import { registerElement } from '@nativescript/angular';
import { RadDataForm, EntityProperty, PropertyEditor, PropertyEditorParams, CustomPropertyEditor, PropertyGroup, GroupTitleStyle, PropertyEditorStyle, PropertyValidator, NonEmptyValidator, MaximumLengthValidator, MinimumLengthValidator, EmailValidator, RangeValidator, PhoneValidator, IsTrueValidator, RegExValidator, DataFormGridLayout, DataFormStackLayout } from 'nativescript-ui-dataform';

class RadDataFormComponent {
    constructor(_elementRef) {
        this._elementRef = _elementRef;
        this._dataForm = _elementRef.nativeElement;
    }
    get nativeElement() {
        return this._dataForm;
    }
    get dataForm() {
        return this._dataForm;
    }
}
RadDataFormComponent.decorators = [
    { type: Component, args: [{
                selector: "RadDataForm",
                template: ``
            },] }
];
RadDataFormComponent.ctorParameters = () => [
    { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
];
class TKEntityPropertyDirective {
    constructor(_elementRef) {
        this._elementRef = _elementRef;
        this._entityProperty = this._elementRef.nativeElement;
    }
    get entityProperty() {
        return this._entityProperty;
    }
}
TKEntityPropertyDirective.decorators = [
    { type: Directive, args: [{
                selector: "TKEntityProperty"
            },] }
];
TKEntityPropertyDirective.ctorParameters = () => [
    { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
];
class TKDataFormGridLayoutDirective {
    constructor(_elementRef) {
        this._elementRef = _elementRef;
        this._dataFormGridLayout = this._elementRef.nativeElement;
    }
    get dataFormGridLayout() {
        return this._dataFormGridLayout;
    }
}
TKDataFormGridLayoutDirective.decorators = [
    { type: Directive, args: [{
                selector: "TKDataFormGridLayout"
            },] }
];
TKDataFormGridLayoutDirective.ctorParameters = () => [
    { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
];
class TKDataFormStackLayoutDirective {
    constructor(_elementRef) {
        this._elementRef = _elementRef;
        this._dataFormStackLayout = this._elementRef.nativeElement;
    }
    get dataFormStackLayout() {
        return this._dataFormStackLayout;
    }
}
TKDataFormStackLayoutDirective.decorators = [
    { type: Directive, args: [{
                selector: "TKDataFormStackLayout"
            },] }
];
TKDataFormStackLayoutDirective.ctorParameters = () => [
    { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
];
class TKPropertyGroupDirective {
    constructor(_elementRef) {
        this._elementRef = _elementRef;
        this._propertyGroup = this._elementRef.nativeElement;
    }
    get propertyGroup() {
        return this._propertyGroup;
    }
}
TKPropertyGroupDirective.decorators = [
    { type: Directive, args: [{
                selector: "TKPropertyGroup"
            },] }
];
TKPropertyGroupDirective.ctorParameters = () => [
    { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
];
class TKPropertyEditorDirective {
    constructor(_elementRef) {
        this._elementRef = _elementRef;
        this._propertyEditor = this._elementRef.nativeElement;
    }
    get propertyEditor() {
        return this._propertyEditor;
    }
}
TKPropertyEditorDirective.decorators = [
    { type: Directive, args: [{
                selector: "TKPropertyEditor"
            },] }
];
TKPropertyEditorDirective.ctorParameters = () => [
    { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
];
class TKCustomPropertyEditorDirective {
    constructor(_elementRef) {
        this._elementRef = _elementRef;
        this._propertyEditor = this._elementRef.nativeElement;
    }
    get propertyEditor() {
        return this._propertyEditor;
    }
}
TKCustomPropertyEditorDirective.decorators = [
    { type: Directive, args: [{
                selector: "TKCustomPropertyEditor"
            },] }
];
TKCustomPropertyEditorDirective.ctorParameters = () => [
    { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
];
class TKPropertyEditorParamsDirective {
    constructor(_elementRef) {
        this._elementRef = _elementRef;
        this._propertyEditorParams = this._elementRef.nativeElement;
    }
    get propertyEditorParams() {
        return this._propertyEditorParams;
    }
}
TKPropertyEditorParamsDirective.decorators = [
    { type: Directive, args: [{
                selector: "TKPropertyEditorParams"
            },] }
];
TKPropertyEditorParamsDirective.ctorParameters = () => [
    { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
];
class TKEditorParamsDirective {
    constructor(owner, _elementRef) {
        this.owner = owner;
        this._elementRef = _elementRef;
    }
    ngOnInit() {
        let editorParams = this._elementRef.nativeElement;
        this.owner.propertyEditor.params = editorParams;
    }
}
TKEditorParamsDirective.decorators = [
    { type: Directive, args: [{
                selector: "[tKEditorParams]"
            },] }
];
TKEditorParamsDirective.ctorParameters = () => [
    { type: TKPropertyEditorDirective, decorators: [{ type: Inject, args: [TKPropertyEditorDirective,] }] },
    { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
];
class TKDataFormPropertyDirective {
    constructor(owner, _elementRef) {
        this.owner = owner;
        this._elementRef = _elementRef;
    }
    ngOnInit() {
        let property = this._elementRef.nativeElement;
        if (this.owner.dataForm.properties) {
            this.owner.dataForm.properties.push(property);
        }
        else {
            this.owner.dataForm.properties = new Array(property);
        }
    }
}
TKDataFormPropertyDirective.decorators = [
    { type: Directive, args: [{
                selector: "[tkDataFormProperty]"
            },] }
];
TKDataFormPropertyDirective.ctorParameters = () => [
    { type: RadDataFormComponent, decorators: [{ type: Inject, args: [RadDataFormComponent,] }] },
    { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
];
class TKPropertyGroupLayoutDirective {
    constructor(owner, _elementRef) {
        this.owner = owner;
        this._elementRef = _elementRef;
    }
    ngOnInit() {
        let layout = this._elementRef.nativeElement;
        this.owner.propertyGroup.layout = layout;
    }
}
TKPropertyGroupLayoutDirective.decorators = [
    { type: Directive, args: [{
                selector: "[tkPropertyGroupLayout]"
            },] }
];
TKPropertyGroupLayoutDirective.ctorParameters = () => [
    { type: TKPropertyGroupDirective, decorators: [{ type: Inject, args: [TKPropertyGroupDirective,] }] },
    { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
];
class TKDataFormGroupsDirective {
    constructor(owner, _elementRef) {
        this.owner = owner;
        this._elementRef = _elementRef;
    }
    ngOnInit() {
        let property = this._elementRef.nativeElement;
        if (this.owner.dataForm.groups) {
            this.owner.dataForm.groups.push(property);
        }
        else {
            this.owner.dataForm.groups = new Array(property);
        }
    }
}
TKDataFormGroupsDirective.decorators = [
    { type: Directive, args: [{
                selector: "[tkDataFormGroups]"
            },] }
];
TKDataFormGroupsDirective.ctorParameters = () => [
    { type: RadDataFormComponent, decorators: [{ type: Inject, args: [RadDataFormComponent,] }] },
    { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
];
class TKPropertyGroupTitleStyleDirective {
    constructor(owner, _elementRef) {
        this.owner = owner;
        this._elementRef = _elementRef;
    }
    ngOnInit() {
        let titleStyle = this._elementRef.nativeElement;
        this.owner.propertyGroup.titleStyle = titleStyle;
    }
}
TKPropertyGroupTitleStyleDirective.decorators = [
    { type: Directive, args: [{
                selector: "[tkPropertyGroupTitleStyle]"
            },] }
];
TKPropertyGroupTitleStyleDirective.ctorParameters = () => [
    { type: TKPropertyGroupDirective, decorators: [{ type: Inject, args: [TKPropertyGroupDirective,] }] },
    { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
];
class TKPropertyEditorStyleDirective {
    constructor(owner, _elementRef) {
        this.owner = owner;
        this._elementRef = _elementRef;
    }
    ngOnInit() {
        let style = this._elementRef.nativeElement;
        this.owner.propertyEditor.propertyEditorStyle = style;
    }
}
TKPropertyEditorStyleDirective.decorators = [
    { type: Directive, args: [{
                selector: "[tkPropertyEditorStyle]"
            },] }
];
TKPropertyEditorStyleDirective.ctorParameters = () => [
    { type: TKPropertyEditorDirective, decorators: [{ type: Inject, args: [TKPropertyEditorDirective,] }] },
    { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
];
class TKCustomPropertyEditorStyleDirective {
    constructor(owner, _elementRef) {
        this.owner = owner;
        this._elementRef = _elementRef;
    }
    ngOnInit() {
        let style = this._elementRef.nativeElement;
        this.owner.propertyEditor.propertyEditorStyle = style;
    }
}
TKCustomPropertyEditorStyleDirective.decorators = [
    { type: Directive, args: [{
                selector: "[tkCustomPropertyEditorStyle]"
            },] }
];
TKCustomPropertyEditorStyleDirective.ctorParameters = () => [
    { type: TKCustomPropertyEditorDirective, decorators: [{ type: Inject, args: [TKCustomPropertyEditorDirective,] }] },
    { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
];
class TKPropertyGroupPropertiesDirective {
    constructor(owner, _elementRef) {
        this.owner = owner;
        this._elementRef = _elementRef;
    }
    ngOnInit() {
        let property = this._elementRef.nativeElement;
        if (this.owner.propertyGroup.properties) {
            this.owner.propertyGroup.properties.push(property);
        }
        else {
            this.owner.propertyGroup.properties = new Array(property);
        }
    }
}
TKPropertyGroupPropertiesDirective.decorators = [
    { type: Directive, args: [{
                selector: "[tkPropertyGroupProperties]"
            },] }
];
TKPropertyGroupPropertiesDirective.ctorParameters = () => [
    { type: TKPropertyGroupDirective, decorators: [{ type: Inject, args: [TKPropertyGroupDirective,] }] },
    { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
];
class TKEntityPropertyEditorDirective {
    constructor(owner, _elementRef) {
        this.owner = owner;
        this._elementRef = _elementRef;
    }
    ngOnInit() {
        let editor = this._elementRef.nativeElement;
        this.owner.entityProperty.editor = editor;
    }
}
TKEntityPropertyEditorDirective.decorators = [
    { type: Directive, args: [{
                selector: "[tkEntityPropertyEditor]"
            },] }
];
TKEntityPropertyEditorDirective.ctorParameters = () => [
    { type: TKEntityPropertyDirective, decorators: [{ type: Inject, args: [TKEntityPropertyDirective,] }] },
    { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
];
class TKEntityPropertyValidatorsDirective {
    constructor(owner, _elementRef) {
        this.owner = owner;
        this._elementRef = _elementRef;
    }
    ngOnInit() {
        let validator = this._elementRef.nativeElement;
        if (this.owner.entityProperty.validators) {
            this.owner.entityProperty.validators.push(validator);
        }
        else {
            this.owner.entityProperty.validators = new Array(validator);
        }
    }
}
TKEntityPropertyValidatorsDirective.decorators = [
    { type: Directive, args: [{
                selector: "[tkEntityPropertyValidators]"
            },] }
];
TKEntityPropertyValidatorsDirective.ctorParameters = () => [
    { type: TKEntityPropertyDirective, decorators: [{ type: Inject, args: [TKEntityPropertyDirective,] }] },
    { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
];
const DATAFORM_DIRECTIVES = [RadDataFormComponent, TKDataFormPropertyDirective,
    TKEntityPropertyEditorDirective, TKEntityPropertyDirective, TKDataFormGroupsDirective,
    TKPropertyGroupPropertiesDirective, TKPropertyGroupDirective, TKPropertyGroupTitleStyleDirective,
    TKPropertyEditorDirective, TKPropertyEditorStyleDirective, TKEntityPropertyValidatorsDirective,
    TKDataFormGridLayoutDirective, TKDataFormStackLayoutDirective, TKPropertyGroupLayoutDirective,
    TKCustomPropertyEditorDirective, TKCustomPropertyEditorStyleDirective, TKPropertyEditorParamsDirective,
    TKEditorParamsDirective];
registerElement("RadDataForm", () => RadDataForm);
registerElement("TKEntityProperty", () => EntityProperty);
registerElement("TKPropertyEditor", () => PropertyEditor);
registerElement("TKPropertyEditorParams", () => PropertyEditorParams);
registerElement("TKCustomPropertyEditor", () => CustomPropertyEditor);
registerElement("TKPropertyGroup", () => PropertyGroup);
registerElement("TKGroupTitleStyle", () => GroupTitleStyle);
registerElement("TKPropertyEditorStyle", () => PropertyEditorStyle);
registerElement("TKPropertyValidator", () => PropertyValidator);
registerElement("TKNonEmptyValidator", () => NonEmptyValidator);
registerElement("TKMaximumLengthValidator", () => MaximumLengthValidator);
registerElement("TKMinimumLengthValidator", () => MinimumLengthValidator);
registerElement("TKEmailValidator", () => EmailValidator);
registerElement("TKRangeValidator", () => RangeValidator);
registerElement("TKPhoneValidator", () => PhoneValidator);
registerElement("TKIsTrueValidator", () => IsTrueValidator);
registerElement("TKRegExValidator", () => RegExValidator);
registerElement("TKDataFormGridLayout", () => DataFormGridLayout);
registerElement("TKDataFormStackLayout", () => DataFormStackLayout);
class NativeScriptUIDataFormModule {
}
NativeScriptUIDataFormModule.decorators = [
    { type: NgModule, args: [{
                declarations: [DATAFORM_DIRECTIVES],
                exports: [DATAFORM_DIRECTIVES]
            },] }
];

/**
 * Generated bundle index. Do not edit.
 */

export { DATAFORM_DIRECTIVES, NativeScriptUIDataFormModule, RadDataFormComponent, TKCustomPropertyEditorDirective, TKCustomPropertyEditorStyleDirective, TKDataFormGridLayoutDirective, TKDataFormGroupsDirective, TKDataFormPropertyDirective, TKDataFormStackLayoutDirective, TKEditorParamsDirective, TKEntityPropertyDirective, TKEntityPropertyEditorDirective, TKEntityPropertyValidatorsDirective, TKPropertyEditorDirective, TKPropertyEditorParamsDirective, TKPropertyEditorStyleDirective, TKPropertyGroupDirective, TKPropertyGroupLayoutDirective, TKPropertyGroupPropertiesDirective, TKPropertyGroupTitleStyleDirective };
//# sourceMappingURL=nativescript-ui-dataform-angular.js.map
