import { Component, EventEmitter, Input, Output } from '@angular/core';
import { FormBuilder, Validators } from '@angular/forms';
import * as i0 from "@angular/core";
import * as i1 from "@angular/forms";
import * as i2 from "primeng/button";
import * as i3 from "primeng/dialog";
import * as i4 from "primeng/inputtext";
export class SupportTicketComponent {
    constructor(fb) {
        this.fb = fb;
        this.displayDialog = true;
        this.displayDialogChange = new EventEmitter();
        this.submitTicket = new EventEmitter();
    }
    ngOnInit() {
        this.formGroup = this.fb.group({
            title: ['', Validators.required],
            description: ['', Validators.required],
        });
    }
    close() {
        this.displayDialogChange.emit(false);
    }
    submit() {
        this.submitTicket.emit(this.formGroup.value);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupportTicketComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SupportTicketComponent, selector: "ocx-support-ticket", inputs: { displayDialog: "displayDialog" }, outputs: { displayDialogChange: "displayDialogChange", submitTicket: "submitTicket" }, ngImport: i0, template: "<p-dialog\n  header=\"Create Support Ticket\"\n  [contentStyle]=\"{ overflow: 'visible' }\"\n  [style]=\"{ width: '400px', 'max-height': '300px' }\"\n  [(visible)]=\"displayDialog\"\n  (onHide)=\"close()\"\n>\n  <form [formGroup]=\"formGroup\">\n    <div class=\"p-grid support-ticket-container\">\n      <div class=\"p-col-12\">\n        <label for=\"ticket-title\">Title</label>\n        <input id=\"ticket-title\" formControlName=\"title\" pInputText />\n      </div>\n      <div class=\"p-col-12\">\n        <label for=\"ticket-description\">Description</label>\n        <textarea id=\"ticket-description\" formControlName=\"description\" pInputTextarea rows=\"10\"> </textarea>\n      </div>\n      <div class=\"p-col-12\" style=\"float: right\">\n        <button pButton label=\"Submit\" (click)=\"submit()\" [disabled]=\"formGroup.invalid\"></button>\n      </div>\n    </div>\n  </form>\n</p-dialog>\n", styles: ["input,textarea{width:100%;resize:none;margin-top:5px}.support-ticket-container div{margin-top:5px}\n"], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i3.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i4.InputText, selector: "[pInputText]", inputs: ["variant"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SupportTicketComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ocx-support-ticket', template: "<p-dialog\n  header=\"Create Support Ticket\"\n  [contentStyle]=\"{ overflow: 'visible' }\"\n  [style]=\"{ width: '400px', 'max-height': '300px' }\"\n  [(visible)]=\"displayDialog\"\n  (onHide)=\"close()\"\n>\n  <form [formGroup]=\"formGroup\">\n    <div class=\"p-grid support-ticket-container\">\n      <div class=\"p-col-12\">\n        <label for=\"ticket-title\">Title</label>\n        <input id=\"ticket-title\" formControlName=\"title\" pInputText />\n      </div>\n      <div class=\"p-col-12\">\n        <label for=\"ticket-description\">Description</label>\n        <textarea id=\"ticket-description\" formControlName=\"description\" pInputTextarea rows=\"10\"> </textarea>\n      </div>\n      <div class=\"p-col-12\" style=\"float: right\">\n        <button pButton label=\"Submit\" (click)=\"submit()\" [disabled]=\"formGroup.invalid\"></button>\n      </div>\n    </div>\n  </form>\n</p-dialog>\n", styles: ["input,textarea{width:100%;resize:none;margin-top:5px}.support-ticket-container div{margin-top:5px}\n"] }]
        }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { displayDialog: [{
                type: Input
            }], displayDialogChange: [{
                type: Output
            }], submitTicket: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64, 