import { Component, Input, Output, EventEmitter } from '@angular/core';
import { MJAIAgentRunStepEntity } from '@memberjunction/core-entities';
import { ParseJSONRecursive } from '@memberjunction/global';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/forms";
import * as i3 from "@memberjunction/ng-code-editor";
import * as i4 from "@memberjunction/ng-deep-diff";
const _c0 = a0 => ({ $implicit: a0 });
const _forTrack0 = ($index, $item) => $item.id;
function AIAgentRunStepDetailComponent_Conditional_0_Conditional_24_Template(rf, ctx) { if (rf & 1) {
    const _r3 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 10)(1, "button", 16);
    i0.ɵɵlistener("click", function AIAgentRunStepDetailComponent_Conditional_0_Conditional_24_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onNavigateToActionLog(ctx_r1.selectedTimelineItem.data.ID)); });
    i0.ɵɵelement(2, "i", 17);
    i0.ɵɵtext(3, " View Action Execution Log ");
    i0.ɵɵelementEnd()();
} }
function AIAgentRunStepDetailComponent_Conditional_0_Conditional_25_Conditional_1_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 19);
    i0.ɵɵlistener("click", function AIAgentRunStepDetailComponent_Conditional_0_Conditional_25_Conditional_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.detailPaneTab = "diff"); });
    i0.ɵɵelement(1, "i", 21);
    i0.ɵɵtext(2, " Payload Changes ");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(3);
    i0.ɵɵclassProp("active", ctx_r1.detailPaneTab === "diff");
} }
function AIAgentRunStepDetailComponent_Conditional_0_Conditional_25_Conditional_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 23);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(4);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(ctx_r1.scratchpadTaskChangeCount);
} }
function AIAgentRunStepDetailComponent_Conditional_0_Conditional_25_Conditional_2_Template(rf, ctx) { if (rf & 1) {
    const _r6 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 19);
    i0.ɵɵlistener("click", function AIAgentRunStepDetailComponent_Conditional_0_Conditional_25_Conditional_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.detailPaneTab = "scratchpad"); });
    i0.ɵɵelement(1, "i", 22);
    i0.ɵɵtext(2, " Scratchpad ");
    i0.ɵɵconditionalCreate(3, AIAgentRunStepDetailComponent_Conditional_0_Conditional_25_Conditional_2_Conditional_3_Template, 2, 1, "span", 23);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(3);
    i0.ɵɵclassProp("active", ctx_r1.detailPaneTab === "scratchpad");
    i0.ɵɵadvance(3);
    i0.ɵɵconditional(ctx_r1.scratchpadTaskChangeCount > 0 ? 3 : -1);
} }
function AIAgentRunStepDetailComponent_Conditional_0_Conditional_25_Template(rf, ctx) { if (rf & 1) {
    const _r4 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 11);
    i0.ɵɵconditionalCreate(1, AIAgentRunStepDetailComponent_Conditional_0_Conditional_25_Conditional_1_Template, 3, 2, "button", 18);
    i0.ɵɵconditionalCreate(2, AIAgentRunStepDetailComponent_Conditional_0_Conditional_25_Conditional_2_Template, 4, 3, "button", 18);
    i0.ɵɵelementStart(3, "button", 19);
    i0.ɵɵlistener("click", function AIAgentRunStepDetailComponent_Conditional_0_Conditional_25_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.detailPaneTab = "json"); });
    i0.ɵɵelement(4, "i", 20);
    i0.ɵɵtext(5, " Full JSON ");
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r1.showStepPayloadDiff ? 1 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r1.showScratchpadTab ? 2 : -1);
    i0.ɵɵadvance();
    i0.ɵɵclassProp("active", ctx_r1.detailPaneTab === "json");
} }
function AIAgentRunStepDetailComponent_Conditional_0_Conditional_27_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 13);
    i0.ɵɵelement(1, "mj-deep-diff", 24);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵproperty("oldValue", ctx_r1.stepPayloadAtStartObject)("newValue", ctx_r1.stepPayloadAtEndObject)("title", "")("showSummary", true)("showUnchanged", false)("expandAll", false)("maxDepth", 8)("maxStringLength", 150)("treatNullAsUndefined", true);
} }
function AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_11_Conditional_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "mj-deep-diff", 24);
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(4);
    i0.ɵɵproperty("oldValue", ctx_r1.stepScratchpadInput)("newValue", ctx_r1.stepScratchpadOutput)("title", "")("showSummary", true)("showUnchanged", false)("expandAll", true)("maxDepth", 6)("maxStringLength", 300)("treatNullAsUndefined", true);
} }
function AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_11_Conditional_2_ng_container_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
function AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_11_Conditional_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 32);
    i0.ɵɵelement(1, "i", 33);
    i0.ɵɵelementStart(2, "span");
    i0.ɵɵtext(3, "Scratchpad created in this step (no prior state)");
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(4, "div", 34);
    i0.ɵɵtemplate(5, AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_11_Conditional_2_ng_container_5_Template, 1, 0, "ng-container", 35);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(4);
    const scratchpadSnapshotTpl_r8 = i0.ɵɵreference(2);
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("ngTemplateOutlet", scratchpadSnapshotTpl_r8)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0, ctx_r1.stepScratchpadOutput));
} }
function AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_11_Conditional_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 32);
    i0.ɵɵelement(1, "i", 36);
    i0.ɵɵelementStart(2, "span");
    i0.ɵɵtext(3, "No scratchpad changes in this step");
    i0.ɵɵelementEnd()();
} }
function AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 30);
    i0.ɵɵconditionalCreate(1, AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_11_Conditional_1_Template, 1, 9, "mj-deep-diff", 24)(2, AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_11_Conditional_2_Template, 6, 4)(3, AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_11_Conditional_3_Template, 4, 0, "div", 32);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r1.stepScratchpadInput && ctx_r1.stepScratchpadOutput ? 1 : ctx_r1.stepScratchpadOutput ? 2 : 3);
} }
function AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_12_Conditional_1_ng_container_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
function AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_12_Conditional_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_12_Conditional_1_ng_container_0_Template, 1, 0, "ng-container", 35);
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(4);
    const scratchpadSnapshotTpl_r8 = i0.ɵɵreference(2);
    i0.ɵɵproperty("ngTemplateOutlet", scratchpadSnapshotTpl_r8)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0, ctx_r1.stepScratchpadInput));
} }
function AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_12_Conditional_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 32);
    i0.ɵɵelement(1, "i", 36);
    i0.ɵɵelementStart(2, "span");
    i0.ɵɵtext(3, "No scratchpad input for this step");
    i0.ɵɵelementEnd()();
} }
function AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_12_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 31);
    i0.ɵɵconditionalCreate(1, AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_12_Conditional_1_Template, 1, 4, "ng-container")(2, AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_12_Conditional_2_Template, 4, 0, "div", 32);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r1.stepScratchpadInput ? 1 : 2);
} }
function AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_13_Conditional_1_ng_container_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
function AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_13_Conditional_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_13_Conditional_1_ng_container_0_Template, 1, 0, "ng-container", 35);
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(4);
    const scratchpadSnapshotTpl_r8 = i0.ɵɵreference(2);
    i0.ɵɵproperty("ngTemplateOutlet", scratchpadSnapshotTpl_r8)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0, ctx_r1.stepScratchpadOutput));
} }
function AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_13_Conditional_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 32);
    i0.ɵɵelement(1, "i", 36);
    i0.ɵɵelementStart(2, "span");
    i0.ɵɵtext(3, "No scratchpad output for this step");
    i0.ɵɵelementEnd()();
} }
function AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_13_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 31);
    i0.ɵɵconditionalCreate(1, AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_13_Conditional_1_Template, 1, 4, "ng-container")(2, AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_13_Conditional_2_Template, 4, 0, "div", 32);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r1.stepScratchpadOutput ? 1 : 2);
} }
function AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Template(rf, ctx) { if (rf & 1) {
    const _r7 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 14)(1, "div", 25)(2, "button", 26);
    i0.ɵɵlistener("click", function AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.scratchpadSubTab = "diff"); });
    i0.ɵɵelement(3, "i", 27);
    i0.ɵɵtext(4, " Diff ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "button", 26);
    i0.ɵɵlistener("click", function AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.scratchpadSubTab = "input"); });
    i0.ɵɵelement(6, "i", 28);
    i0.ɵɵtext(7, " Input ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(8, "button", 26);
    i0.ɵɵlistener("click", function AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Template_button_click_8_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.scratchpadSubTab = "output"); });
    i0.ɵɵelement(9, "i", 29);
    i0.ɵɵtext(10, " Output ");
    i0.ɵɵelementEnd()();
    i0.ɵɵconditionalCreate(11, AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_11_Template, 4, 1, "div", 30);
    i0.ɵɵconditionalCreate(12, AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_12_Template, 3, 1, "div", 31);
    i0.ɵɵconditionalCreate(13, AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Conditional_13_Template, 3, 1, "div", 31);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵclassProp("active", ctx_r1.scratchpadSubTab === "diff");
    i0.ɵɵadvance(3);
    i0.ɵɵclassProp("active", ctx_r1.scratchpadSubTab === "input");
    i0.ɵɵadvance(3);
    i0.ɵɵclassProp("active", ctx_r1.scratchpadSubTab === "output");
    i0.ɵɵadvance(3);
    i0.ɵɵconditional(ctx_r1.scratchpadSubTab === "diff" ? 11 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r1.scratchpadSubTab === "input" ? 12 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r1.scratchpadSubTab === "output" ? 13 : -1);
} }
function AIAgentRunStepDetailComponent_Conditional_0_Conditional_29_Template(rf, ctx) { if (rf & 1) {
    const _r9 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 15)(1, "div", 37)(2, "button", 38);
    i0.ɵɵlistener("click", function AIAgentRunStepDetailComponent_Conditional_0_Conditional_29_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r9); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onCopyToClipboard()); });
    i0.ɵɵelement(3, "i", 39);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(4, "mj-code-editor", 40);
    i0.ɵɵtwoWayListener("ngModelChange", function AIAgentRunStepDetailComponent_Conditional_0_Conditional_29_Template_mj_code_editor_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.selectedItemJsonString, $event) || (ctx_r1.selectedItemJsonString = $event); return i0.ɵɵresetView($event); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(4);
    i0.ɵɵtwoWayProperty("ngModel", ctx_r1.selectedItemJsonString);
    i0.ɵɵproperty("language", "json")("readonly", true);
} }
function AIAgentRunStepDetailComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
    const _r1 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 1)(1, "div", 2)(2, "h3");
    i0.ɵɵelement(3, "i", 3);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "button", 4);
    i0.ɵɵlistener("click", function AIAgentRunStepDetailComponent_Conditional_0_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onClosePanel()); });
    i0.ɵɵelement(6, "i", 5);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(7, "div", 6)(8, "div", 7)(9, "div", 8)(10, "label");
    i0.ɵɵtext(11, "Type");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(12, "span");
    i0.ɵɵtext(13);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(14, "div", 8)(15, "label");
    i0.ɵɵtext(16, "Status");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(17, "span", 9);
    i0.ɵɵtext(18);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(19, "div", 8)(20, "label");
    i0.ɵɵtext(21, "Duration");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(22, "span");
    i0.ɵɵtext(23);
    i0.ɵɵelementEnd()()();
    i0.ɵɵconditionalCreate(24, AIAgentRunStepDetailComponent_Conditional_0_Conditional_24_Template, 4, 0, "div", 10);
    i0.ɵɵconditionalCreate(25, AIAgentRunStepDetailComponent_Conditional_0_Conditional_25_Template, 6, 4, "div", 11);
    i0.ɵɵelementStart(26, "div", 12);
    i0.ɵɵconditionalCreate(27, AIAgentRunStepDetailComponent_Conditional_0_Conditional_27_Template, 2, 9, "div", 13);
    i0.ɵɵconditionalCreate(28, AIAgentRunStepDetailComponent_Conditional_0_Conditional_28_Template, 14, 9, "div", 14);
    i0.ɵɵconditionalCreate(29, AIAgentRunStepDetailComponent_Conditional_0_Conditional_29_Template, 5, 3, "div", 15);
    i0.ɵɵelementEnd()()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngClass", ctx_r1.selectedTimelineItem.icon);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", ctx_r1.selectedTimelineItem.title, " ");
    i0.ɵɵadvance(9);
    i0.ɵɵtextInterpolate(ctx_r1.selectedTimelineItem.type);
    i0.ɵɵadvance(4);
    i0.ɵɵattribute("data-status", ctx_r1.selectedTimelineItem.status);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", ctx_r1.selectedTimelineItem.status, " ");
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r1.selectedTimelineItem.duration || "N/A");
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r1.selectedTimelineItem.type === "action" && (ctx_r1.selectedTimelineItem.data == null ? null : ctx_r1.selectedTimelineItem.data.ID) ? 24 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r1.showStepPayloadDiff || ctx_r1.showScratchpadTab ? 25 : -1);
    i0.ɵɵadvance();
    i0.ɵɵclassProp("with-tabs", ctx_r1.showStepPayloadDiff || ctx_r1.showScratchpadTab);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r1.detailPaneTab === "diff" && ctx_r1.showStepPayloadDiff ? 27 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r1.detailPaneTab === "scratchpad" && ctx_r1.showScratchpadTab ? 28 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r1.detailPaneTab === "json" || !ctx_r1.showStepPayloadDiff && !ctx_r1.showScratchpadTab ? 29 : -1);
} }
function AIAgentRunStepDetailComponent_ng_template_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 41)(1, "h4");
    i0.ɵɵelement(2, "i", 43);
    i0.ɵɵtext(3, " Notes");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "div", 44);
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const snapshot_r10 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(snapshot_r10.notes);
} }
function AIAgentRunStepDetailComponent_ng_template_1_Conditional_2_For_6_Case_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 49);
} }
function AIAgentRunStepDetailComponent_ng_template_1_Conditional_2_For_6_Case_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 50);
} }
function AIAgentRunStepDetailComponent_ng_template_1_Conditional_2_For_6_Case_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 51);
} }
function AIAgentRunStepDetailComponent_ng_template_1_Conditional_2_For_6_Case_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 52);
} }
function AIAgentRunStepDetailComponent_ng_template_1_Conditional_2_For_6_Conditional_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 56);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const task_r11 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(task_r11.notes);
} }
function AIAgentRunStepDetailComponent_ng_template_1_Conditional_2_For_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 47)(1, "span", 48);
    i0.ɵɵconditionalCreate(2, AIAgentRunStepDetailComponent_ng_template_1_Conditional_2_For_6_Case_2_Template, 1, 0, "i", 49)(3, AIAgentRunStepDetailComponent_ng_template_1_Conditional_2_For_6_Case_3_Template, 1, 0, "i", 50)(4, AIAgentRunStepDetailComponent_ng_template_1_Conditional_2_For_6_Case_4_Template, 1, 0, "i", 51)(5, AIAgentRunStepDetailComponent_ng_template_1_Conditional_2_For_6_Case_5_Template, 1, 0, "i", 52);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "div", 53)(7, "span", 54);
    i0.ɵɵtext(8);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(9, "span", 55);
    i0.ɵɵtext(10);
    i0.ɵɵelementEnd();
    i0.ɵɵconditionalCreate(11, AIAgentRunStepDetailComponent_ng_template_1_Conditional_2_For_6_Conditional_11_Template, 2, 1, "span", 56);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(12, "span", 57);
    i0.ɵɵtext(13);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    let tmp_16_0;
    const task_r11 = ctx.$implicit;
    i0.ɵɵattribute("data-status", task_r11.status);
    i0.ɵɵadvance();
    i0.ɵɵattribute("data-status", task_r11.status);
    i0.ɵɵadvance();
    i0.ɵɵconditional((tmp_16_0 = task_r11.status) === "completed" ? 2 : tmp_16_0 === "in_progress" ? 3 : tmp_16_0 === "blocked" ? 4 : 5);
    i0.ɵɵadvance(6);
    i0.ɵɵtextInterpolate(task_r11.id);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(task_r11.title);
    i0.ɵɵadvance();
    i0.ɵɵconditional(task_r11.notes ? 11 : -1);
    i0.ɵɵadvance();
    i0.ɵɵattribute("data-status", task_r11.status);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(task_r11.status);
} }
function AIAgentRunStepDetailComponent_ng_template_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 42)(1, "h4");
    i0.ɵɵelement(2, "i", 45);
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "div", 46);
    i0.ɵɵrepeaterCreate(5, AIAgentRunStepDetailComponent_ng_template_1_Conditional_2_For_6_Template, 14, 8, "div", 47, _forTrack0);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const snapshot_r10 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" Tasks (", snapshot_r10.tasks.length, ")");
    i0.ɵɵadvance(2);
    i0.ɵɵrepeater(snapshot_r10.tasks);
} }
function AIAgentRunStepDetailComponent_ng_template_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 32);
    i0.ɵɵelement(1, "i", 36);
    i0.ɵɵelementStart(2, "span");
    i0.ɵɵtext(3, "Empty scratchpad");
    i0.ɵɵelementEnd()();
} }
function AIAgentRunStepDetailComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 34);
    i0.ɵɵconditionalCreate(1, AIAgentRunStepDetailComponent_ng_template_1_Conditional_1_Template, 6, 1, "div", 41);
    i0.ɵɵconditionalCreate(2, AIAgentRunStepDetailComponent_ng_template_1_Conditional_2_Template, 7, 1, "div", 42);
    i0.ɵɵconditionalCreate(3, AIAgentRunStepDetailComponent_ng_template_1_Conditional_3_Template, 4, 0, "div", 32);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const snapshot_r10 = ctx.$implicit;
    i0.ɵɵadvance();
    i0.ɵɵconditional(snapshot_r10.notes ? 1 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional((snapshot_r10.tasks == null ? null : snapshot_r10.tasks.length) > 0 ? 2 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(!snapshot_r10.notes && (!snapshot_r10.tasks || snapshot_r10.tasks.length === 0) ? 3 : -1);
} }
export class AIAgentRunStepDetailComponent {
    constructor(cdr) {
        this.cdr = cdr;
        this.selectedTimelineItem = null;
        this.closePanel = new EventEmitter();
        this.navigateToActionLog = new EventEmitter();
        this.copyToClipboard = new EventEmitter();
        this.selectedItemJsonString = '{}';
        this.detailPaneTab = 'diff';
        this.scratchpadSubTab = 'diff';
    }
    ngOnChanges() {
        if (this.selectedTimelineItem) {
            this.selectedItemJsonString = this.getSelectedItemJson();
            // Default to diff tab if step has payload diff, scratchpad if available, otherwise json
            if (this.showStepPayloadDiff) {
                this.detailPaneTab = 'diff';
            }
            else if (this.showScratchpadTab) {
                this.detailPaneTab = 'scratchpad';
            }
            else {
                this.detailPaneTab = 'json';
            }
            this.scratchpadSubTab = 'diff';
            this.cdr.detectChanges();
        }
    }
    getSelectedItemJson() {
        if (!this.selectedTimelineItem)
            return '{}';
        // Get all the data from the entity
        let data;
        if (this.selectedTimelineItem.data instanceof MJAIAgentRunStepEntity) {
            // If it's a step entity, we need to get the full run data
            data = this.selectedTimelineItem.data.GetAll();
        }
        else {
            data = this.selectedTimelineItem.data;
        }
        // Apply recursive JSON parsing to the entire data object
        const parseOptions = {
            extractInlineJson: true,
            maxDepth: 100,
            debug: false
        };
        const parsedData = ParseJSONRecursive(data, parseOptions);
        return JSON.stringify(parsedData, null, 2);
    }
    /**
     * Check if selected timeline item is a step with payload changes
     */
    get showStepPayloadDiff() {
        if (!this.selectedTimelineItem || this.selectedTimelineItem.type !== 'step') {
            return false;
        }
        const stepData = this.selectedTimelineItem.data;
        if (stepData && (stepData.PayloadAtStart?.trim().length > 0
            || stepData.PayloadAtEnd?.trim().length > 0)) {
            return stepData.PayloadAtStart !== stepData.PayloadAtEnd;
        }
        else {
            return false;
        }
    }
    /**
     * Get parsed PayloadAtStart for the selected step
     */
    get stepPayloadAtStartObject() {
        if (!this.selectedTimelineItem || this.selectedTimelineItem.type !== 'step') {
            return null;
        }
        const stepData = this.selectedTimelineItem.data;
        if (!stepData?.PayloadAtStart)
            return null;
        try {
            // First, check if PayloadAtStart is a JSON string that needs to be parsed
            let payloadData = stepData.PayloadAtStart;
            try {
                // If PayloadAtStart is a JSON string, parse it first
                payloadData = JSON.parse(stepData.PayloadAtStart);
            }
            catch {
                // If it's not valid JSON, use it as-is
                payloadData = stepData.PayloadAtStart;
            }
            const parseOptions = {
                extractInlineJson: true,
                maxDepth: 100,
                debug: false
            };
            return ParseJSONRecursive(payloadData, parseOptions);
        }
        catch (e) {
            return null;
        }
    }
    /**
     * Get parsed PayloadAtEnd for the selected step
     */
    get stepPayloadAtEndObject() {
        if (!this.selectedTimelineItem || this.selectedTimelineItem.type !== 'step') {
            return null;
        }
        const stepData = this.selectedTimelineItem.data;
        if (!stepData?.PayloadAtEnd)
            return null;
        try {
            // First, check if PayloadAtEnd is a JSON string that needs to be parsed
            let payloadData = stepData.PayloadAtEnd;
            try {
                // If PayloadAtEnd is a JSON string, parse it first
                payloadData = JSON.parse(stepData.PayloadAtEnd);
            }
            catch {
                // If it's not valid JSON, use it as-is
                payloadData = stepData.PayloadAtEnd;
            }
            const parseOptions = {
                extractInlineJson: true,
                maxDepth: 100,
                debug: false
            };
            return ParseJSONRecursive(payloadData, parseOptions);
        }
        catch (e) {
            return null;
        }
    }
    onClosePanel() {
        this.closePanel.emit();
    }
    onNavigateToActionLog(logId) {
        this.navigateToActionLog.emit(logId);
    }
    onCopyToClipboard() {
        this.copyToClipboard.emit(this.getSelectedItemJson());
    }
    /**
     * Whether the scratchpad tab should be shown (step has scratchpad data in InputData or OutputData)
     */
    get showScratchpadTab() {
        if (!this.selectedTimelineItem || this.selectedTimelineItem.type !== 'step') {
            return false;
        }
        return this.stepScratchpadInput !== null || this.stepScratchpadOutput !== null;
    }
    /**
     * Parse scratchpad snapshot from InputData JSON
     */
    get stepScratchpadInput() {
        return this.extractScratchpadFromField('InputData');
    }
    /**
     * Parse scratchpad snapshot from OutputData JSON
     */
    get stepScratchpadOutput() {
        return this.extractScratchpadFromField('OutputData');
    }
    /**
     * Number of tasks that changed between input and output scratchpad snapshots
     */
    get scratchpadTaskChangeCount() {
        const input = this.stepScratchpadInput;
        const output = this.stepScratchpadOutput;
        if (!input && !output)
            return 0;
        if (!input || !output)
            return (output?.tasks?.length ?? 0) + (input?.tasks?.length ?? 0);
        let changes = 0;
        const inputMap = new Map(input.tasks.map(t => [t.id, t]));
        const outputMap = new Map(output.tasks.map(t => [t.id, t]));
        for (const [id, task] of outputMap) {
            const prev = inputMap.get(id);
            if (!prev || prev.status !== task.status || prev.title !== task.title || prev.notes !== task.notes) {
                changes++;
            }
        }
        for (const id of inputMap.keys()) {
            if (!outputMap.has(id))
                changes++; // removed tasks
        }
        if (input.notes !== output.notes)
            changes++;
        return changes;
    }
    extractScratchpadFromField(fieldName) {
        if (!this.selectedTimelineItem || this.selectedTimelineItem.type !== 'step') {
            return null;
        }
        const stepData = this.selectedTimelineItem.data;
        const rawValue = stepData?.[fieldName];
        if (!rawValue)
            return null;
        try {
            let parsed = rawValue;
            if (typeof parsed === 'string') {
                parsed = JSON.parse(parsed);
            }
            const scratchpad = parsed?.scratchpad;
            if (!scratchpad)
                return null;
            return {
                notes: scratchpad.notes ?? '',
                tasks: Array.isArray(scratchpad.tasks) ? scratchpad.tasks : []
            };
        }
        catch {
            return null;
        }
    }
    static { this.ɵfac = function AIAgentRunStepDetailComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AIAgentRunStepDetailComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AIAgentRunStepDetailComponent, selectors: [["mj-ai-agent-run-step-detail"]], inputs: { selectedTimelineItem: "selectedTimelineItem" }, outputs: { closePanel: "closePanel", navigateToActionLog: "navigateToActionLog", copyToClipboard: "copyToClipboard" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], decls: 3, vars: 1, consts: [["scratchpadSnapshotTpl", ""], [1, "json-detail-pane"], [1, "json-pane-header"], [1, "fas", 3, "ngClass"], ["title", "Close", 1, "btn-icon", 3, "click"], [1, "fas", "fa-times"], [1, "json-pane-content"], [1, "json-meta"], [1, "meta-item"], [1, "status-badge", "small"], [1, "action-link"], [1, "detail-pane-tabs"], [1, "detail-pane-content"], [1, "step-payload-diff"], [1, "scratchpad-content"], [1, "json-viewer"], [1, "btn-link", 3, "click"], [1, "fas", "fa-external-link-alt"], [1, "detail-tab", 3, "active"], [1, "detail-tab", 3, "click"], [1, "fa-solid", "fa-code"], [1, "fa-solid", "fa-code-branch"], [1, "fa-solid", "fa-clipboard-list"], [1, "tab-badge"], [3, "oldValue", "newValue", "title", "showSummary", "showUnchanged", "expandAll", "maxDepth", "maxStringLength", "treatNullAsUndefined"], [1, "scratchpad-sub-tabs"], [1, "scratchpad-sub-tab", 3, "click"], [1, "fa-solid", "fa-code-compare"], [1, "fa-solid", "fa-arrow-right-to-bracket"], [1, "fa-solid", "fa-arrow-right-from-bracket"], [1, "scratchpad-diff-view"], [1, "scratchpad-snapshot-view"], [1, "scratchpad-empty-state"], [1, "fa-solid", "fa-circle-plus"], [1, "scratchpad-snapshot"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "fa-solid", "fa-circle-info"], [1, "json-toolbar"], ["title", "Copy JSON", 1, "btn-icon", 3, "click"], [1, "fas", "fa-copy"], [2, "width", "100%", 3, "ngModelChange", "ngModel", "language", "readonly"], [1, "scratchpad-notes-section"], [1, "scratchpad-tasks-section"], [1, "fa-solid", "fa-note-sticky"], [1, "scratchpad-notes-content"], [1, "fa-solid", "fa-list-check"], [1, "scratchpad-task-list"], [1, "scratchpad-task-item"], [1, "task-status-indicator"], [1, "fa-solid", "fa-circle-check"], [1, "fa-solid", "fa-spinner"], [1, "fa-solid", "fa-circle-xmark"], [1, "fa-regular", "fa-circle"], [1, "task-content"], [1, "task-id"], [1, "task-title"], [1, "task-notes"], [1, "task-status-badge"]], template: function AIAgentRunStepDetailComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵconditionalCreate(0, AIAgentRunStepDetailComponent_Conditional_0_Template, 30, 13, "div", 1);
            i0.ɵɵtemplate(1, AIAgentRunStepDetailComponent_ng_template_1_Template, 4, 3, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
        } if (rf & 2) {
            i0.ɵɵconditional(ctx.selectedTimelineItem ? 0 : -1);
        } }, dependencies: [i1.NgClass, i1.NgTemplateOutlet, i2.NgControlStatus, i2.NgModel, i3.CodeEditorComponent, i4.DeepDiffComponent], styles: [".json-detail-pane[_ngcontent-%COMP%] {\n  height: 100%;\n  display: flex;\n  flex-direction: column;\n  background: var(--mj-bg-surface);\n  border-left: 1px solid var(--mj-border-default);\n}\n\n.json-pane-header[_ngcontent-%COMP%] {\n  padding: 16px;\n  border-bottom: 1px solid var(--mj-border-default);\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  background: var(--mj-bg-surface-sunken);\n}\n\n.json-pane-header[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%] {\n  margin: 0;\n  font-size: 16px;\n  font-weight: 600;\n  color: var(--mj-text-primary);\n  display: flex;\n  align-items: center;\n  gap: 8px;\n}\n\n.btn-icon[_ngcontent-%COMP%] {\n  background: none;\n  border: none;\n  padding: 4px 8px;\n  cursor: pointer;\n  color: var(--mj-text-muted);\n  border-radius: 4px;\n  transition: all 0.2s;\n}\n\n.btn-icon[_ngcontent-%COMP%]:hover {\n  background: color-mix(in srgb, var(--mj-text-primary) 5%, transparent);\n  color: var(--mj-text-secondary);\n}\n\n.json-pane-content[_ngcontent-%COMP%] {\n  flex: 1;\n  overflow-y: auto;\n  display: flex;\n  flex-direction: column;\n}\n\n.json-meta[_ngcontent-%COMP%] {\n  padding: 16px;\n  display: flex;\n  gap: 24px;\n  border-bottom: 1px solid var(--mj-border-default);\n}\n\n.meta-item[_ngcontent-%COMP%] {\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n}\n\n.meta-item[_ngcontent-%COMP%]   label[_ngcontent-%COMP%] {\n  font-size: 11px;\n  text-transform: uppercase;\n  color: var(--mj-text-muted);\n  font-weight: 600;\n}\n\n.meta-item[_ngcontent-%COMP%]   span[_ngcontent-%COMP%] {\n  font-size: 13px;\n  color: var(--mj-text-primary);\n}\n\n.status-badge[_ngcontent-%COMP%] {\n  display: inline-flex;\n  align-items: center;\n  padding: 4px 8px;\n  border-radius: 4px;\n  font-size: 11px;\n  font-weight: 600;\n  text-transform: uppercase;\n}\n\n.status-badge.small[_ngcontent-%COMP%] {\n  padding: 2px 6px;\n  font-size: 10px;\n}\n\n.status-badge[data-status=\"Running\"][_ngcontent-%COMP%] {\n  background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n  color: var(--mj-brand-primary);\n}\n\n.status-badge[data-status=\"Completed\"][_ngcontent-%COMP%] {\n  background: color-mix(in srgb, var(--mj-status-success) 15%, var(--mj-bg-surface));\n  color: var(--mj-status-success);\n}\n\n.status-badge[data-status=\"Failed\"][_ngcontent-%COMP%] {\n  background: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n  color: var(--mj-status-error);\n}\n\n.status-badge[data-status=\"Cancelled\"][_ngcontent-%COMP%] {\n  background: color-mix(in srgb, var(--mj-status-warning) 15%, var(--mj-bg-surface));\n  color: var(--mj-status-warning);\n}\n\n.action-link[_ngcontent-%COMP%] {\n  padding: 12px 16px;\n  border-bottom: 1px solid var(--mj-border-default);\n}\n\n.btn-link[_ngcontent-%COMP%] {\n  background: none;\n  border: none;\n  color: var(--mj-brand-primary);\n  cursor: pointer;\n  padding: 6px 12px;\n  border-radius: 4px;\n  transition: all 0.2s;\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  font-size: 13px;\n}\n\n.btn-link[_ngcontent-%COMP%]:hover {\n  background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n  color: var(--mj-brand-primary);\n}\n\n.detail-pane-tabs[_ngcontent-%COMP%] {\n  display: flex;\n  gap: 0;\n  background: var(--mj-bg-surface-sunken);\n  border-bottom: 1px solid var(--mj-border-default);\n  padding: 0 16px;\n}\n\n.detail-tab[_ngcontent-%COMP%] {\n  padding: 12px 16px;\n  background: none;\n  border: none;\n  border-bottom: 2px solid transparent;\n  cursor: pointer;\n  font-size: 13px;\n  color: var(--mj-text-muted);\n  transition: all 0.2s;\n  display: flex;\n  align-items: center;\n  gap: 6px;\n}\n\n.detail-tab[_ngcontent-%COMP%]:hover {\n  color: var(--mj-text-secondary);\n  background: color-mix(in srgb, var(--mj-text-primary) 2%, transparent);\n}\n\n.detail-tab.active[_ngcontent-%COMP%] {\n  color: var(--mj-brand-primary);\n  border-bottom-color: var(--mj-brand-primary);\n  font-weight: 600;\n}\n\n.detail-pane-content[_ngcontent-%COMP%] {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  overflow: hidden;\n  min-height: 0; \n\n}\n\n\n\n\n\n\n\n\n.json-viewer[_ngcontent-%COMP%] {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  position: relative;\n  overflow: hidden;\n  min-height: 0; \n\n}\n\n.json-toolbar[_ngcontent-%COMP%] {\n  position: absolute;\n  top: 8px;\n  right: 8px;\n  z-index: 10;\n  display: flex;\n  gap: 4px;\n}\n\n.step-payload-diff[_ngcontent-%COMP%] {\n  flex: 1;\n  overflow-y: auto;\n  padding: 16px;\n  min-height: 0; \n\n}\n\n\n\n.json-viewer[_ngcontent-%COMP%]   mj-code-editor[_ngcontent-%COMP%] {\n  flex: 1;\n  overflow: hidden;\n  min-height: 0;\n  display: flex;\n  flex-direction: column;\n}\n\n\n\n.tab-badge[_ngcontent-%COMP%] {\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  min-width: 18px;\n  height: 18px;\n  padding: 0 5px;\n  border-radius: 9px;\n  font-size: 10px;\n  font-weight: 700;\n  background: var(--mj-brand-primary);\n  color: var(--mj-text-inverse);\n}\n\n\n\n.scratchpad-content[_ngcontent-%COMP%] {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  overflow: hidden;\n  min-height: 0;\n}\n\n\n\n.scratchpad-sub-tabs[_ngcontent-%COMP%] {\n  display: flex;\n  gap: 0;\n  padding: 0 16px;\n  border-bottom: 1px solid var(--mj-border-subtle);\n  background: var(--mj-bg-surface);\n}\n\n.scratchpad-sub-tab[_ngcontent-%COMP%] {\n  padding: 8px 12px;\n  background: none;\n  border: none;\n  border-bottom: 2px solid transparent;\n  cursor: pointer;\n  font-size: 12px;\n  color: var(--mj-text-muted);\n  transition: all 0.2s;\n  display: flex;\n  align-items: center;\n  gap: 5px;\n}\n\n.scratchpad-sub-tab[_ngcontent-%COMP%]:hover {\n  color: var(--mj-text-secondary);\n  background: color-mix(in srgb, var(--mj-text-primary) 2%, transparent);\n}\n\n.scratchpad-sub-tab.active[_ngcontent-%COMP%] {\n  color: var(--mj-brand-primary);\n  border-bottom-color: var(--mj-brand-primary);\n  font-weight: 600;\n}\n\n\n\n.scratchpad-diff-view[_ngcontent-%COMP%], \n.scratchpad-snapshot-view[_ngcontent-%COMP%] {\n  flex: 1;\n  overflow-y: auto;\n  padding: 16px;\n  min-height: 0;\n}\n\n\n\n.scratchpad-snapshot[_ngcontent-%COMP%] {\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n}\n\n.scratchpad-notes-section[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%], \n.scratchpad-tasks-section[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%] {\n  margin: 0 0 8px 0;\n  font-size: 13px;\n  font-weight: 600;\n  color: var(--mj-text-secondary);\n  display: flex;\n  align-items: center;\n  gap: 6px;\n}\n\n.scratchpad-notes-content[_ngcontent-%COMP%] {\n  padding: 12px;\n  background: var(--mj-bg-surface-sunken);\n  border-radius: 6px;\n  border: 1px solid var(--mj-border-subtle);\n  font-size: 13px;\n  line-height: 1.5;\n  color: var(--mj-text-primary);\n  white-space: pre-wrap;\n  word-break: break-word;\n}\n\n\n\n.scratchpad-task-list[_ngcontent-%COMP%] {\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n}\n\n.scratchpad-task-item[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: flex-start;\n  gap: 8px;\n  padding: 8px 12px;\n  border-radius: 6px;\n  background: var(--mj-bg-surface);\n  border: 1px solid var(--mj-border-subtle);\n  transition: background 0.15s;\n}\n\n.scratchpad-task-item[_ngcontent-%COMP%]:hover {\n  background: var(--mj-bg-surface-hover);\n}\n\n\n\n.task-status-indicator[_ngcontent-%COMP%] {\n  flex-shrink: 0;\n  width: 16px;\n  margin-top: 2px;\n  font-size: 14px;\n}\n\n.task-status-indicator[data-status=\"completed\"][_ngcontent-%COMP%] {\n  color: var(--mj-status-success);\n}\n\n.task-status-indicator[data-status=\"in_progress\"][_ngcontent-%COMP%] {\n  color: var(--mj-brand-primary);\n}\n\n.task-status-indicator[data-status=\"blocked\"][_ngcontent-%COMP%] {\n  color: var(--mj-status-error);\n}\n\n.task-status-indicator[data-status=\"pending\"][_ngcontent-%COMP%] {\n  color: var(--mj-text-muted);\n}\n\n\n\n.task-content[_ngcontent-%COMP%] {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  gap: 2px;\n  min-width: 0;\n}\n\n.task-id[_ngcontent-%COMP%] {\n  font-size: 10px;\n  font-weight: 700;\n  color: var(--mj-text-muted);\n  text-transform: uppercase;\n}\n\n.task-title[_ngcontent-%COMP%] {\n  font-size: 13px;\n  color: var(--mj-text-primary);\n  line-height: 1.4;\n}\n\n.task-notes[_ngcontent-%COMP%] {\n  font-size: 12px;\n  color: var(--mj-text-secondary);\n  line-height: 1.4;\n  font-style: italic;\n}\n\n\n\n.task-status-badge[_ngcontent-%COMP%] {\n  flex-shrink: 0;\n  padding: 2px 6px;\n  border-radius: 4px;\n  font-size: 10px;\n  font-weight: 600;\n  text-transform: uppercase;\n  white-space: nowrap;\n}\n\n.task-status-badge[data-status=\"completed\"][_ngcontent-%COMP%] {\n  background: color-mix(in srgb, var(--mj-status-success) 15%, var(--mj-bg-surface));\n  color: var(--mj-status-success);\n}\n\n.task-status-badge[data-status=\"in_progress\"][_ngcontent-%COMP%] {\n  background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n  color: var(--mj-brand-primary);\n}\n\n.task-status-badge[data-status=\"blocked\"][_ngcontent-%COMP%] {\n  background: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n  color: var(--mj-status-error);\n}\n\n.task-status-badge[data-status=\"pending\"][_ngcontent-%COMP%] {\n  background: color-mix(in srgb, var(--mj-text-muted) 15%, var(--mj-bg-surface));\n  color: var(--mj-text-muted);\n}\n\n\n\n.scratchpad-empty-state[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  padding: 16px;\n  color: var(--mj-text-muted);\n  font-size: 13px;\n  font-style: italic;\n}"] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AIAgentRunStepDetailComponent, [{
        type: Component,
        args: [{ standalone: false, selector: 'mj-ai-agent-run-step-detail', template: "@if (selectedTimelineItem) {\n  <div class=\"json-detail-pane\">\n    <div class=\"json-pane-header\">\n      <h3>\n        <i class=\"fas\" [ngClass]=\"selectedTimelineItem.icon\"></i>\n        {{ selectedTimelineItem.title }}\n      </h3>\n      <button class=\"btn-icon\" (click)=\"onClosePanel()\" title=\"Close\">\n        <i class=\"fas fa-times\"></i>\n      </button>\n    </div>\n    <div class=\"json-pane-content\">\n      <div class=\"json-meta\">\n        <div class=\"meta-item\">\n          <label>Type</label>\n          <span>{{ selectedTimelineItem.type }}</span>\n        </div>\n        <div class=\"meta-item\">\n          <label>Status</label>\n          <span class=\"status-badge small\" [attr.data-status]=\"selectedTimelineItem.status\">\n            {{ selectedTimelineItem.status }}\n          </span>\n        </div>\n        <div class=\"meta-item\">\n          <label>Duration</label>\n          <span>{{ selectedTimelineItem.duration || 'N/A' }}</span>\n        </div>\n      </div>\n      <!-- Action-specific link -->\n      @if (selectedTimelineItem.type === 'action' && selectedTimelineItem.data?.ID) {\n        <div class=\"action-link\">\n          <button class=\"btn-link\" (click)=\"onNavigateToActionLog(selectedTimelineItem.data.ID)\">\n            <i class=\"fas fa-external-link-alt\"></i> View Action Execution Log\n          </button>\n        </div>\n      }\n      <!-- Tab Navigation - Show when we have payload diff or scratchpad data -->\n      @if (showStepPayloadDiff || showScratchpadTab) {\n        <div class=\"detail-pane-tabs\">\n          @if (showStepPayloadDiff) {\n            <button\n              class=\"detail-tab\"\n              [class.active]=\"detailPaneTab === 'diff'\"\n              (click)=\"detailPaneTab = 'diff'\">\n              <i class=\"fa-solid fa-code-branch\"></i>\n              Payload Changes\n            </button>\n          }\n          @if (showScratchpadTab) {\n            <button\n              class=\"detail-tab\"\n              [class.active]=\"detailPaneTab === 'scratchpad'\"\n              (click)=\"detailPaneTab = 'scratchpad'\">\n              <i class=\"fa-solid fa-clipboard-list\"></i>\n              Scratchpad\n              @if (scratchpadTaskChangeCount > 0) {\n                <span class=\"tab-badge\">{{ scratchpadTaskChangeCount }}</span>\n              }\n            </button>\n          }\n          <button\n            class=\"detail-tab\"\n            [class.active]=\"detailPaneTab === 'json'\"\n            (click)=\"detailPaneTab = 'json'\">\n            <i class=\"fa-solid fa-code\"></i>\n            Full JSON\n          </button>\n        </div>\n      }\n      <!-- Tab Content -->\n      <div class=\"detail-pane-content\" [class.with-tabs]=\"showStepPayloadDiff || showScratchpadTab\">\n        <!-- Payload Diff Tab -->\n        @if (detailPaneTab === 'diff' && showStepPayloadDiff) {\n          <div class=\"step-payload-diff\">\n            <mj-deep-diff\n              [oldValue]=\"stepPayloadAtStartObject\"\n              [newValue]=\"stepPayloadAtEndObject\"\n              [title]=\"''\"\n              [showSummary]=\"true\"\n              [showUnchanged]=\"false\"\n              [expandAll]=\"false\"\n              [maxDepth]=\"8\"\n              [maxStringLength]=\"150\"\n              [treatNullAsUndefined]=\"true\">\n            </mj-deep-diff>\n          </div>\n        }\n        <!-- Scratchpad Tab -->\n        @if (detailPaneTab === 'scratchpad' && showScratchpadTab) {\n          <div class=\"scratchpad-content\">\n            <div class=\"scratchpad-sub-tabs\">\n              <button\n                class=\"scratchpad-sub-tab\"\n                [class.active]=\"scratchpadSubTab === 'diff'\"\n                (click)=\"scratchpadSubTab = 'diff'\">\n                <i class=\"fa-solid fa-code-compare\"></i> Diff\n              </button>\n              <button\n                class=\"scratchpad-sub-tab\"\n                [class.active]=\"scratchpadSubTab === 'input'\"\n                (click)=\"scratchpadSubTab = 'input'\">\n                <i class=\"fa-solid fa-arrow-right-to-bracket\"></i> Input\n              </button>\n              <button\n                class=\"scratchpad-sub-tab\"\n                [class.active]=\"scratchpadSubTab === 'output'\"\n                (click)=\"scratchpadSubTab = 'output'\">\n                <i class=\"fa-solid fa-arrow-right-from-bracket\"></i> Output\n              </button>\n            </div>\n            <!-- Scratchpad Diff Sub-Tab -->\n            @if (scratchpadSubTab === 'diff') {\n              <div class=\"scratchpad-diff-view\">\n                @if (stepScratchpadInput && stepScratchpadOutput) {\n                  <mj-deep-diff\n                    [oldValue]=\"stepScratchpadInput\"\n                    [newValue]=\"stepScratchpadOutput\"\n                    [title]=\"''\"\n                    [showSummary]=\"true\"\n                    [showUnchanged]=\"false\"\n                    [expandAll]=\"true\"\n                    [maxDepth]=\"6\"\n                    [maxStringLength]=\"300\"\n                    [treatNullAsUndefined]=\"true\">\n                  </mj-deep-diff>\n                } @else if (stepScratchpadOutput) {\n                  <div class=\"scratchpad-empty-state\">\n                    <i class=\"fa-solid fa-circle-plus\"></i>\n                    <span>Scratchpad created in this step (no prior state)</span>\n                  </div>\n                  <div class=\"scratchpad-snapshot\">\n                    <ng-container *ngTemplateOutlet=\"scratchpadSnapshotTpl; context: { $implicit: stepScratchpadOutput }\"></ng-container>\n                  </div>\n                } @else {\n                  <div class=\"scratchpad-empty-state\">\n                    <i class=\"fa-solid fa-circle-info\"></i>\n                    <span>No scratchpad changes in this step</span>\n                  </div>\n                }\n              </div>\n            }\n            <!-- Scratchpad Input Sub-Tab -->\n            @if (scratchpadSubTab === 'input') {\n              <div class=\"scratchpad-snapshot-view\">\n                @if (stepScratchpadInput) {\n                  <ng-container *ngTemplateOutlet=\"scratchpadSnapshotTpl; context: { $implicit: stepScratchpadInput }\"></ng-container>\n                } @else {\n                  <div class=\"scratchpad-empty-state\">\n                    <i class=\"fa-solid fa-circle-info\"></i>\n                    <span>No scratchpad input for this step</span>\n                  </div>\n                }\n              </div>\n            }\n            <!-- Scratchpad Output Sub-Tab -->\n            @if (scratchpadSubTab === 'output') {\n              <div class=\"scratchpad-snapshot-view\">\n                @if (stepScratchpadOutput) {\n                  <ng-container *ngTemplateOutlet=\"scratchpadSnapshotTpl; context: { $implicit: stepScratchpadOutput }\"></ng-container>\n                } @else {\n                  <div class=\"scratchpad-empty-state\">\n                    <i class=\"fa-solid fa-circle-info\"></i>\n                    <span>No scratchpad output for this step</span>\n                  </div>\n                }\n              </div>\n            }\n          </div>\n        }\n        <!-- Full JSON Tab -->\n        @if (detailPaneTab === 'json' || (!showStepPayloadDiff && !showScratchpadTab)) {\n          <div class=\"json-viewer\">\n            <div class=\"json-toolbar\">\n              <button class=\"btn-icon\" title=\"Copy JSON\" (click)=\"onCopyToClipboard()\">\n                <i class=\"fas fa-copy\"></i>\n              </button>\n            </div>\n            <mj-code-editor\n              [(ngModel)]=\"selectedItemJsonString\"\n              [language]=\"'json'\"\n              [readonly]=\"true\"\n              style=\"width: 100%;\">\n            </mj-code-editor>\n          </div>\n        }\n      </div>\n    </div>\n  </div>\n}\n\n<!-- Reusable scratchpad snapshot template -->\n<ng-template #scratchpadSnapshotTpl let-snapshot>\n  <div class=\"scratchpad-snapshot\">\n    @if (snapshot.notes) {\n      <div class=\"scratchpad-notes-section\">\n        <h4><i class=\"fa-solid fa-note-sticky\"></i> Notes</h4>\n        <div class=\"scratchpad-notes-content\">{{ snapshot.notes }}</div>\n      </div>\n    }\n    @if (snapshot.tasks?.length > 0) {\n      <div class=\"scratchpad-tasks-section\">\n        <h4><i class=\"fa-solid fa-list-check\"></i> Tasks ({{ snapshot.tasks.length }})</h4>\n        <div class=\"scratchpad-task-list\">\n          @for (task of snapshot.tasks; track task.id) {\n            <div class=\"scratchpad-task-item\" [attr.data-status]=\"task.status\">\n              <span class=\"task-status-indicator\" [attr.data-status]=\"task.status\">\n                @switch (task.status) {\n                  @case ('completed') { <i class=\"fa-solid fa-circle-check\"></i> }\n                  @case ('in_progress') { <i class=\"fa-solid fa-spinner\"></i> }\n                  @case ('blocked') { <i class=\"fa-solid fa-circle-xmark\"></i> }\n                  @default { <i class=\"fa-regular fa-circle\"></i> }\n                }\n              </span>\n              <div class=\"task-content\">\n                <span class=\"task-id\">{{ task.id }}</span>\n                <span class=\"task-title\">{{ task.title }}</span>\n                @if (task.notes) {\n                  <span class=\"task-notes\">{{ task.notes }}</span>\n                }\n              </div>\n              <span class=\"task-status-badge\" [attr.data-status]=\"task.status\">{{ task.status }}</span>\n            </div>\n          }\n        </div>\n      </div>\n    }\n    @if (!snapshot.notes && (!snapshot.tasks || snapshot.tasks.length === 0)) {\n      <div class=\"scratchpad-empty-state\">\n        <i class=\"fa-solid fa-circle-info\"></i>\n        <span>Empty scratchpad</span>\n      </div>\n    }\n  </div>\n</ng-template>", styles: [".json-detail-pane {\n  height: 100%;\n  display: flex;\n  flex-direction: column;\n  background: var(--mj-bg-surface);\n  border-left: 1px solid var(--mj-border-default);\n}\n\n.json-pane-header {\n  padding: 16px;\n  border-bottom: 1px solid var(--mj-border-default);\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  background: var(--mj-bg-surface-sunken);\n}\n\n.json-pane-header h3 {\n  margin: 0;\n  font-size: 16px;\n  font-weight: 600;\n  color: var(--mj-text-primary);\n  display: flex;\n  align-items: center;\n  gap: 8px;\n}\n\n.btn-icon {\n  background: none;\n  border: none;\n  padding: 4px 8px;\n  cursor: pointer;\n  color: var(--mj-text-muted);\n  border-radius: 4px;\n  transition: all 0.2s;\n}\n\n.btn-icon:hover {\n  background: color-mix(in srgb, var(--mj-text-primary) 5%, transparent);\n  color: var(--mj-text-secondary);\n}\n\n.json-pane-content {\n  flex: 1;\n  overflow-y: auto;\n  display: flex;\n  flex-direction: column;\n}\n\n.json-meta {\n  padding: 16px;\n  display: flex;\n  gap: 24px;\n  border-bottom: 1px solid var(--mj-border-default);\n}\n\n.meta-item {\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n}\n\n.meta-item label {\n  font-size: 11px;\n  text-transform: uppercase;\n  color: var(--mj-text-muted);\n  font-weight: 600;\n}\n\n.meta-item span {\n  font-size: 13px;\n  color: var(--mj-text-primary);\n}\n\n.status-badge {\n  display: inline-flex;\n  align-items: center;\n  padding: 4px 8px;\n  border-radius: 4px;\n  font-size: 11px;\n  font-weight: 600;\n  text-transform: uppercase;\n}\n\n.status-badge.small {\n  padding: 2px 6px;\n  font-size: 10px;\n}\n\n.status-badge[data-status=\"Running\"] {\n  background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n  color: var(--mj-brand-primary);\n}\n\n.status-badge[data-status=\"Completed\"] {\n  background: color-mix(in srgb, var(--mj-status-success) 15%, var(--mj-bg-surface));\n  color: var(--mj-status-success);\n}\n\n.status-badge[data-status=\"Failed\"] {\n  background: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n  color: var(--mj-status-error);\n}\n\n.status-badge[data-status=\"Cancelled\"] {\n  background: color-mix(in srgb, var(--mj-status-warning) 15%, var(--mj-bg-surface));\n  color: var(--mj-status-warning);\n}\n\n.action-link {\n  padding: 12px 16px;\n  border-bottom: 1px solid var(--mj-border-default);\n}\n\n.btn-link {\n  background: none;\n  border: none;\n  color: var(--mj-brand-primary);\n  cursor: pointer;\n  padding: 6px 12px;\n  border-radius: 4px;\n  transition: all 0.2s;\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  font-size: 13px;\n}\n\n.btn-link:hover {\n  background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n  color: var(--mj-brand-primary);\n}\n\n.detail-pane-tabs {\n  display: flex;\n  gap: 0;\n  background: var(--mj-bg-surface-sunken);\n  border-bottom: 1px solid var(--mj-border-default);\n  padding: 0 16px;\n}\n\n.detail-tab {\n  padding: 12px 16px;\n  background: none;\n  border: none;\n  border-bottom: 2px solid transparent;\n  cursor: pointer;\n  font-size: 13px;\n  color: var(--mj-text-muted);\n  transition: all 0.2s;\n  display: flex;\n  align-items: center;\n  gap: 6px;\n}\n\n.detail-tab:hover {\n  color: var(--mj-text-secondary);\n  background: color-mix(in srgb, var(--mj-text-primary) 2%, transparent);\n}\n\n.detail-tab.active {\n  color: var(--mj-brand-primary);\n  border-bottom-color: var(--mj-brand-primary);\n  font-weight: 600;\n}\n\n.detail-pane-content {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  overflow: hidden;\n  min-height: 0; /* Allow flexbox to properly size */\n}\n\n/* \n.detail-pane-content.with-tabs {\n  // No explicit height needed with flexbox \n} \n*/\n\n.json-viewer {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  position: relative;\n  overflow: hidden;\n  min-height: 0; /* Important for flexbox children to respect overflow */\n}\n\n.json-toolbar {\n  position: absolute;\n  top: 8px;\n  right: 8px;\n  z-index: 10;\n  display: flex;\n  gap: 4px;\n}\n\n.step-payload-diff {\n  flex: 1;\n  overflow-y: auto;\n  padding: 16px;\n  min-height: 0; /* Allow proper scrolling */\n}\n\n/* Specific styling for mj-code-editor container */\n.json-viewer mj-code-editor {\n  flex: 1;\n  overflow: hidden;\n  min-height: 0;\n  display: flex;\n  flex-direction: column;\n}\n\n/* Tab badge for change count */\n.tab-badge {\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  min-width: 18px;\n  height: 18px;\n  padding: 0 5px;\n  border-radius: 9px;\n  font-size: 10px;\n  font-weight: 700;\n  background: var(--mj-brand-primary);\n  color: var(--mj-text-inverse);\n}\n\n/* Scratchpad content area */\n.scratchpad-content {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  overflow: hidden;\n  min-height: 0;\n}\n\n/* Scratchpad sub-tabs */\n.scratchpad-sub-tabs {\n  display: flex;\n  gap: 0;\n  padding: 0 16px;\n  border-bottom: 1px solid var(--mj-border-subtle);\n  background: var(--mj-bg-surface);\n}\n\n.scratchpad-sub-tab {\n  padding: 8px 12px;\n  background: none;\n  border: none;\n  border-bottom: 2px solid transparent;\n  cursor: pointer;\n  font-size: 12px;\n  color: var(--mj-text-muted);\n  transition: all 0.2s;\n  display: flex;\n  align-items: center;\n  gap: 5px;\n}\n\n.scratchpad-sub-tab:hover {\n  color: var(--mj-text-secondary);\n  background: color-mix(in srgb, var(--mj-text-primary) 2%, transparent);\n}\n\n.scratchpad-sub-tab.active {\n  color: var(--mj-brand-primary);\n  border-bottom-color: var(--mj-brand-primary);\n  font-weight: 600;\n}\n\n/* Scratchpad diff and snapshot views */\n.scratchpad-diff-view,\n.scratchpad-snapshot-view {\n  flex: 1;\n  overflow-y: auto;\n  padding: 16px;\n  min-height: 0;\n}\n\n/* Scratchpad snapshot rendering */\n.scratchpad-snapshot {\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n}\n\n.scratchpad-notes-section h4,\n.scratchpad-tasks-section h4 {\n  margin: 0 0 8px 0;\n  font-size: 13px;\n  font-weight: 600;\n  color: var(--mj-text-secondary);\n  display: flex;\n  align-items: center;\n  gap: 6px;\n}\n\n.scratchpad-notes-content {\n  padding: 12px;\n  background: var(--mj-bg-surface-sunken);\n  border-radius: 6px;\n  border: 1px solid var(--mj-border-subtle);\n  font-size: 13px;\n  line-height: 1.5;\n  color: var(--mj-text-primary);\n  white-space: pre-wrap;\n  word-break: break-word;\n}\n\n/* Task list */\n.scratchpad-task-list {\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n}\n\n.scratchpad-task-item {\n  display: flex;\n  align-items: flex-start;\n  gap: 8px;\n  padding: 8px 12px;\n  border-radius: 6px;\n  background: var(--mj-bg-surface);\n  border: 1px solid var(--mj-border-subtle);\n  transition: background 0.15s;\n}\n\n.scratchpad-task-item:hover {\n  background: var(--mj-bg-surface-hover);\n}\n\n/* Task status indicator icon */\n.task-status-indicator {\n  flex-shrink: 0;\n  width: 16px;\n  margin-top: 2px;\n  font-size: 14px;\n}\n\n.task-status-indicator[data-status=\"completed\"] {\n  color: var(--mj-status-success);\n}\n\n.task-status-indicator[data-status=\"in_progress\"] {\n  color: var(--mj-brand-primary);\n}\n\n.task-status-indicator[data-status=\"blocked\"] {\n  color: var(--mj-status-error);\n}\n\n.task-status-indicator[data-status=\"pending\"] {\n  color: var(--mj-text-muted);\n}\n\n/* Task content */\n.task-content {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  gap: 2px;\n  min-width: 0;\n}\n\n.task-id {\n  font-size: 10px;\n  font-weight: 700;\n  color: var(--mj-text-muted);\n  text-transform: uppercase;\n}\n\n.task-title {\n  font-size: 13px;\n  color: var(--mj-text-primary);\n  line-height: 1.4;\n}\n\n.task-notes {\n  font-size: 12px;\n  color: var(--mj-text-secondary);\n  line-height: 1.4;\n  font-style: italic;\n}\n\n/* Task status badge */\n.task-status-badge {\n  flex-shrink: 0;\n  padding: 2px 6px;\n  border-radius: 4px;\n  font-size: 10px;\n  font-weight: 600;\n  text-transform: uppercase;\n  white-space: nowrap;\n}\n\n.task-status-badge[data-status=\"completed\"] {\n  background: color-mix(in srgb, var(--mj-status-success) 15%, var(--mj-bg-surface));\n  color: var(--mj-status-success);\n}\n\n.task-status-badge[data-status=\"in_progress\"] {\n  background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n  color: var(--mj-brand-primary);\n}\n\n.task-status-badge[data-status=\"blocked\"] {\n  background: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n  color: var(--mj-status-error);\n}\n\n.task-status-badge[data-status=\"pending\"] {\n  background: color-mix(in srgb, var(--mj-text-muted) 15%, var(--mj-bg-surface));\n  color: var(--mj-text-muted);\n}\n\n/* Empty state */\n.scratchpad-empty-state {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  padding: 16px;\n  color: var(--mj-text-muted);\n  font-size: 13px;\n  font-style: italic;\n}"] }]
    }], () => [{ type: i0.ChangeDetectorRef }], { selectedTimelineItem: [{
            type: Input
        }], closePanel: [{
            type: Output
        }], navigateToActionLog: [{
            type: Output
        }], copyToClipboard: [{
            type: Output
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AIAgentRunStepDetailComponent, { className: "AIAgentRunStepDetailComponent", filePath: "src/lib/custom/ai-agent-run/ai-agent-run-step-detail.component.ts", lineNumber: 22 }); })();
//# sourceMappingURL=ai-agent-run-step-detail.component.js.map