/**
 * @fileoverview added by tsickle
 * Generated from: lib/widgets/entry-components/modal/components/professional-data/professional-data.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import * as tslib_1 from "tslib";
import { BaseModalComponent } from './../base/base-modal.component';
import { Component } from '@angular/core';
import { FormGroup, FormControl, Validators, FormArray } from '@angular/forms';
import { ModalController } from '@ionic/angular';
var ProfessionalDataComponent = /** @class */ (function (_super) {
    tslib_1.__extends(ProfessionalDataComponent, _super);
    function ProfessionalDataComponent(modalController) {
        var _this = _super.call(this, modalController) || this;
        _this.title = 'PROFESSIONAL_DATA';
        _this.reset(new FormGroup({
            identifier: new FormArray([
                new FormGroup({
                    value: new FormControl(null, Validators.pattern('^[0-9]{5}(\/[0-9]{1,})?'))
                })
            ]),
            issuer: new FormGroup({
                reference: new FormControl(null, Validators.pattern('^[0-9]{9}$'))
            })
        }));
        return _this;
    }
    /**
     * @return {?}
     */
    ProfessionalDataComponent.prototype.save = /**
     * @return {?}
     */
    function () {
        this.baseSave({ value: { qualification: this.form } });
    };
    ProfessionalDataComponent.decorators = [
        { type: Component, args: [{
                    selector: 'inc-professional-data',
                    template: "<inc-modal-header label=\"{{title | translate}}\"></inc-modal-header>\r\n<ion-content class=\"ion-padding\">\r\n  <form [formGroup]=\"form\" (ngSubmit)=\"save()\">\r\n    <ion-list>\r\n      <span formArrayName=\"identifier\">\r\n        <ion-item formGroupName=\"0\">\r\n          <ion-label position=\"floating\">{{'SEAL_NUMBER' | translate}}\r\n          </ion-label>\r\n          <ion-input autofocus type=\"text\" formControlName=\"value\" clearInput>\r\n          </ion-input>\r\n        </ion-item>\r\n      </span>\r\n      <ion-item formGroupName=\"issuer\">\r\n        <ion-label position=\"floating\">{{'LOCATION_ANTSZ_ID' | translate}}\r\n        </ion-label>\r\n        <ion-input autofocus type=\"text\" formControlName=\"reference\" clearInput>\r\n        </ion-input>\r\n      </ion-item>\r\n    </ion-list>\r\n  </form>\r\n  <inc-modal-footer [formInvalidity]=\"form.invalid || form.pristine\" (result)=\"$event ? save() : close()\">\r\n  </inc-modal-footer>\r\n</ion-content>"
                }] }
    ];
    /** @nocollapse */
    ProfessionalDataComponent.ctorParameters = function () { return [
        { type: ModalController }
    ]; };
    return ProfessionalDataComponent;
}(BaseModalComponent));
export { ProfessionalDataComponent };
if (false) {
    /** @type {?} */
    ProfessionalDataComponent.prototype.title;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZmVzc2lvbmFsLWRhdGEuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGluY2xvdWRlZC9pb25pYzQtaW5jbG91ZGVkLWxpYi8iLCJzb3VyY2VzIjpbImxpYi93aWRnZXRzL2VudHJ5LWNvbXBvbmVudHMvbW9kYWwvY29tcG9uZW50cy9wcm9mZXNzaW9uYWwtZGF0YS9wcm9mZXNzaW9uYWwtZGF0YS5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFDcEUsT0FBTyxFQUFFLFNBQVMsRUFBVSxNQUFNLGVBQWUsQ0FBQztBQUNsRCxPQUFPLEVBQUUsU0FBUyxFQUFFLFdBQVcsRUFBRSxVQUFVLEVBQUUsU0FBUyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDL0UsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBRWpEO0lBSStDLHFEQUFrQjtJQUcvRCxtQ0FBWSxlQUFnQztRQUE1QyxZQUNFLGtCQUFNLGVBQWUsQ0FBQyxTQVd2QjtRQWRELFdBQUssR0FBRyxtQkFBbUIsQ0FBQztRQUkxQixLQUFJLENBQUMsS0FBSyxDQUFDLElBQUksU0FBUyxDQUFDO1lBQ3ZCLFVBQVUsRUFBR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