import { Component, Input, Output, EventEmitter } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
function AIAgentRunStepNodeComponent_button_1_Template(rf, ctx) { if (rf & 1) {
    const _r1 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 16);
    i0.ɵɵlistener("click", function AIAgentRunStepNodeComponent_button_1_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.handleExpandToggle($event)); });
    i0.ɵɵelement(1, "i", 17);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵattribute("aria-expanded", ctx_r1.item.isExpanded);
    i0.ɵɵadvance();
    i0.ɵɵclassProp("fa-chevron-right", !ctx_r1.item.isExpanded)("fa-chevron-down", ctx_r1.item.isExpanded);
} }
function AIAgentRunStepNodeComponent_img_3_Template(rf, ctx) { if (rf & 1) {
    const _r3 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "img", 18);
    i0.ɵɵlistener("error", function AIAgentRunStepNodeComponent_img_3_Template_img_error_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onLogoError($event)); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵproperty("src", ctx_r1.item.logoUrl, i0.ɵɵsanitizeUrl)("alt", ctx_r1.item.title);
} }
function AIAgentRunStepNodeComponent_i_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 13);
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngClass", ctx_r1.item.icon);
} }
function AIAgentRunStepNodeComponent_div_14_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 19);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", ctx_r1.getAdditionalInfo(), " ");
} }
function AIAgentRunStepNodeComponent_span_16_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 20);
    i0.ɵɵelement(1, "i", 21);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", ctx_r1.item.duration, " ");
} }
function AIAgentRunStepNodeComponent_button_21_Template(rf, ctx) { if (rf & 1) {
    const _r4 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 22);
    i0.ɵɵlistener("click", function AIAgentRunStepNodeComponent_button_21_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.navigateToRecord($event)); });
    i0.ɵɵelement(1, "i", 23);
    i0.ɵɵelementStart(2, "span", 24);
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵproperty("title", ctx_r1.entityNavigationText);
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(ctx_r1.entityNavigationText);
} }
export class AIAgentRunStepNodeComponent {
    constructor() {
        this.isSelected = false;
        this.itemClick = new EventEmitter();
        this.expandToggle = new EventEmitter();
        this.navigateToEntity = new EventEmitter();
    }
    get hasChildren() {
        return !!this.item.children && this.item.children.length > 0;
    }
    get isSubAgent() {
        return this.item.type === 'subrun' || (this.item.type === 'step' && this.item.data?.StepType === 'Sub-Agent');
    }
    get isParentStep() {
        // Check if this step has children via ParentID relationships (non-Sub-Agent hierarchy)
        return this.item.type === 'step' &&
            this.item.data?.StepType !== 'Sub-Agent' &&
            this.hasChildren;
    }
    get canExpand() {
        // Can expand if it's a sub-agent OR if it's a parent step with children
        return this.isSubAgent || this.isParentStep;
    }
    get canNavigateToEntity() {
        // For steps, check if it's a type that has a target and if TargetLogID exists
        if (this.item.type === 'step' && this.item.data) {
            const stepType = this.item.data.StepType;
            return (stepType === 'Actions' || stepType === 'Prompt' || stepType === 'Sub-Agent')
                && !!this.item.data.TargetLogID;
        }
        return false;
    }
    get entityNavigationText() {
        // For step types, check the StepType
        if (this.item.type === 'step' && this.item.data) {
            const stepType = this.item.data.StepType;
            switch (stepType.trim().toLowerCase()) {
                case 'actions':
                    return 'View Action Log';
                case 'prompt':
                    return 'View Prompt Run';
                case 'sub-agent':
                    return 'View Agent Run';
                default:
                    return 'View Details';
            }
        }
        return "";
    }
    getStatusIcon(status) {
        const iconMap = {
            'Running': 'fa-circle-notch fa-spin',
            'Completed': 'fa-check-circle',
            'Failed': 'fa-times-circle',
            'Cancelled': 'fa-ban',
            'Paused': 'fa-pause-circle'
        };
        return iconMap[status] || 'fa-question-circle';
    }
    handleClick() {
        this.itemClick.emit(this.item);
    }
    handleExpandToggle(event) {
        if (this.canExpand) {
            this.expandToggle.emit(event);
        }
    }
    navigateToRecord(event) {
        event.stopPropagation();
        if (!this.canNavigateToEntity)
            return;
        let entityName = '';
        let recordId = '';
        // For step types, use TargetLogID and determine entity based on StepType
        if (this.item.type === 'step' && this.item.data) {
            recordId = this.item.data.TargetLogID;
            const stepType = this.item.data.StepType;
            switch (stepType.trim().toLowerCase()) {
                case 'actions':
                    entityName = 'Action Execution Logs';
                    break;
                case 'prompt':
                    entityName = 'MJ: AI Prompt Runs';
                    break;
                case 'sub-agent':
                    entityName = 'MJ: AI Agent Runs';
                    break;
            }
        }
        else {
            // For direct types, use the item ID
            recordId = this.item.id;
            switch (this.item.type.trim().toLowerCase()) {
                case 'actions':
                    entityName = 'Action Execution Logs';
                    break;
                case 'prompt':
                    entityName = 'MJ: AI Prompt Runs';
                    break;
                case 'sub-agent':
                    entityName = 'MJ: AI Agent Runs';
                    break;
            }
        }
        if (entityName && recordId) {
            this.navigateToEntity.emit({ entityName, recordId });
        }
    }
    getAdditionalInfo() {
        if (this.item.type === 'step' && this.item.data) {
            const step = this.item.data;
            const parts = [];
            if (step.TargetActionName) {
                parts.push(`Action: ${step.TargetActionName}`);
            }
            if (step.Error) {
                parts.push('Error occurred');
            }
            return parts.join(' • ');
        }
        if (this.item.type === 'action' && this.item.data) {
            const log = this.item.data;
            if (log.Message) {
                return log.Message.substring(0, 100) + (log.Message.length > 100 ? '...' : '');
            }
        }
        return '';
    }
    onLogoError(event) {
        // Hide the broken image and show the icon instead by clearing logoUrl
        const imgElement = event.target;
        imgElement.style.display = 'none';
        this.item.logoUrl = undefined;
    }
    static { this.ɵfac = function AIAgentRunStepNodeComponent_Factory(t) { return new (t || AIAgentRunStepNodeComponent)(); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AIAgentRunStepNodeComponent, selectors: [["mj-ai-agent-run-step-node"]], inputs: { item: "item", isSelected: "isSelected" }, outputs: { itemClick: "itemClick", expandToggle: "expandToggle", navigateToEntity: "navigateToEntity" }, decls: 22, vars: 22, consts: [[1, "timeline-item", 3, "click"], ["class", "expand-toggle", 3, "click", 4, "ngIf"], [1, "timeline-marker"], ["class", "timeline-marker-logo", 3, "src", "alt", "error", 4, "ngIf"], ["class", "fas", 3, "ngClass", 4, "ngIf"], [1, "timeline-content"], [1, "timeline-header"], [1, "timeline-time"], [1, "timeline-subtitle"], ["class", "timeline-additional-info", 4, "ngIf"], [1, "timeline-meta"], ["class", "duration", 4, "ngIf"], [1, "status"], [1, "fas", 3, "ngClass"], [1, "timeline-actions"], ["class", "btn-link", 3, "title", "click", 4, "ngIf"], [1, "expand-toggle", 3, "click"], [1, "fas"], [1, "timeline-marker-logo", 3, "error", "src", "alt"], [1, "timeline-additional-info"], [1, "duration"], [1, "fas", "fa-clock"], [1, "btn-link", 3, "click", "title"], [1, "fas", "fa-external-link-alt"], [1, "action-text"]], template: function AIAgentRunStepNodeComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0);
            i0.ɵɵlistener("click", function AIAgentRunStepNodeComponent_Template_div_click_0_listener() { return ctx.handleClick(); });
            i0.ɵɵtemplate(1, AIAgentRunStepNodeComponent_button_1_Template, 2, 5, "button", 1);
            i0.ɵɵelementStart(2, "div", 2);
            i0.ɵɵtemplate(3, AIAgentRunStepNodeComponent_img_3_Template, 1, 2, "img", 3)(4, AIAgentRunStepNodeComponent_i_4_Template, 1, 1, "i", 4);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(5, "div", 5)(6, "div", 6)(7, "h4");
            i0.ɵɵtext(8);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(9, "span", 7);
            i0.ɵɵtext(10);
            i0.ɵɵpipe(11, "date");
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(12, "div", 8);
            i0.ɵɵtext(13);
            i0.ɵɵelementEnd();
            i0.ɵɵtemplate(14, AIAgentRunStepNodeComponent_div_14_Template, 2, 1, "div", 9);
            i0.ɵɵelementStart(15, "div", 10);
            i0.ɵɵtemplate(16, AIAgentRunStepNodeComponent_span_16_Template, 3, 1, "span", 11);
            i0.ɵɵelementStart(17, "span", 12);
            i0.ɵɵelement(18, "i", 13);
            i0.ɵɵtext(19);
            i0.ɵɵelementEnd()()();
            i0.ɵɵelementStart(20, "div", 14);
            i0.ɵɵtemplate(21, AIAgentRunStepNodeComponent_button_21_Template, 4, 2, "button", 15);
            i0.ɵɵelementEnd()();
        } if (rf & 2) {
            i0.ɵɵstyleProp("margin-left", ctx.item.level * 24, "px");
            i0.ɵɵclassProp("selected", ctx.isSelected);
            i0.ɵɵattribute("data-status", ctx.item.status)("data-type", ctx.item.type);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.canExpand);
            i0.ɵɵadvance();
            i0.ɵɵattribute("data-color", ctx.item.color);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.item.logoUrl);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", !ctx.item.logoUrl);
            i0.ɵɵadvance(4);
            i0.ɵɵtextInterpolate(ctx.item.title);
            i0.ɵɵadvance(2);
            i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(11, 19, ctx.item.startTime, "h:mm:ss.SSS a"));
            i0.ɵɵadvance(3);
            i0.ɵɵtextInterpolate(ctx.item.subtitle);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.getAdditionalInfo());
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("ngIf", ctx.item.duration);
            i0.ɵɵadvance();
            i0.ɵɵattribute("data-status", ctx.item.status);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngClass", ctx.getStatusIcon(ctx.item.status));
            i0.ɵɵadvance();
            i0.ɵɵtextInterpolate1(" ", ctx.item.status, " ");
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("ngIf", ctx.canNavigateToEntity);
        } }, dependencies: [i1.NgClass, i1.NgIf, i1.DatePipe], styles: [".timeline-item[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: flex-start;\n  gap: 12px;\n  padding: 12px;\n  padding-left: 22px; \n\n  margin-bottom: 8px;\n  background: white;\n  border: 1px solid #e0e6ed;\n  border-radius: 8px;\n  cursor: pointer;\n  transition: all 0.2s;\n  position: relative;\n}\n\n.timeline-item[_ngcontent-%COMP%]:hover {\n  border-color: #c1c9d2;\n  background: #f8f9fa;\n  transform: translateX(2px);\n}\n\n.timeline-item.selected[_ngcontent-%COMP%] {\n  border-color: #2196f3;\n  background: #e3f2fd;\n  box-shadow: 0 0 0 1px #2196f3;\n}\n\n\n\n.expand-toggle[_ngcontent-%COMP%] {\n  position: absolute;\n  left: -34px;\n  top: 12px;\n  width: 24px;\n  height: 24px;\n  border: 1px solid #e0e6ed;\n  background: white;\n  border-radius: 4px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  cursor: pointer;\n  transition: all 0.2s;\n  z-index: 1;\n}\n\n.expand-toggle[_ngcontent-%COMP%]:hover {\n  background: #f8f9fa;\n  border-color: #c1c9d2;\n}\n\n.expand-toggle[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n  font-size: 10px;\n  color: #6c757d;\n}\n\n\n\n.timeline-marker[_ngcontent-%COMP%] {\n  flex-shrink: 0;\n  width: 32px;\n  height: 32px;\n  border-radius: 50%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  color: white;\n  font-size: 14px;\n  position: relative;\n  overflow: hidden;\n}\n\n.timeline-marker-logo[_ngcontent-%COMP%] {\n  width: 100%;\n  height: 100%;\n  object-fit: cover;\n  border-radius: 50%;\n}\n\n.timeline-marker[data-color=\"info\"][_ngcontent-%COMP%] {\n  background: linear-gradient(135deg, #2196f3, #1976d2);\n}\n\n.timeline-marker[data-color=\"success\"][_ngcontent-%COMP%] {\n  background: linear-gradient(135deg, #4caf50, #388e3c);\n}\n\n.timeline-marker[data-color=\"error\"][_ngcontent-%COMP%] {\n  background: linear-gradient(135deg, #f44336, #d32f2f);\n}\n\n.timeline-marker[data-color=\"warning\"][_ngcontent-%COMP%] {\n  background: linear-gradient(135deg, #ff9800, #f57c00);\n}\n\n.timeline-marker[data-color=\"secondary\"][_ngcontent-%COMP%] {\n  background: linear-gradient(135deg, #9e9e9e, #757575);\n}\n\n\n\n.timeline-content[_ngcontent-%COMP%] {\n  flex: 1;\n  min-width: 0;\n}\n\n.timeline-header[_ngcontent-%COMP%] {\n  display: flex;\n  justify-content: space-between;\n  align-items: baseline;\n  margin-bottom: 4px;\n}\n\n.timeline-header[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%] {\n  margin: 0;\n  font-size: 14px;\n  font-weight: 600;\n  color: #2c3e50;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n.timeline-time[_ngcontent-%COMP%] {\n  font-size: 11px;\n  color: #6c757d;\n  font-family: monospace;\n  white-space: nowrap;\n  margin-left: 12px;\n}\n\n.timeline-subtitle[_ngcontent-%COMP%] {\n  font-size: 12px;\n  color: #6c757d;\n  margin-bottom: 4px;\n}\n\n.timeline-additional-info[_ngcontent-%COMP%] {\n  font-size: 11px;\n  color: #868e96;\n  margin-bottom: 4px;\n  font-style: italic;\n}\n\n.timeline-meta[_ngcontent-%COMP%] {\n  display: flex;\n  gap: 12px;\n  font-size: 11px;\n  color: #6c757d;\n}\n\n.duration[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: center;\n  gap: 4px;\n}\n\n.status[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: center;\n  gap: 4px;\n  font-weight: 500;\n}\n\n.status[data-status=\"Running\"][_ngcontent-%COMP%] {\n  color: #1976d2;\n}\n\n.status[data-status=\"Completed\"][_ngcontent-%COMP%] {\n  color: #388e3c;\n}\n\n.status[data-status=\"Failed\"][_ngcontent-%COMP%] {\n  color: #d32f2f;\n}\n\n.status[data-status=\"Cancelled\"][_ngcontent-%COMP%] {\n  color: #f57c00;\n}\n\n\n\n.timeline-actions[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n}\n\n.btn-link[_ngcontent-%COMP%] {\n  background: none;\n  border: none;\n  color: #2196f3;\n  font-size: 11px;\n  cursor: pointer;\n  padding: 4px 8px;\n  border-radius: 4px;\n  transition: all 0.2s;\n  display: flex;\n  align-items: center;\n  gap: 4px;\n  white-space: nowrap;\n}\n\n.btn-link[_ngcontent-%COMP%]:hover {\n  background: rgba(33, 150, 243, 0.1);\n  color: #1976d2;\n}\n\n.btn-link[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n  font-size: 10px;\n}\n\n.action-text[_ngcontent-%COMP%] {\n  display: none;\n}\n\n.timeline-item[_ngcontent-%COMP%]:hover   .action-text[_ngcontent-%COMP%] {\n  display: inline;\n}\n\n\n\n.timeline-item[data-type=\"subrun\"][_ngcontent-%COMP%] {\n  background: linear-gradient(to right, #f3f7ff, white);\n}\n\n.timeline-item[data-type=\"action\"][_ngcontent-%COMP%] {\n  border-left: 3px solid #4caf50;\n}\n\n.timeline-item[data-type=\"prompt\"][_ngcontent-%COMP%] {\n  border-left: 3px solid #2196f3;\n}"] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AIAgentRunStepNodeComponent, [{
        type: Component,
        args: [{ selector: 'mj-ai-agent-run-step-node', template: "<div class=\"timeline-item\" \n     [class.selected]=\"isSelected\"\n     [attr.data-status]=\"item.status\"\n     [attr.data-type]=\"item.type\"\n     [style.margin-left.px]=\"item.level * 24\"\n     (click)=\"handleClick()\">\n  \n  <!-- Expand/Collapse Button for Sub-Agents and Parent Steps -->\n  <button class=\"expand-toggle\"\n          *ngIf=\"canExpand\"\n          (click)=\"handleExpandToggle($event)\"\n          [attr.aria-expanded]=\"item.isExpanded\">\n    <i class=\"fas\"\n       [class.fa-chevron-right]=\"!item.isExpanded\"\n       [class.fa-chevron-down]=\"item.isExpanded\"></i>\n  </button>\n  \n  <!-- Timeline Marker -->\n  <div class=\"timeline-marker\" [attr.data-color]=\"item.color\">\n    <img *ngIf=\"item.logoUrl\"\n         [src]=\"item.logoUrl\"\n         [alt]=\"item.title\"\n         class=\"timeline-marker-logo\"\n         (error)=\"onLogoError($event)\" />\n    <i *ngIf=\"!item.logoUrl\" class=\"fas\" [ngClass]=\"item.icon\"></i>\n  </div>\n  \n  <!-- Timeline Content -->\n  <div class=\"timeline-content\">\n    <div class=\"timeline-header\">\n      <h4>{{ item.title }}</h4>\n      <span class=\"timeline-time\">{{ item.startTime | date:'h:mm:ss.SSS a' }}</span>\n    </div>\n    \n    <div class=\"timeline-subtitle\">{{ item.subtitle }}</div>\n    \n    <div class=\"timeline-additional-info\" *ngIf=\"getAdditionalInfo()\">\n      {{ getAdditionalInfo() }}\n    </div>\n    \n    <div class=\"timeline-meta\">\n      <span class=\"duration\" *ngIf=\"item.duration\">\n        <i class=\"fas fa-clock\"></i> {{ item.duration }}\n      </span>\n      <span class=\"status\" [attr.data-status]=\"item.status\">\n        <i class=\"fas\" [ngClass]=\"getStatusIcon(item.status)\"></i>\n        {{ item.status }}\n      </span>\n    </div>\n  </div>\n  \n  <!-- Timeline Actions -->\n  <div class=\"timeline-actions\">\n    <button class=\"btn-link\" \n            *ngIf=\"canNavigateToEntity\"\n            (click)=\"navigateToRecord($event)\"\n            [title]=\"entityNavigationText\">\n      <i class=\"fas fa-external-link-alt\"></i>\n      <span class=\"action-text\">{{ entityNavigationText }}</span>\n    </button>\n  </div>\n</div>", styles: [".timeline-item {\n  display: flex;\n  align-items: flex-start;\n  gap: 12px;\n  padding: 12px;\n  padding-left: 22px; /* Add extra padding to accommodate expand button */\n  margin-bottom: 8px;\n  background: white;\n  border: 1px solid #e0e6ed;\n  border-radius: 8px;\n  cursor: pointer;\n  transition: all 0.2s;\n  position: relative;\n}\n\n.timeline-item:hover {\n  border-color: #c1c9d2;\n  background: #f8f9fa;\n  transform: translateX(2px);\n}\n\n.timeline-item.selected {\n  border-color: #2196f3;\n  background: #e3f2fd;\n  box-shadow: 0 0 0 1px #2196f3;\n}\n\n/* Expand/Collapse Button */\n.expand-toggle {\n  position: absolute;\n  left: -34px;\n  top: 12px;\n  width: 24px;\n  height: 24px;\n  border: 1px solid #e0e6ed;\n  background: white;\n  border-radius: 4px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  cursor: pointer;\n  transition: all 0.2s;\n  z-index: 1;\n}\n\n.expand-toggle:hover {\n  background: #f8f9fa;\n  border-color: #c1c9d2;\n}\n\n.expand-toggle i {\n  font-size: 10px;\n  color: #6c757d;\n}\n\n/* Timeline Marker */\n.timeline-marker {\n  flex-shrink: 0;\n  width: 32px;\n  height: 32px;\n  border-radius: 50%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  color: white;\n  font-size: 14px;\n  position: relative;\n  overflow: hidden;\n}\n\n.timeline-marker-logo {\n  width: 100%;\n  height: 100%;\n  object-fit: cover;\n  border-radius: 50%;\n}\n\n.timeline-marker[data-color=\"info\"] {\n  background: linear-gradient(135deg, #2196f3, #1976d2);\n}\n\n.timeline-marker[data-color=\"success\"] {\n  background: linear-gradient(135deg, #4caf50, #388e3c);\n}\n\n.timeline-marker[data-color=\"error\"] {\n  background: linear-gradient(135deg, #f44336, #d32f2f);\n}\n\n.timeline-marker[data-color=\"warning\"] {\n  background: linear-gradient(135deg, #ff9800, #f57c00);\n}\n\n.timeline-marker[data-color=\"secondary\"] {\n  background: linear-gradient(135deg, #9e9e9e, #757575);\n}\n\n/* Timeline Content */\n.timeline-content {\n  flex: 1;\n  min-width: 0;\n}\n\n.timeline-header {\n  display: flex;\n  justify-content: space-between;\n  align-items: baseline;\n  margin-bottom: 4px;\n}\n\n.timeline-header h4 {\n  margin: 0;\n  font-size: 14px;\n  font-weight: 600;\n  color: #2c3e50;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n.timeline-time {\n  font-size: 11px;\n  color: #6c757d;\n  font-family: monospace;\n  white-space: nowrap;\n  margin-left: 12px;\n}\n\n.timeline-subtitle {\n  font-size: 12px;\n  color: #6c757d;\n  margin-bottom: 4px;\n}\n\n.timeline-additional-info {\n  font-size: 11px;\n  color: #868e96;\n  margin-bottom: 4px;\n  font-style: italic;\n}\n\n.timeline-meta {\n  display: flex;\n  gap: 12px;\n  font-size: 11px;\n  color: #6c757d;\n}\n\n.duration {\n  display: flex;\n  align-items: center;\n  gap: 4px;\n}\n\n.status {\n  display: flex;\n  align-items: center;\n  gap: 4px;\n  font-weight: 500;\n}\n\n.status[data-status=\"Running\"] {\n  color: #1976d2;\n}\n\n.status[data-status=\"Completed\"] {\n  color: #388e3c;\n}\n\n.status[data-status=\"Failed\"] {\n  color: #d32f2f;\n}\n\n.status[data-status=\"Cancelled\"] {\n  color: #f57c00;\n}\n\n/* Timeline Actions */\n.timeline-actions {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n}\n\n.btn-link {\n  background: none;\n  border: none;\n  color: #2196f3;\n  font-size: 11px;\n  cursor: pointer;\n  padding: 4px 8px;\n  border-radius: 4px;\n  transition: all 0.2s;\n  display: flex;\n  align-items: center;\n  gap: 4px;\n  white-space: nowrap;\n}\n\n.btn-link:hover {\n  background: rgba(33, 150, 243, 0.1);\n  color: #1976d2;\n}\n\n.btn-link i {\n  font-size: 10px;\n}\n\n.action-text {\n  display: none;\n}\n\n.timeline-item:hover .action-text {\n  display: inline;\n}\n\n/* Type-specific styling */\n.timeline-item[data-type=\"subrun\"] {\n  background: linear-gradient(to right, #f3f7ff, white);\n}\n\n.timeline-item[data-type=\"action\"] {\n  border-left: 3px solid #4caf50;\n}\n\n.timeline-item[data-type=\"prompt\"] {\n  border-left: 3px solid #2196f3;\n}"] }]
    }], null, { item: [{
            type: Input
        }], isSelected: [{
            type: Input
        }], itemClick: [{
            type: Output
        }], expandToggle: [{
            type: Output
        }], navigateToEntity: [{
            type: Output
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AIAgentRunStepNodeComponent, { className: "AIAgentRunStepNodeComponent", filePath: "src/lib/custom/ai-agent-run/ai-agent-run-step-node.component.ts", lineNumber: 9 }); })();
//# sourceMappingURL=ai-agent-run-step-node.component.js.map