import { Component, EventEmitter, Input, Output } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "verben-ng-ui";
import * as i2 from "@angular/forms";
var Rules;
(function (Rules) {
    Rules["Pass"] = "Pass";
})(Rules || (Rules = {}));
var Tags;
(function (Tags) {
    Tags["WorkFlow"] = "Workflow";
})(Tags || (Tags = {}));
export class StageDetailsComponent {
    RulesOptions = Object.keys(Rules);
    TagsOptions = Object.keys(Tags);
    isModalVisible = false;
    stageDetail;
    modalVisibilityChange = new EventEmitter();
    onModalOpen(eventData) {
        console.log('Modal opened, received data:', eventData);
        this.modalVisibilityChange.emit(true);
    }
    onModalClose(eventData) {
        console.log('Modal closed, received data:', eventData);
        this.isModalVisible = false;
        this.modalVisibilityChange.emit(false);
    }
    convertToInt(value, data, prop) {
        data[prop] = parseInt(value);
    }
    getStringValue(data, prop) {
        return data[prop].toString();
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StageDetailsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: StageDetailsComponent, selector: "lib-stage-details", inputs: { RulesOptions: "RulesOptions", TagsOptions: "TagsOptions", isModalVisible: "isModalVisible", stageDetail: "stageDetail" }, outputs: { modalVisibilityChange: "modalVisibilityChange" }, ngImport: i0, template: "<verben-dialogue\n  [showCloseIcon]=\"true\"\n  [dismissOutsideClick]=\"true\"\n  [closeOnEscape]=\"true\"\n  [mode]=\"'drawer'\"\n  [padding]=\"'0px'\"\n  [drawerWidth]=\"'400px'\"\n  [disableFooter]=\"false\"\n  (openModal)=\"onModalOpen($event)\"\n  (closeModal)=\"onModalClose($event)\"\n  [isVisible]=\"isModalVisible\"\n  [modalData]=\"stageDetail\"\n  [headerTemplate]=\"headerTemplate\"\n  [bodyTemplate]=\"bodyTemplate\"\n  [showCloseIcon]=\"false\"\n  (closeModal)=\"onModalClose($event)\"\n>\n</verben-dialogue>\n<ng-template #headerTemplate>\n  <div class=\"bg-[#FFE681] px-6 py-4 flex justify-between items-center\">\n    <h1>Stage</h1>\n    <verben-svg\n      class=\"cursor-pointer\"\n      [icon]=\"'close-circle'\"\n      (click)=\"isModalVisible = false\"\n      [width]=\"15\"\n      [height]=\"15\"\n      [stroke]=\"'#fff'\"\n    ></verben-svg>\n  </div>\n</ng-template>\n\n<ng-template #bodyTemplate>\n  <div>\n    <div class=\"px-6 py-4 flex flex-col gap-6\">\n      <verbena-input\n        label=\"Stage Name\"\n        [(ngModel)]=\"stageDetail.Name\"\n        [border]=\"'1px solid #9A9FBF66'\"\n        placeHolder=\"Enter Stage Name\"\n        [bgColor]=\"'white'\"\n      ></verbena-input>\n      <verbena-input\n        label=\"Description\"\n        [(ngModel)]=\"stageDetail.Description\"\n        [border]=\"'1px solid #9A9FBF66'\"\n        placeHolder=\"Enter Description\"\n        [bgColor]=\"'white'\"\n      ></verbena-input>\n      <verbena-input\n        label=\"Receipient Count\"\n        [ngModel]=\"getStringValue(stageDetail, 'Count')\"\n        (valueChange)=\"convertToInt($event, stageDetail, 'Count')\"\n        [border]=\"'1px solid #9A9FBF66'\"\n        placeHolder=\"Enter Receipient Count\"\n        type=\"number\"\n        [bgColor]=\"'white'\"\n      ></verbena-input>\n      <div class=\"flex flex-col gap-1\">\n        <div>Pass On Rule</div>\n        <verben-drop-down\n          width=\"100%\"\n          [(ngModel)]=\"stageDetail.Rule\"\n          placeholder=\"Select Pass On Rule\"\n          [(options)]=\"RulesOptions\"\n        >\n        </verben-drop-down>\n      </div>\n      <verbena-input\n        [ngModel]=\"getStringValue(stageDetail, 'Duration')\"\n        (valueChange)=\"convertToInt($event, stageDetail, 'Duration')\"\n        label=\"Duration\"\n        type=\"number\"\n        [border]=\"'1px solid #9A9FBF66'\"\n        placeHolder=\"Enter Duration\"\n        [bgColor]=\"'white'\"\n      ></verbena-input>\n      <div class=\"flex flex-col gap-1\">\n        <div>Tag</div>\n        <verben-drop-down\n          width=\"100%\"\n          [(ngModel)]=\"stageDetail.Tag\"\n          placeholder=\"Select Tag\"\n          [(options)]=\"TagsOptions\"\n        >\n        </verben-drop-down>\n      </div>\n      <verbena-button\n        bgColor=\"#FFE681\"\n        [width]=\"'100%'\"\n        [text]=\"'Save'\"\n      ></verbena-button>\n    </div>\n  </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "component", type: i1.SvgComponent, selector: "verben-svg", inputs: ["icon", "width", "height", "fill", "stroke", "type", "size"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "fontSize", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "passLength", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }, { kind: "component", type: i1.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "useIcon", "svgPosition", "iconPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "svgSize", "weight", "variant", "styleType", "svg", "svgWidth", "svgHeight", "iconColor", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }, { kind: "component", type: i1.VerbenDialogueComponent, selector: "verben-dialogue", inputs: ["dialogueWidth", "headerTemplate", "bodyTemplate", "footerTemplate", "showCloseIcon", "dismissOutsideClick", "closeOnEscape", "isVisible", "size", "backdropColor", "customClass", "disableFooter", "margin", "padding", "borderRadius", "dialogueBgColor", "width", "closeIconClass", "boxShadow", "enableTransition", "modalData", "mode", "position", "drawerWidth"], outputs: ["openModal", "closeModal"] }, { kind: "component", type: i1.DropDownComponent, selector: "verben-drop-down", inputs: ["options", "width", "showHorizontalLine", "horizontalLineColor", "optionLabel", "optionSubLabel", "optionValue", "placeholder", "invalidMessage", "errorPosition", "loadMoreCaption", "display", "showClear", "lazyLoad", "selectKey", "styleClass", "group", "multiselect", "filter", "avoidDuplication", "filterBy", "debounceTime", "minChar", "disabled", "required", "load", "asyncLabel", "search"], outputs: ["optionsChange", "onChange", "onClick", "onClear"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StageDetailsComponent, decorators: [{
            type: Component,
            args: [{ selector: 'lib-stage-details', template: "<verben-dialogue\n  [showCloseIcon]=\"true\"\n  [dismissOutsideClick]=\"true\"\n  [closeOnEscape]=\"true\"\n  [mode]=\"'drawer'\"\n  [padding]=\"'0px'\"\n  [drawerWidth]=\"'400px'\"\n  [disableFooter]=\"false\"\n  (openModal)=\"onModalOpen($event)\"\n  (closeModal)=\"onModalClose($event)\"\n  [isVisible]=\"isModalVisible\"\n  [modalData]=\"stageDetail\"\n  [headerTemplate]=\"headerTemplate\"\n  [bodyTemplate]=\"bodyTemplate\"\n  [showCloseIcon]=\"false\"\n  (closeModal)=\"onModalClose($event)\"\n>\n</verben-dialogue>\n<ng-template #headerTemplate>\n  <div class=\"bg-[#FFE681] px-6 py-4 flex justify-between items-center\">\n    <h1>Stage</h1>\n    <verben-svg\n      class=\"cursor-pointer\"\n      [icon]=\"'close-circle'\"\n      (click)=\"isModalVisible = false\"\n      [width]=\"15\"\n      [height]=\"15\"\n      [stroke]=\"'#fff'\"\n    ></verben-svg>\n  </div>\n</ng-template>\n\n<ng-template #bodyTemplate>\n  <div>\n    <div class=\"px-6 py-4 flex flex-col gap-6\">\n      <verbena-input\n        label=\"Stage Name\"\n        [(ngModel)]=\"stageDetail.Name\"\n        [border]=\"'1px solid #9A9FBF66'\"\n        placeHolder=\"Enter Stage Name\"\n        [bgColor]=\"'white'\"\n      ></verbena-input>\n      <verbena-input\n        label=\"Description\"\n        [(ngModel)]=\"stageDetail.Description\"\n        [border]=\"'1px solid #9A9FBF66'\"\n        placeHolder=\"Enter Description\"\n        [bgColor]=\"'white'\"\n      ></verbena-input>\n      <verbena-input\n        label=\"Receipient Count\"\n        [ngModel]=\"getStringValue(stageDetail, 'Count')\"\n        (valueChange)=\"convertToInt($event, stageDetail, 'Count')\"\n        [border]=\"'1px solid #9A9FBF66'\"\n        placeHolder=\"Enter Receipient Count\"\n        type=\"number\"\n        [bgColor]=\"'white'\"\n      ></verbena-input>\n      <div class=\"flex flex-col gap-1\">\n        <div>Pass On Rule</div>\n        <verben-drop-down\n          width=\"100%\"\n          [(ngModel)]=\"stageDetail.Rule\"\n          placeholder=\"Select Pass On Rule\"\n          [(options)]=\"RulesOptions\"\n        >\n        </verben-drop-down>\n      </div>\n      <verbena-input\n        [ngModel]=\"getStringValue(stageDetail, 'Duration')\"\n        (valueChange)=\"convertToInt($event, stageDetail, 'Duration')\"\n        label=\"Duration\"\n        type=\"number\"\n        [border]=\"'1px solid #9A9FBF66'\"\n        placeHolder=\"Enter Duration\"\n        [bgColor]=\"'white'\"\n      ></verbena-input>\n      <div class=\"flex flex-col gap-1\">\n        <div>Tag</div>\n        <verben-drop-down\n          width=\"100%\"\n          [(ngModel)]=\"stageDetail.Tag\"\n          placeholder=\"Select Tag\"\n          [(options)]=\"TagsOptions\"\n        >\n        </verben-drop-down>\n      </div>\n      <verbena-button\n        bgColor=\"#FFE681\"\n        [width]=\"'100%'\"\n        [text]=\"'Save'\"\n      ></verbena-button>\n    </div>\n  </div>\n</ng-template>\n" }]
        }], propDecorators: { RulesOptions: [{
                type: Input
            }], TagsOptions: [{
                type: Input
            }], isModalVisible: [{
                type: Input
            }], stageDetail: [{
                type: Input
            }], modalVisibilityChange: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64, 