import { Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@progress/kendo-angular-dialog";
import * as i2 from "@progress/kendo-angular-buttons";
import * as i3 from "./action-test-harness.component";
function ActionTestHarnessDialogComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtext(0);
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵtextInterpolate1(" Action Test Harness - ", ctx_r0.action.Name, " ");
} }
function ActionTestHarnessDialogComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtext(0, " Action Test Harness ");
} }
function ActionTestHarnessDialogComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "mj-action-test-harness", 3);
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("action", ctx_r0.action)("actionParams", ctx_r0.actionParams);
} }
function ActionTestHarnessDialogComponent_Conditional_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 4);
    i0.ɵɵelement(1, "i", 6);
    i0.ɵɵtext(2, " Loading... ");
    i0.ɵɵelementEnd();
} }
export class ActionTestHarnessDialogComponent {
    constructor(dialog) {
        this.dialog = dialog;
        this.actionParams = [];
    }
    ngOnInit() {
        // Any initialization if needed
    }
    close() {
        this.dialog.close();
    }
    static { this.ɵfac = function ActionTestHarnessDialogComponent_Factory(t) { return new (t || ActionTestHarnessDialogComponent)(i0.ɵɵdirectiveInject(i1.DialogRef)); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ActionTestHarnessDialogComponent, selectors: [["mj-action-test-harness-dialog"]], inputs: { action: "action", actionParams: "actionParams" }, decls: 11, vars: 2, consts: [[2, "display", "flex", "align-items", "center", "gap", "12px"], [1, "fa-solid", "fa-flask", 2, "color", "#6f42c1"], [2, "max-height", "80vh", "overflow-y", "auto"], [3, "action", "actionParams"], [2, "padding", "20px", "text-align", "center"], ["kendoButton", "", 3, "click"], [1, "fa-solid", "fa-spinner", "fa-spin"]], template: function ActionTestHarnessDialogComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "kendo-dialog-titlebar")(1, "div", 0);
            i0.ɵɵelement(2, "i", 1);
            i0.ɵɵtemplate(3, ActionTestHarnessDialogComponent_Conditional_3_Template, 1, 1)(4, ActionTestHarnessDialogComponent_Conditional_4_Template, 1, 0);
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(5, "div", 2);
            i0.ɵɵtemplate(6, ActionTestHarnessDialogComponent_Conditional_6_Template, 1, 2, "mj-action-test-harness", 3)(7, ActionTestHarnessDialogComponent_Conditional_7_Template, 3, 0, "div", 4);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(8, "kendo-dialog-actions")(9, "button", 5);
            i0.ɵɵlistener("click", function ActionTestHarnessDialogComponent_Template_button_click_9_listener() { return ctx.close(); });
            i0.ɵɵtext(10, "Close");
            i0.ɵɵelementEnd()();
        } if (rf & 2) {
            i0.ɵɵadvance(3);
            i0.ɵɵconditional(ctx.action ? 3 : 4);
            i0.ɵɵadvance(3);
            i0.ɵɵconditional(ctx.action ? 6 : 7);
        } }, dependencies: [i1.DialogTitleBarComponent, i1.DialogActionsComponent, i2.ButtonComponent, i3.ActionTestHarnessComponent], styles: ["[_nghost-%COMP%] {\n            display: block;\n        }"] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActionTestHarnessDialogComponent, [{
        type: Component,
        args: [{ selector: 'mj-action-test-harness-dialog', template: `
        <kendo-dialog-titlebar>
            <div style="display: flex; align-items: center; gap: 12px;">
                <i class="fa-solid fa-flask" style="color: #6f42c1;"></i>
                @if (action) {
                    Action Test Harness - {{ action.Name }}
                } @else {
                    Action Test Harness
                }
            </div>
        </kendo-dialog-titlebar>
        
        <div style="max-height: 80vh; overflow-y: auto;">
            @if (action) {
                <mj-action-test-harness 
                    [action]="action"
                    [actionParams]="actionParams">
                </mj-action-test-harness>
            } @else {
                <div style="padding: 20px; text-align: center;">
                    <i class="fa-solid fa-spinner fa-spin"></i>
                    Loading...
                </div>
            }
        </div>
        
        <kendo-dialog-actions>
            <button kendoButton (click)="close()">Close</button>
        </kendo-dialog-actions>
    `, styles: ["\n        :host {\n            display: block;\n        }\n    "] }]
    }], () => [{ type: i1.DialogRef }], { action: [{
            type: Input
        }], actionParams: [{
            type: Input
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ActionTestHarnessDialogComponent, { className: "ActionTestHarnessDialogComponent", filePath: "src/lib/custom/Actions/action-test-harness-dialog.component.ts", lineNumber: 43 }); })();
//# sourceMappingURL=action-test-harness-dialog.component.js.map