var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { Component } from '@angular/core';
import { RegisterClass, ParseJSONRecursive } from '@memberjunction/global';
import { BaseFormComponent } from '@memberjunction/ng-base-forms';
import { SharedService } from '@memberjunction/ng-shared';
import { Metadata, CompositeKey } from '@memberjunction/core';
import { MJActionExecutionLogFormComponent } from '../../generated/Entities/MJActionExecutionLog/mjactionexecutionlog.form.component';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/forms";
import * as i3 from "@progress/kendo-angular-layout";
import * as i4 from "@memberjunction/ng-code-editor";
function MJActionExecutionLogFormComponentExtended_Conditional_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 9);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(ctx_r0.action.Name);
} }
function MJActionExecutionLogFormComponentExtended_Conditional_28_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 17)(1, "span", 18);
    i0.ɵɵtext(2, "Ended");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "span", 19);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "date");
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(5, 1, ctx_r0.record.EndedAt, "short"));
} }
function MJActionExecutionLogFormComponentExtended_Conditional_29_Template(rf, ctx) { if (rf & 1) {
    const _r2 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 17)(1, "span", 18);
    i0.ɵɵtext(2, "Action");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "span", 19)(4, "button", 29);
    i0.ɵɵlistener("click", function MJActionExecutionLogFormComponentExtended_Conditional_29_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.navigateToAction()); });
    i0.ɵɵtext(5);
    i0.ɵɵelement(6, "i", 30);
    i0.ɵɵelementEnd()()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate1(" ", ctx_r0.action.Name, " ");
} }
function MJActionExecutionLogFormComponentExtended_Conditional_30_Template(rf, ctx) { if (rf & 1) {
    const _r3 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 17)(1, "span", 18);
    i0.ɵɵtext(2, "User");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "span", 19)(4, "button", 29);
    i0.ɵɵlistener("click", function MJActionExecutionLogFormComponentExtended_Conditional_30_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.navigateToUser()); });
    i0.ɵɵtext(5);
    i0.ɵɵelement(6, "i", 30);
    i0.ɵɵelementEnd()()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate1(" ", ctx_r0.user.Name, " ");
} }
function MJActionExecutionLogFormComponentExtended_ng_template_34_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 31)(1, "div", 32)(2, "label");
    i0.ɵɵtext(3, "Execution ID");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "span", 33);
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(6, "div", 32)(7, "label");
    i0.ɵɵtext(8, "Action ID");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(9, "span", 33);
    i0.ɵɵtext(10);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(11, "div", 32)(12, "label");
    i0.ɵɵtext(13, "User ID");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(14, "span", 33);
    i0.ɵɵtext(15);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(16, "div", 32)(17, "label");
    i0.ɵɵtext(18, "Result Code");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(19, "span", 34);
    i0.ɵɵelement(20, "i", 13);
    i0.ɵɵelementStart(21, "span");
    i0.ɵɵtext(22);
    i0.ɵɵelementEnd()()();
    i0.ɵɵelementStart(23, "div", 32)(24, "label");
    i0.ɵɵtext(25, "Duration");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(26, "span");
    i0.ɵɵtext(27);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(28, "div", 32)(29, "label");
    i0.ɵɵtext(30, "Retention Period");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(31, "span");
    i0.ɵɵtext(32);
    i0.ɵɵelementEnd()()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r0.record.ID);
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r0.record.ActionID);
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r0.record.UserID);
    i0.ɵɵadvance(5);
    i0.ɵɵstyleProp("color", ctx_r0.getResultCodeColor());
    i0.ɵɵproperty("ngClass", ctx_r0.getResultCodeIcon());
    i0.ɵɵadvance();
    i0.ɵɵstyleProp("color", ctx_r0.getResultCodeColor());
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(ctx_r0.record.ResultCode || "N/A");
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r0.formatDuration(ctx_r0.getExecutionDuration()));
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r0.record.RetentionPeriod ? ctx_r0.record.RetentionPeriod + " days" : "Indefinite");
} }
function MJActionExecutionLogFormComponentExtended_Conditional_35_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    const _r4 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 35)(1, "div", 36)(2, "span", 37);
    i0.ɵɵtext(3, "JSON (Input Parameters Only)");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "button", 38);
    i0.ɵɵlistener("click", function MJActionExecutionLogFormComponentExtended_Conditional_35_ng_template_1_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.copyToClipboard(ctx_r0.formattedInputParams)); });
    i0.ɵɵelement(5, "i", 39);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(6, "mj-code-editor", 40);
    i0.ɵɵtwoWayListener("ngModelChange", function MJActionExecutionLogFormComponentExtended_Conditional_35_ng_template_1_Template_mj_code_editor_ngModelChange_6_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.formattedInputParams, $event) || (ctx_r0.formattedInputParams = $event); return i0.ɵɵresetView($event); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(6);
    i0.ɵɵtwoWayProperty("ngModel", ctx_r0.formattedInputParams);
    i0.ɵɵproperty("readonly", true)("language", "json")("lineWrapping", true);
} }
function MJActionExecutionLogFormComponentExtended_Conditional_35_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "kendo-panelbar-item", 24);
    i0.ɵɵtemplate(1, MJActionExecutionLogFormComponentExtended_Conditional_35_ng_template_1_Template, 7, 4, "ng-template", 23);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("expanded", ctx_r0.expandedSections.inputParams);
} }
function MJActionExecutionLogFormComponentExtended_Conditional_36_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 35)(1, "div", 36)(2, "span", 37);
    i0.ɵɵtext(3, "JSON (Output Parameters Only)");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "button", 38);
    i0.ɵɵlistener("click", function MJActionExecutionLogFormComponentExtended_Conditional_36_ng_template_1_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.copyToClipboard(ctx_r0.formattedOutputParams)); });
    i0.ɵɵelement(5, "i", 39);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(6, "mj-code-editor", 41);
    i0.ɵɵtwoWayListener("ngModelChange", function MJActionExecutionLogFormComponentExtended_Conditional_36_ng_template_1_Template_mj_code_editor_ngModelChange_6_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.formattedOutputParams, $event) || (ctx_r0.formattedOutputParams = $event); return i0.ɵɵresetView($event); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(6);
    i0.ɵɵtwoWayProperty("ngModel", ctx_r0.formattedOutputParams);
    i0.ɵɵproperty("readonly", true)("language", "json")("lineWrapping", true);
} }
function MJActionExecutionLogFormComponentExtended_Conditional_36_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "kendo-panelbar-item", 25);
    i0.ɵɵtemplate(1, MJActionExecutionLogFormComponentExtended_Conditional_36_ng_template_1_Template, 7, 4, "ng-template", 23);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("expanded", ctx_r0.expandedSections.outputParams);
} }
function MJActionExecutionLogFormComponentExtended_Conditional_37_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    const _r6 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 35)(1, "div", 36)(2, "span", 37);
    i0.ɵɵtext(3, "JSON (Input+Output Parameters)");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "button", 38);
    i0.ɵɵlistener("click", function MJActionExecutionLogFormComponentExtended_Conditional_37_ng_template_1_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.copyToClipboard(ctx_r0.formattedBothParams)); });
    i0.ɵɵelement(5, "i", 39);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(6, "mj-code-editor", 42);
    i0.ɵɵtwoWayListener("ngModelChange", function MJActionExecutionLogFormComponentExtended_Conditional_37_ng_template_1_Template_mj_code_editor_ngModelChange_6_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.formattedBothParams, $event) || (ctx_r0.formattedBothParams = $event); return i0.ɵɵresetView($event); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(6);
    i0.ɵɵtwoWayProperty("ngModel", ctx_r0.formattedBothParams);
    i0.ɵɵproperty("readonly", true)("language", "json")("lineWrapping", true);
} }
function MJActionExecutionLogFormComponentExtended_Conditional_37_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "kendo-panelbar-item", 26);
    i0.ɵɵtemplate(1, MJActionExecutionLogFormComponentExtended_Conditional_37_ng_template_1_Template, 7, 4, "ng-template", 23);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("expanded", ctx_r0.expandedSections.bothParams);
} }
function MJActionExecutionLogFormComponentExtended_Conditional_38_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    const _r7 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 35)(1, "div", 36)(2, "span", 37);
    i0.ɵɵtext(3, "JSON");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "button", 38);
    i0.ɵɵlistener("click", function MJActionExecutionLogFormComponentExtended_Conditional_38_ng_template_1_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r7); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.copyToClipboard(ctx_r0.formattedMessage)); });
    i0.ɵɵelement(5, "i", 39);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(6, "mj-code-editor", 43);
    i0.ɵɵtwoWayListener("ngModelChange", function MJActionExecutionLogFormComponentExtended_Conditional_38_ng_template_1_Template_mj_code_editor_ngModelChange_6_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.formattedMessage, $event) || (ctx_r0.formattedMessage = $event); return i0.ɵɵresetView($event); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(6);
    i0.ɵɵtwoWayProperty("ngModel", ctx_r0.formattedMessage);
    i0.ɵɵproperty("readonly", true)("language", "json")("lineWrapping", true);
} }
function MJActionExecutionLogFormComponentExtended_Conditional_38_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "kendo-panelbar-item", 27);
    i0.ɵɵtemplate(1, MJActionExecutionLogFormComponentExtended_Conditional_38_ng_template_1_Template, 7, 4, "ng-template", 23);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("expanded", ctx_r0.expandedSections.output);
} }
function MJActionExecutionLogFormComponentExtended_Conditional_39_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 44);
    i0.ɵɵelement(1, "i", 45);
    i0.ɵɵelementStart(2, "p");
    i0.ɵɵtext(3, "No execution data recorded");
    i0.ɵɵelementEnd()();
} }
function MJActionExecutionLogFormComponentExtended_Conditional_39_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "kendo-panelbar-item", 28);
    i0.ɵɵtemplate(1, MJActionExecutionLogFormComponentExtended_Conditional_39_ng_template_1_Template, 4, 0, "ng-template", 23);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵproperty("expanded", true);
} }
let MJActionExecutionLogFormComponentExtended = class MJActionExecutionLogFormComponentExtended extends MJActionExecutionLogFormComponent {
    constructor() {
        super(...arguments);
        // Related entities
        this.action = null;
        this.user = null;
        // Parameter counts for visibility
        this.hasInputParams = false;
        this.hasOutputParams = false;
        this.hasBothParams = false;
        // Loading states
        this.isLoadingAction = false;
        this.isLoadingUser = false;
        // Formatted JSON fields
        this.formattedParams = '';
        this.formattedMessage = '';
        this.formattedInputParams = '';
        this.formattedOutputParams = '';
        this.formattedBothParams = '';
        // UI state
        this.expandedSections = {
            execution: true,
            input: true,
            output: true,
            inputParams: true,
            outputParams: true,
            bothParams: true,
            metadata: false
        };
    }
    async ngOnInit() {
        await super.ngOnInit();
        if (this.record?.IsSaved) {
            // Load related data
            await Promise.all([
                this.loadAction(),
                this.loadUser()
            ]);
            // Format JSON fields
            this.formatJSONFields();
            this.cdr.detectChanges();
        }
    }
    async loadAction() {
        if (!this.record.ActionID)
            return;
        this.isLoadingAction = true;
        try {
            const md = new Metadata();
            this.action = await md.GetEntityObject('MJ: Actions');
            if (this.action) {
                await this.action.Load(this.record.ActionID);
            }
        }
        catch (error) {
            console.error('Error loading action:', error);
        }
        finally {
            this.isLoadingAction = false;
        }
    }
    async loadUser() {
        if (!this.record.UserID)
            return;
        this.isLoadingUser = true;
        try {
            const md = new Metadata();
            this.user = await md.GetEntityObject('MJ: Users');
            if (this.user) {
                await this.user.Load(this.record.UserID);
            }
        }
        catch (error) {
            console.error('Error loading user:', error);
        }
        finally {
            this.isLoadingUser = false;
        }
    }
    formatJSONFields() {
        const parseOptions = {
            extractInlineJson: true,
            maxDepth: 100,
            debug: false
        };
        // Format Params with recursive JSON parsing
        if (this.record.Params) {
            try {
                const parsed = JSON.parse(this.record.Params);
                const recursivelyParsed = ParseJSONRecursive(parsed, parseOptions);
                this.formattedParams = JSON.stringify(recursivelyParsed, null, 2);
                // Format parameter-specific views if params is an array of ActionParameter objects
                if (Array.isArray(recursivelyParsed)) {
                    this.formatParameterSections(recursivelyParsed);
                }
            }
            catch (e) {
                this.formattedParams = this.record.Params;
            }
        }
        // Format Message field with recursive JSON parsing
        if (this.record.Message) {
            try {
                const parsed = JSON.parse(this.record.Message);
                const recursivelyParsed = ParseJSONRecursive(parsed, parseOptions);
                this.formattedMessage = JSON.stringify(recursivelyParsed, null, 2);
            }
            catch (e) {
                this.formattedMessage = this.record.Message;
            }
        }
    }
    formatParameterSections(params) {
        // Reset visibility flags
        this.hasInputParams = false;
        this.hasOutputParams = false;
        this.hasBothParams = false;
        // Arrays to collect parameters by type
        const inputParams = [];
        const outputParams = [];
        const bothParams = [];
        // Sort parameters by type
        for (const param of params) {
            switch (param.Type) {
                case 'Input':
                    inputParams.push(param);
                    this.hasInputParams = true;
                    break;
                case 'Output':
                    outputParams.push(param);
                    this.hasOutputParams = true;
                    break;
                case 'Both':
                    bothParams.push(param);
                    this.hasBothParams = true;
                    break;
            }
        }
        // Format input parameters
        if (inputParams.length > 0) {
            this.formattedInputParams = JSON.stringify(inputParams, null, 2);
        }
        // Format output parameters
        if (outputParams.length > 0) {
            this.formattedOutputParams = JSON.stringify(outputParams, null, 2);
        }
        // Format both parameters
        if (bothParams.length > 0) {
            this.formattedBothParams = JSON.stringify(bothParams, null, 2);
        }
    }
    // Navigation
    navigateToEntity(entityName, recordId) {
        if (!recordId)
            return;
        SharedService.Instance.OpenEntityRecord(entityName, CompositeKey.FromID(recordId));
    }
    navigateToAction() {
        if (this.record.ActionID) {
            this.navigateToEntity('MJ: Actions', this.record.ActionID);
        }
    }
    navigateToUser() {
        if (this.record.UserID) {
            this.navigateToEntity('MJ: Users', this.record.UserID);
        }
    }
    // UI Helpers
    getExecutionDuration() {
        if (!this.record.StartedAt || !this.record.EndedAt)
            return 0;
        return new Date(this.record.EndedAt).getTime() - new Date(this.record.StartedAt).getTime();
    }
    formatDuration(ms) {
        if (ms < 1000)
            return `${ms}ms`;
        if (ms < 60000)
            return `${(ms / 1000).toFixed(1)}s`;
        if (ms < 3600000)
            return `${(ms / 60000).toFixed(1)}m`;
        return `${(ms / 3600000).toFixed(1)}h`;
    }
    getResultCodeColor() {
        const code = this.record.ResultCode?.toLowerCase();
        if (code === 'success' || code === 'ok' || code === 'completed' || code === '200') {
            return 'var(--mj-status-success)';
        }
        return 'var(--mj-status-error)';
    }
    getResultCodeIcon() {
        const code = this.record.ResultCode?.toLowerCase();
        if (code === 'success' || code === 'ok' || code === 'completed' || code === '200') {
            return 'fa-check-circle';
        }
        return 'fa-times-circle';
    }
    // Save handlers for JSON fields
    async saveParams() {
        if (!this.EditMode)
            return;
        try {
            // Validate JSON
            JSON.parse(this.formattedParams);
            this.record.Params = this.formattedParams;
            await this.record.Save();
        }
        catch (e) {
            console.error('Invalid JSON in Params field:', e);
            // Could show notification here
        }
    }
    async saveMessage() {
        if (!this.EditMode)
            return;
        try {
            // Validate JSON
            JSON.parse(this.formattedMessage);
            this.record.Message = this.formattedMessage;
            await this.record.Save();
        }
        catch (e) {
            console.error('Invalid JSON in Message field:', e);
            // Could show notification here
        }
    }
    async copyToClipboard(text) {
        try {
            await navigator.clipboard.writeText(text);
            // Could show a toast notification here
        }
        catch (err) {
            console.error('Failed to copy to clipboard:', err);
        }
    }
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵMJActionExecutionLogFormComponentExtended_BaseFactory; return function MJActionExecutionLogFormComponentExtended_Factory(__ngFactoryType__) { return (ɵMJActionExecutionLogFormComponentExtended_BaseFactory || (ɵMJActionExecutionLogFormComponentExtended_BaseFactory = i0.ɵɵgetInheritedFactory(MJActionExecutionLogFormComponentExtended)))(__ngFactoryType__ || MJActionExecutionLogFormComponentExtended); }; })(); }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJActionExecutionLogFormComponentExtended, selectors: [["mj-action-execution-log-form"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 40, vars: 20, consts: [[1, "record-form-container", "action-execution-log-form", 2, "height", "100%", "display", "flex", "flex-direction", "column"], [1, "record-form", 2, "display", "flex", "flex-direction", "column", "height", "100%", "overflow", "hidden"], [1, "header"], [1, "header-content"], [1, "header-left"], [1, "icon-wrapper"], [1, "fas", "fa-terminal"], [1, "header-info"], [1, "meta-info"], [1, "action-name"], [1, "log-id"], [1, "header-right"], [1, "status-badge"], [1, "fas", 3, "ngClass"], [1, "execution-time"], [1, "fas", "fa-clock"], [1, "header-stats"], [1, "stat"], [1, "label"], [1, "value"], [1, "content-area"], [3, "keepItemContent"], ["title", "Execution Details", 3, "expanded"], ["kendoPanelBarContent", ""], ["title", "Input Parameters", 3, "expanded"], ["title", "Output Parameters", 3, "expanded"], ["title", "Input+Output Parameters", 3, "expanded"], ["title", "Output Message", 3, "expanded"], ["title", "Execution Data", 3, "expanded"], [1, "btn-link", 3, "click"], [1, "fas", "fa-external-link-alt"], [1, "details-grid"], [1, "detail-item"], [1, "monospace"], [1, "detail-value"], [1, "json-viewer"], [1, "json-toolbar"], [1, "json-label"], ["title", "Copy JSON", 1, "btn-icon", 3, "click"], [1, "fas", "fa-copy"], ["name", "formattedInputParams", 2, "height", "300px", "width", "100%", 3, "ngModelChange", "ngModel", "readonly", "language", "lineWrapping"], ["name", "formattedOutputParams", 2, "height", "300px", "width", "100%", 3, "ngModelChange", "ngModel", "readonly", "language", "lineWrapping"], ["name", "formattedBothParams", 2, "height", "300px", "width", "100%", 3, "ngModelChange", "ngModel", "readonly", "language", "lineWrapping"], ["name", "formattedMessage", 2, "height", "300px", "width", "100%", 3, "ngModelChange", "ngModel", "readonly", "language", "lineWrapping"], [1, "empty-state"], [1, "fas", "fa-inbox"]], template: function MJActionExecutionLogFormComponentExtended_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "div", 3)(4, "div", 4)(5, "div", 5);
            i0.ɵɵelement(6, "i", 6);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(7, "div", 7)(8, "h2");
            i0.ɵɵtext(9, "Action Execution Log");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(10, "div", 8);
            i0.ɵɵconditionalCreate(11, MJActionExecutionLogFormComponentExtended_Conditional_11_Template, 2, 1, "span", 9);
            i0.ɵɵelementStart(12, "span", 10);
            i0.ɵɵtext(13);
            i0.ɵɵelementEnd()()()();
            i0.ɵɵelementStart(14, "div", 11)(15, "div", 12);
            i0.ɵɵelement(16, "i", 13);
            i0.ɵɵtext(17);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(18, "div", 14);
            i0.ɵɵelement(19, "i", 15);
            i0.ɵɵtext(20);
            i0.ɵɵelementEnd()()();
            i0.ɵɵelementStart(21, "div", 16)(22, "div", 17)(23, "span", 18);
            i0.ɵɵtext(24, "Started");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(25, "span", 19);
            i0.ɵɵtext(26);
            i0.ɵɵpipe(27, "date");
            i0.ɵɵelementEnd()();
            i0.ɵɵconditionalCreate(28, MJActionExecutionLogFormComponentExtended_Conditional_28_Template, 6, 4, "div", 17);
            i0.ɵɵconditionalCreate(29, MJActionExecutionLogFormComponentExtended_Conditional_29_Template, 7, 1, "div", 17);
            i0.ɵɵconditionalCreate(30, MJActionExecutionLogFormComponentExtended_Conditional_30_Template, 7, 1, "div", 17);
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(31, "div", 20)(32, "kendo-panelbar", 21)(33, "kendo-panelbar-item", 22);
            i0.ɵɵtemplate(34, MJActionExecutionLogFormComponentExtended_ng_template_34_Template, 33, 11, "ng-template", 23);
            i0.ɵɵelementEnd();
            i0.ɵɵconditionalCreate(35, MJActionExecutionLogFormComponentExtended_Conditional_35_Template, 2, 1, "kendo-panelbar-item", 24);
            i0.ɵɵconditionalCreate(36, MJActionExecutionLogFormComponentExtended_Conditional_36_Template, 2, 1, "kendo-panelbar-item", 25);
            i0.ɵɵconditionalCreate(37, MJActionExecutionLogFormComponentExtended_Conditional_37_Template, 2, 1, "kendo-panelbar-item", 26);
            i0.ɵɵconditionalCreate(38, MJActionExecutionLogFormComponentExtended_Conditional_38_Template, 2, 1, "kendo-panelbar-item", 27);
            i0.ɵɵconditionalCreate(39, MJActionExecutionLogFormComponentExtended_Conditional_39_Template, 2, 1, "kendo-panelbar-item", 28);
            i0.ɵɵelementEnd()()()();
        } if (rf & 2) {
            i0.ɵɵadvance(11);
            i0.ɵɵconditional(ctx.action ? 11 : -1);
            i0.ɵɵadvance(2);
            i0.ɵɵtextInterpolate(ctx.record.ID);
            i0.ɵɵadvance(2);
            i0.ɵɵattribute("data-status", ctx.record.ResultCode == null ? null : ctx.record.ResultCode.toLowerCase());
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngClass", ctx.getResultCodeIcon());
            i0.ɵɵadvance();
            i0.ɵɵtextInterpolate1(" ", ctx.record.ResultCode || "UNKNOWN", " ");
            i0.ɵɵadvance(3);
            i0.ɵɵtextInterpolate1(" ", ctx.formatDuration(ctx.getExecutionDuration()), " ");
            i0.ɵɵadvance(6);
            i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(27, 17, ctx.record.StartedAt, "short"));
            i0.ɵɵadvance(2);
            i0.ɵɵconditional(ctx.record.EndedAt ? 28 : -1);
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.action ? 29 : -1);
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.user ? 30 : -1);
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("keepItemContent", true);
            i0.ɵɵadvance();
            i0.ɵɵproperty("expanded", true);
            i0.ɵɵadvance(2);
            i0.ɵɵconditional(ctx.hasInputParams && ctx.formattedInputParams ? 35 : -1);
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.hasOutputParams && ctx.formattedOutputParams ? 36 : -1);
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.hasBothParams && ctx.formattedBothParams ? 37 : -1);
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.record.Message ? 38 : -1);
            i0.ɵɵadvance();
            i0.ɵɵconditional(!ctx.record.Params && !ctx.record.Message && !ctx.hasInputParams && !ctx.hasOutputParams && !ctx.hasBothParams ? 39 : -1);
        } }, dependencies: [i1.NgClass, i2.NgControlStatus, i2.NgModel, i3.PanelBarComponent, i3.PanelBarItemComponent, i3.PanelBarContentDirective, i4.CodeEditorComponent, i1.DatePipe], styles: ["\n\n[_nghost-%COMP%] {\n  display: block;\n  height: 100%;\n}\n\n.action-execution-log-form[_ngcontent-%COMP%] {\n  height: 100%;\n  display: flex;\n  flex-direction: column;\n  overflow: hidden;\n  background: var(--mj-bg-page);\n  color: var(--mj-text-primary);\n}\n\n\n\n.header[_ngcontent-%COMP%] {\n  background: var(--mj-bg-surface-card);\n  border-bottom: 1px solid var(--mj-border-default);\n  padding: 20px;\n  box-shadow: var(--mj-shadow-sm);\n}\n\n.header-content[_ngcontent-%COMP%] {\n  display: flex;\n  justify-content: space-between;\n  align-items: flex-start;\n  margin-bottom: 16px;\n}\n\n.header-left[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: center;\n  gap: 16px;\n}\n\n.icon-wrapper[_ngcontent-%COMP%] {\n  width: 48px;\n  height: 48px;\n  background: var(--mj-status-info);\n  border-radius: var(--mj-radius-lg);\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  color: var(--mj-text-inverse);\n  font-size: var(--mj-text-xl);\n  box-shadow: var(--mj-shadow-sm);\n}\n\n.header-info[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%] {\n  margin: 0;\n  font-size: var(--mj-text-2xl);\n  font-weight: var(--mj-font-semibold);\n  color: var(--mj-text-primary);\n}\n\n.meta-info[_ngcontent-%COMP%] {\n  display: flex;\n  gap: 12px;\n  margin-top: 4px;\n  font-size: var(--mj-text-sm);\n  color: var(--mj-text-muted);\n}\n\n.action-name[_ngcontent-%COMP%] {\n  font-weight: var(--mj-font-medium);\n  color: var(--mj-text-secondary);\n}\n\n.log-id[_ngcontent-%COMP%] {\n  font-family: monospace;\n  font-size: var(--mj-text-xs);\n  opacity: 0.7;\n}\n\n.header-right[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: center;\n  gap: 16px;\n}\n\n.status-badge[_ngcontent-%COMP%] {\n  padding: 6px 16px;\n  border-radius: var(--mj-radius-full);\n  font-size: var(--mj-text-xs);\n  font-weight: var(--mj-font-semibold);\n  text-transform: uppercase;\n  letter-spacing: 0.5px;\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  color: var(--mj-text-inverse);\n}\n\n.execution-time[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: center;\n  gap: 6px;\n  font-size: var(--mj-text-sm);\n  color: var(--mj-text-muted);\n}\n\n.header-stats[_ngcontent-%COMP%] {\n  display: flex;\n  gap: 24px;\n  padding-top: 12px;\n  border-top: 1px solid var(--mj-border-default);\n}\n\n.stat[_ngcontent-%COMP%] {\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n}\n\n.stat[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%] {\n  font-size: var(--mj-text-xs);\n  color: var(--mj-text-muted);\n  text-transform: uppercase;\n  letter-spacing: 0.5px;\n}\n\n.stat[_ngcontent-%COMP%]   .value[_ngcontent-%COMP%] {\n  font-size: var(--mj-text-sm);\n  font-weight: var(--mj-font-medium);\n  color: var(--mj-text-secondary);\n}\n\n.record-form[_ngcontent-%COMP%] {\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  min-height: 0;\n}\n\n\n\n.content-area[_ngcontent-%COMP%] {\n  flex: 1;\n  min-height: 0;\n  overflow-y: auto;\n  padding: 20px;\n}\n\n\n\n.details-grid[_ngcontent-%COMP%] {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n  gap: 20px;\n  padding: 20px;\n}\n\n.detail-item[_ngcontent-%COMP%] {\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n}\n\n.detail-item[_ngcontent-%COMP%]   label[_ngcontent-%COMP%] {\n  font-size: var(--mj-text-xs);\n  color: var(--mj-text-muted);\n  text-transform: uppercase;\n  letter-spacing: 0.5px;\n  font-weight: var(--mj-font-semibold);\n}\n\n.detail-value[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  color: var(--mj-text-primary);\n}\n\n.btn-link[_ngcontent-%COMP%] {\n  background: none;\n  border: none;\n  color: var(--mj-brand-primary);\n  cursor: pointer;\n  font-size: var(--mj-text-sm);\n  padding: 4px;\n}\n\n.btn-link[_ngcontent-%COMP%]:hover {\n  color: var(--mj-brand-primary-hover);\n}\n\n.loading[_ngcontent-%COMP%] {\n  color: var(--mj-text-muted);\n  font-size: var(--mj-text-xs);\n}\n\n\n\n.json-viewer[_ngcontent-%COMP%] {\n  padding: 20px;\n  background: var(--mj-bg-surface-sunken);\n  border-radius: var(--mj-radius-md);\n  margin-bottom: 20px;\n}\n\n.json-toolbar[_ngcontent-%COMP%] {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-bottom: 12px;\n}\n\n.json-label[_ngcontent-%COMP%] {\n  background: var(--mj-status-info);\n  color: var(--mj-text-inverse);\n  padding: 4px 12px;\n  border-radius: var(--mj-radius-full);\n  font-size: 11px;\n  font-weight: var(--mj-font-semibold);\n  text-transform: uppercase;\n  letter-spacing: 0.5px;\n}\n\n.btn-icon[_ngcontent-%COMP%] {\n  width: 32px;\n  height: 32px;\n  border: 1px solid var(--mj-border-default);\n  background: var(--mj-bg-surface);\n  border-radius: var(--mj-radius-sm);\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  cursor: pointer;\n  transition: all var(--mj-transition-base);\n  color: var(--mj-text-muted);\n}\n\n.btn-icon[_ngcontent-%COMP%]:hover {\n  background: var(--mj-bg-surface-hover);\n  border-color: var(--mj-border-strong);\n  color: var(--mj-text-secondary);\n}\n\n\n\n.status-badge[data-status=\"success\"][_ngcontent-%COMP%], \n.status-badge[data-status=\"ok\"][_ngcontent-%COMP%], \n.status-badge[data-status=\"completed\"][_ngcontent-%COMP%], \n.status-badge[data-status=\"200\"][_ngcontent-%COMP%] {\n  background-color: var(--mj-status-success);\n  color: var(--mj-text-inverse);\n}\n\n.status-badge[data-status=\"error\"][_ngcontent-%COMP%], \n.status-badge[data-status=\"failed\"][_ngcontent-%COMP%], \n.status-badge[data-status=\"failure\"][_ngcontent-%COMP%] {\n  background-color: var(--mj-status-error);\n  color: var(--mj-text-inverse);\n}\n\n.status-badge[data-status=\"warning\"][_ngcontent-%COMP%], \n.status-badge[data-status=\"pending\"][_ngcontent-%COMP%] {\n  background-color: var(--mj-status-warning);\n  color: var(--mj-color-warning-800);\n}\n\n.status-badge[data-status=\"info\"][_ngcontent-%COMP%], \n.status-badge[data-status=\"running\"][_ngcontent-%COMP%] {\n  background-color: var(--mj-status-info);\n  color: var(--mj-text-inverse);\n}\n\n.status-badge[_ngcontent-%COMP%] {\n  background-color: var(--mj-text-muted);\n  color: var(--mj-text-inverse);\n}\n\n\n\n  .k-panelbar {\n  background: var(--mj-bg-surface-card) !important;\n  border-color: var(--mj-border-default) !important;\n  color: var(--mj-text-primary) !important;\n}\n\n  .k-panelbar > .k-panelbar-header > .k-link {\n  background: var(--mj-bg-surface-elevated) !important;\n  color: var(--mj-text-primary) !important;\n  border-color: var(--mj-border-default) !important;\n  padding: 12px 16px;\n  font-weight: var(--mj-font-semibold);\n}\n\n  .k-panelbar > .k-panelbar-header > .k-link:hover {\n  background: var(--mj-bg-surface-hover) !important;\n}\n\n  .k-panelbar > .k-panelbar-header > .k-link .k-icon, \n  .k-panelbar > .k-panelbar-header > .k-link .k-svg-icon {\n  color: var(--mj-text-muted) !important;\n}\n\n  .k-panelbar-item-content, \n  .k-panelbar > .k-item > .k-animation-container .k-panelbar-item-content {\n  padding: 0;\n  background: var(--mj-bg-surface-card) !important;\n  color: var(--mj-text-primary) !important;\n  border-color: var(--mj-border-default) !important;\n}\n\n.k-panelbar[_ngcontent-%COMP%]    > .k-item[_ngcontent-%COMP%]    > .k-link[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n  margin-right: 8px;\n  color: var(--mj-text-muted);\n}\n\n\n\n.empty-state[_ngcontent-%COMP%] {\n  text-align: center;\n  padding: 40px;\n  color: var(--mj-text-muted);\n}\n\n.empty-state[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n  font-size: var(--mj-text-5xl);\n  opacity: 0.3;\n  margin-bottom: 16px;\n}\n\n.monospace[_ngcontent-%COMP%] {\n  font-family: 'Courier New', Courier, monospace;\n  font-size: var(--mj-text-xs);\n}\n\n\n\n@media (max-width: 768px) {\n  .header-content[_ngcontent-%COMP%] {\n    flex-direction: column;\n    gap: 16px;\n  }\n\n  .header-stats[_ngcontent-%COMP%] {\n    flex-wrap: wrap;\n  }\n\n  .details-grid[_ngcontent-%COMP%] {\n    grid-template-columns: 1fr;\n  }\n}"] }); }
};
MJActionExecutionLogFormComponentExtended = __decorate([
    RegisterClass(BaseFormComponent, 'MJ: Action Execution Logs')
], MJActionExecutionLogFormComponentExtended);
export { MJActionExecutionLogFormComponentExtended };
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJActionExecutionLogFormComponentExtended, [{
        type: Component,
        args: [{ standalone: false, selector: 'mj-action-execution-log-form', template: "<div class=\"record-form-container action-execution-log-form\" style=\"height: 100%; display: flex; flex-direction: column;\">\n    <div class=\"record-form\" style=\"display: flex; flex-direction: column; height: 100%; overflow: hidden;\">\n        <!-- Header -->\n        <div class=\"header\">\n            <div class=\"header-content\">\n                <div class=\"header-left\">\n                    <div class=\"icon-wrapper\">\n                        <i class=\"fas fa-terminal\"></i>\n                    </div>\n                    <div class=\"header-info\">\n                        <h2>Action Execution Log</h2>\n                        <div class=\"meta-info\">\n                            @if (action) {\n                                <span class=\"action-name\">{{ action.Name }}</span>\n                            }\n                            <span class=\"log-id\">{{ record.ID }}</span>\n                        </div>\n                    </div>\n                </div>\n                <div class=\"header-right\">\n                    <div class=\"status-badge\" [attr.data-status]=\"record.ResultCode?.toLowerCase()\">\n                        <i class=\"fas\" [ngClass]=\"getResultCodeIcon()\"></i>\n                        {{ record.ResultCode || 'UNKNOWN' }}\n                    </div>\n                    <div class=\"execution-time\">\n                        <i class=\"fas fa-clock\"></i>\n                        {{ formatDuration(getExecutionDuration()) }}\n                    </div>\n                </div>\n            </div>\n            <div class=\"header-stats\">\n                <div class=\"stat\">\n                    <span class=\"label\">Started</span>\n                    <span class=\"value\">{{ record.StartedAt | date:'short' }}</span>\n                </div>\n                @if (record.EndedAt) {\n                    <div class=\"stat\">\n                        <span class=\"label\">Ended</span>\n                        <span class=\"value\">{{ record.EndedAt | date:'short' }}</span>\n                    </div>\n                }\n                @if (action) {\n                    <div class=\"stat\">\n                        <span class=\"label\">Action</span>\n                        <span class=\"value\">\n                            <button class=\"btn-link\" (click)=\"navigateToAction()\">\n                                {{ action.Name }}\n                                <i class=\"fas fa-external-link-alt\"></i>\n                            </button>\n                        </span>\n                    </div>\n                }\n                @if (user) {\n                    <div class=\"stat\">\n                        <span class=\"label\">User</span>\n                        <span class=\"value\">\n                            <button class=\"btn-link\" (click)=\"navigateToUser()\">\n                                {{ user.Name }}\n                                <i class=\"fas fa-external-link-alt\"></i>\n                            </button>\n                        </span>\n                    </div>\n                }\n            </div>\n        </div>\n\n        <!-- Content Area -->\n        <div class=\"content-area\">\n            <kendo-panelbar [keepItemContent]=\"true\">\n                <!-- Execution Details -->\n                <kendo-panelbar-item title=\"Execution Details\" [expanded]=\"true\">\n                    <ng-template kendoPanelBarContent>\n                        <div class=\"details-grid\">\n                            <div class=\"detail-item\">\n                                <label>Execution ID</label>\n                                <span class=\"monospace\">{{ record.ID }}</span>\n                            </div>\n                            <div class=\"detail-item\">\n                                <label>Action ID</label>\n                                <span class=\"monospace\">{{ record.ActionID }}</span>\n                            </div>\n                            <div class=\"detail-item\">\n                                <label>User ID</label>\n                                <span class=\"monospace\">{{ record.UserID }}</span>\n                            </div>\n                            <div class=\"detail-item\">\n                                <label>Result Code</label>\n                                <span class=\"detail-value\">\n                                    <i class=\"fas\" [ngClass]=\"getResultCodeIcon()\" [style.color]=\"getResultCodeColor()\"></i>\n                                    <span [style.color]=\"getResultCodeColor()\">{{ record.ResultCode || 'N/A' }}</span>\n                                </span>\n                            </div>\n                            <div class=\"detail-item\">\n                                <label>Duration</label>\n                                <span>{{ formatDuration(getExecutionDuration()) }}</span>\n                            </div>\n                            <div class=\"detail-item\">\n                                <label>Retention Period</label>\n                                <span>{{ record.RetentionPeriod ? record.RetentionPeriod + ' days' : 'Indefinite' }}</span>\n                            </div>\n                        </div>\n                    </ng-template>\n                </kendo-panelbar-item>\n\n                <!-- Input Parameters Only -->\n                @if (hasInputParams && formattedInputParams) {\n                    <kendo-panelbar-item title=\"Input Parameters\" [expanded]=\"expandedSections.inputParams\">\n                        <ng-template kendoPanelBarContent>\n                            <div class=\"json-viewer\">\n                                <div class=\"json-toolbar\">\n                                    <span class=\"json-label\">JSON (Input Parameters Only)</span>\n                                    <button class=\"btn-icon\" title=\"Copy JSON\" (click)=\"copyToClipboard(formattedInputParams)\">\n                                        <i class=\"fas fa-copy\"></i>\n                                    </button>\n                                </div>\n                                <mj-code-editor \n                                    [(ngModel)]=\"formattedInputParams\"\n                                    name=\"formattedInputParams\"\n                                    [readonly]=\"true\"\n                                    [language]=\"'json'\"\n                                    [lineWrapping]=\"true\"\n                                    style=\"height: 300px; width: 100%;\">\n                                </mj-code-editor>\n                            </div>\n                        </ng-template>\n                    </kendo-panelbar-item>\n                }\n\n                <!-- Output Parameters Only -->\n                @if (hasOutputParams && formattedOutputParams) {\n                    <kendo-panelbar-item title=\"Output Parameters\" [expanded]=\"expandedSections.outputParams\">\n                        <ng-template kendoPanelBarContent>\n                            <div class=\"json-viewer\">\n                                <div class=\"json-toolbar\">\n                                    <span class=\"json-label\">JSON (Output Parameters Only)</span>\n                                    <button class=\"btn-icon\" title=\"Copy JSON\" (click)=\"copyToClipboard(formattedOutputParams)\">\n                                        <i class=\"fas fa-copy\"></i>\n                                    </button>\n                                </div>\n                                <mj-code-editor \n                                    [(ngModel)]=\"formattedOutputParams\"\n                                    name=\"formattedOutputParams\"\n                                    [readonly]=\"true\"\n                                    [language]=\"'json'\"\n                                    [lineWrapping]=\"true\"\n                                    style=\"height: 300px; width: 100%;\">\n                                </mj-code-editor>\n                            </div>\n                        </ng-template>\n                    </kendo-panelbar-item>\n                }\n\n                <!-- Input+Output Parameters -->\n                @if (hasBothParams && formattedBothParams) {\n                    <kendo-panelbar-item title=\"Input+Output Parameters\" [expanded]=\"expandedSections.bothParams\">\n                        <ng-template kendoPanelBarContent>\n                            <div class=\"json-viewer\">\n                                <div class=\"json-toolbar\">\n                                    <span class=\"json-label\">JSON (Input+Output Parameters)</span>\n                                    <button class=\"btn-icon\" title=\"Copy JSON\" (click)=\"copyToClipboard(formattedBothParams)\">\n                                        <i class=\"fas fa-copy\"></i>\n                                    </button>\n                                </div>\n                                <mj-code-editor \n                                    [(ngModel)]=\"formattedBothParams\"\n                                    name=\"formattedBothParams\"\n                                    [readonly]=\"true\"\n                                    [language]=\"'json'\"\n                                    [lineWrapping]=\"true\"\n                                    style=\"height: 300px; width: 100%;\">\n                                </mj-code-editor>\n                            </div>\n                        </ng-template>\n                    </kendo-panelbar-item>\n                }\n\n                <!-- Output Message -->\n                @if (record.Message) {\n                    <kendo-panelbar-item title=\"Output Message\" [expanded]=\"expandedSections.output\">\n                        <ng-template kendoPanelBarContent>\n                            <div class=\"json-viewer\">\n                                <div class=\"json-toolbar\">\n                                    <span class=\"json-label\">JSON</span>\n                                    <button class=\"btn-icon\" title=\"Copy JSON\" (click)=\"copyToClipboard(formattedMessage)\">\n                                        <i class=\"fas fa-copy\"></i>\n                                    </button>\n                                </div>\n                                <mj-code-editor \n                                    [(ngModel)]=\"formattedMessage\"\n                                    name=\"formattedMessage\"\n                                    [readonly]=\"true\"\n                                    [language]=\"'json'\"\n                                    [lineWrapping]=\"true\"\n                                    style=\"height: 300px; width: 100%;\">\n                                </mj-code-editor>\n                            </div>\n                        </ng-template>\n                    </kendo-panelbar-item>\n                }\n\n                <!-- Empty States for missing data -->\n                @if (!record.Params && !record.Message && !hasInputParams && !hasOutputParams && !hasBothParams) {\n                    <kendo-panelbar-item title=\"Execution Data\" [expanded]=\"true\">\n                        <ng-template kendoPanelBarContent>\n                            <div class=\"empty-state\">\n                                <i class=\"fas fa-inbox\"></i>\n                                <p>No execution data recorded</p>\n                            </div>\n                        </ng-template>\n                    </kendo-panelbar-item>\n                }\n            </kendo-panelbar>\n        </div>\n    </div>\n</div>", styles: ["/* Action Execution Log Form Styles */\n:host {\n  display: block;\n  height: 100%;\n}\n\n.action-execution-log-form {\n  height: 100%;\n  display: flex;\n  flex-direction: column;\n  overflow: hidden;\n  background: var(--mj-bg-page);\n  color: var(--mj-text-primary);\n}\n\n/* Header Styles */\n.header {\n  background: var(--mj-bg-surface-card);\n  border-bottom: 1px solid var(--mj-border-default);\n  padding: 20px;\n  box-shadow: var(--mj-shadow-sm);\n}\n\n.header-content {\n  display: flex;\n  justify-content: space-between;\n  align-items: flex-start;\n  margin-bottom: 16px;\n}\n\n.header-left {\n  display: flex;\n  align-items: center;\n  gap: 16px;\n}\n\n.icon-wrapper {\n  width: 48px;\n  height: 48px;\n  background: var(--mj-status-info);\n  border-radius: var(--mj-radius-lg);\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  color: var(--mj-text-inverse);\n  font-size: var(--mj-text-xl);\n  box-shadow: var(--mj-shadow-sm);\n}\n\n.header-info h2 {\n  margin: 0;\n  font-size: var(--mj-text-2xl);\n  font-weight: var(--mj-font-semibold);\n  color: var(--mj-text-primary);\n}\n\n.meta-info {\n  display: flex;\n  gap: 12px;\n  margin-top: 4px;\n  font-size: var(--mj-text-sm);\n  color: var(--mj-text-muted);\n}\n\n.action-name {\n  font-weight: var(--mj-font-medium);\n  color: var(--mj-text-secondary);\n}\n\n.log-id {\n  font-family: monospace;\n  font-size: var(--mj-text-xs);\n  opacity: 0.7;\n}\n\n.header-right {\n  display: flex;\n  align-items: center;\n  gap: 16px;\n}\n\n.status-badge {\n  padding: 6px 16px;\n  border-radius: var(--mj-radius-full);\n  font-size: var(--mj-text-xs);\n  font-weight: var(--mj-font-semibold);\n  text-transform: uppercase;\n  letter-spacing: 0.5px;\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  color: var(--mj-text-inverse);\n}\n\n.execution-time {\n  display: flex;\n  align-items: center;\n  gap: 6px;\n  font-size: var(--mj-text-sm);\n  color: var(--mj-text-muted);\n}\n\n.header-stats {\n  display: flex;\n  gap: 24px;\n  padding-top: 12px;\n  border-top: 1px solid var(--mj-border-default);\n}\n\n.stat {\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n}\n\n.stat .label {\n  font-size: var(--mj-text-xs);\n  color: var(--mj-text-muted);\n  text-transform: uppercase;\n  letter-spacing: 0.5px;\n}\n\n.stat .value {\n  font-size: var(--mj-text-sm);\n  font-weight: var(--mj-font-medium);\n  color: var(--mj-text-secondary);\n}\n\n.record-form {\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  min-height: 0;\n}\n\n/* Content Area */\n.content-area {\n  flex: 1;\n  min-height: 0;\n  overflow-y: auto;\n  padding: 20px;\n}\n\n/* Details Grid */\n.details-grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n  gap: 20px;\n  padding: 20px;\n}\n\n.detail-item {\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n}\n\n.detail-item label {\n  font-size: var(--mj-text-xs);\n  color: var(--mj-text-muted);\n  text-transform: uppercase;\n  letter-spacing: 0.5px;\n  font-weight: var(--mj-font-semibold);\n}\n\n.detail-value {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  color: var(--mj-text-primary);\n}\n\n.btn-link {\n  background: none;\n  border: none;\n  color: var(--mj-brand-primary);\n  cursor: pointer;\n  font-size: var(--mj-text-sm);\n  padding: 4px;\n}\n\n.btn-link:hover {\n  color: var(--mj-brand-primary-hover);\n}\n\n.loading {\n  color: var(--mj-text-muted);\n  font-size: var(--mj-text-xs);\n}\n\n/* JSON Viewer */\n.json-viewer {\n  padding: 20px;\n  background: var(--mj-bg-surface-sunken);\n  border-radius: var(--mj-radius-md);\n  margin-bottom: 20px;\n}\n\n.json-toolbar {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-bottom: 12px;\n}\n\n.json-label {\n  background: var(--mj-status-info);\n  color: var(--mj-text-inverse);\n  padding: 4px 12px;\n  border-radius: var(--mj-radius-full);\n  font-size: 11px;\n  font-weight: var(--mj-font-semibold);\n  text-transform: uppercase;\n  letter-spacing: 0.5px;\n}\n\n.btn-icon {\n  width: 32px;\n  height: 32px;\n  border: 1px solid var(--mj-border-default);\n  background: var(--mj-bg-surface);\n  border-radius: var(--mj-radius-sm);\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  cursor: pointer;\n  transition: all var(--mj-transition-base);\n  color: var(--mj-text-muted);\n}\n\n.btn-icon:hover {\n  background: var(--mj-bg-surface-hover);\n  border-color: var(--mj-border-strong);\n  color: var(--mj-text-secondary);\n}\n\n/* Status badge colors based on data-status attribute */\n.status-badge[data-status=\"success\"],\n.status-badge[data-status=\"ok\"],\n.status-badge[data-status=\"completed\"],\n.status-badge[data-status=\"200\"] {\n  background-color: var(--mj-status-success);\n  color: var(--mj-text-inverse);\n}\n\n.status-badge[data-status=\"error\"],\n.status-badge[data-status=\"failed\"],\n.status-badge[data-status=\"failure\"] {\n  background-color: var(--mj-status-error);\n  color: var(--mj-text-inverse);\n}\n\n.status-badge[data-status=\"warning\"],\n.status-badge[data-status=\"pending\"] {\n  background-color: var(--mj-status-warning);\n  color: var(--mj-color-warning-800);\n}\n\n.status-badge[data-status=\"info\"],\n.status-badge[data-status=\"running\"] {\n  background-color: var(--mj-status-info);\n  color: var(--mj-text-inverse);\n}\n\n.status-badge {\n  background-color: var(--mj-text-muted);\n  color: var(--mj-text-inverse);\n}\n\n/* Panel Bar overrides */\n::ng-deep .k-panelbar {\n  background: var(--mj-bg-surface-card) !important;\n  border-color: var(--mj-border-default) !important;\n  color: var(--mj-text-primary) !important;\n}\n\n::ng-deep .k-panelbar > .k-panelbar-header > .k-link {\n  background: var(--mj-bg-surface-elevated) !important;\n  color: var(--mj-text-primary) !important;\n  border-color: var(--mj-border-default) !important;\n  padding: 12px 16px;\n  font-weight: var(--mj-font-semibold);\n}\n\n::ng-deep .k-panelbar > .k-panelbar-header > .k-link:hover {\n  background: var(--mj-bg-surface-hover) !important;\n}\n\n::ng-deep .k-panelbar > .k-panelbar-header > .k-link .k-icon,\n::ng-deep .k-panelbar > .k-panelbar-header > .k-link .k-svg-icon {\n  color: var(--mj-text-muted) !important;\n}\n\n::ng-deep .k-panelbar-item-content,\n::ng-deep .k-panelbar > .k-item > .k-animation-container .k-panelbar-item-content {\n  padding: 0;\n  background: var(--mj-bg-surface-card) !important;\n  color: var(--mj-text-primary) !important;\n  border-color: var(--mj-border-default) !important;\n}\n\n.k-panelbar > .k-item > .k-link i {\n  margin-right: 8px;\n  color: var(--mj-text-muted);\n}\n\n/* Empty state */\n.empty-state {\n  text-align: center;\n  padding: 40px;\n  color: var(--mj-text-muted);\n}\n\n.empty-state i {\n  font-size: var(--mj-text-5xl);\n  opacity: 0.3;\n  margin-bottom: 16px;\n}\n\n.monospace {\n  font-family: 'Courier New', Courier, monospace;\n  font-size: var(--mj-text-xs);\n}\n\n/* Responsive adjustments */\n@media (max-width: 768px) {\n  .header-content {\n    flex-direction: column;\n    gap: 16px;\n  }\n\n  .header-stats {\n    flex-wrap: wrap;\n  }\n\n  .details-grid {\n    grid-template-columns: 1fr;\n  }\n}\n"] }]
    }], null, null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJActionExecutionLogFormComponentExtended, { className: "MJActionExecutionLogFormComponentExtended", filePath: "src/lib/custom/Actions/action-execution-log-form.component.ts", lineNumber: 22 }); })();
//# sourceMappingURL=action-execution-log-form.component.js.map