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, ViewChild } from '@angular/core';
import { BaseFormSectionComponent } from '@memberjunction/ng-base-forms';
import { RegisterClass } from '@memberjunction/global';
import { RunView, CompositeKey } from '@memberjunction/core';
import { Subject } from 'rxjs';
import { SharedService } from '@memberjunction/ng-shared';
import * as i0 from "@angular/core";
import * as i1 from "@progress/kendo-angular-buttons";
import * as i2 from "./mj-integrated-flow-editor.component";
const _c0 = ["reteContainer"];
const _forTrack0 = ($index, $item) => $item.ID;
function FlowAgentFormSectionComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 1);
    i0.ɵɵelement(1, "i", 3);
    i0.ɵɵelementStart(2, "span");
    i0.ɵɵtext(3, "Loading agent workflow...");
    i0.ɵɵelementEnd()();
} }
function FlowAgentFormSectionComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 2);
    i0.ɵɵelement(1, "i", 4);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", ctx_r0.error, " ");
} }
function FlowAgentFormSectionComponent_Conditional_3_Conditional_4_Template(rf, ctx) { if (rf & 1) {
    const _r2 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 9);
    i0.ɵɵlistener("click", function FlowAgentFormSectionComponent_Conditional_3_Conditional_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.refreshFlow()); });
    i0.ɵɵelement(1, "i", 10);
    i0.ɵɵtext(2, " Refresh ");
    i0.ɵɵelementEnd();
} }
function FlowAgentFormSectionComponent_Conditional_3_Conditional_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 8);
    i0.ɵɵelement(1, "i", 11);
    i0.ɵɵelementStart(2, "p");
    i0.ɵɵtext(3, "No workflow steps defined for this agent.");
    i0.ɵɵelementEnd()();
} }
function FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_8_Template(rf, ctx) { if (rf & 1) {
    const _r4 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "mj-integrated-flow-editor", 19);
    i0.ɵɵlistener("stepsChanged", function FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_8_Template_mj_integrated_flow_editor_stepsChanged_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.refreshFlow()); })("pathsChanged", function FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_8_Template_mj_integrated_flow_editor_pathsChanged_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.refreshFlow()); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(3);
    i0.ɵɵproperty("agentId", ctx_r0.agentId)("steps", ctx_r0.steps)("paths", ctx_r0.paths)("EditMode", ctx_r0.EditMode);
} }
function FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_Conditional_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 21);
    i0.ɵɵelement(1, "i", 11);
    i0.ɵɵtext(2, " Click a step again to deselect and show all paths ");
    i0.ɵɵelementEnd();
} }
function FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_For_7_Conditional_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 34);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const step_r6 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵclassMap("status-" + step_r6.Status.toLowerCase());
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", step_r6.Status, " ");
} }
function FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_For_7_Conditional_12_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 32);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const step_r6 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(step_r6.Description);
} }
function FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_For_7_Conditional_13_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 33);
    i0.ɵɵelement(1, "i", 35);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const step_r6 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" Input: ", step_r6.ActionInputMapping, " ");
} }
function FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_For_7_Conditional_14_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 33);
    i0.ɵɵelement(1, "i", 36);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const step_r6 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" Output: ", step_r6.ActionOutputMapping, " ");
} }
function FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_For_7_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 24);
    i0.ɵɵlistener("click", function FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_For_7_Template_div_click_0_listener() { const step_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.selectStep(step_r6.ID)); });
    i0.ɵɵelementStart(1, "button", 25);
    i0.ɵɵlistener("click", function FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_For_7_Template_button_click_1_listener($event) { const step_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); ctx_r0.openEntityRecord("MJ: AI Agent Steps", step_r6.ID); return i0.ɵɵresetView($event.stopPropagation()); });
    i0.ɵɵelement(2, "i", 26);
    i0.ɵɵtext(3, " Open ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "div", 27)(5, "span", 28);
    i0.ɵɵtext(6);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(7, "span", 29);
    i0.ɵɵtext(8);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(9, "span", 30);
    i0.ɵɵtext(10);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(11, FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_For_7_Conditional_11_Template, 2, 3, "span", 31);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(12, FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_For_7_Conditional_12_Template, 2, 1, "div", 32)(13, FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_For_7_Conditional_13_Template, 3, 1, "div", 33)(14, FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_For_7_Conditional_14_Template, 3, 1, "div", 33);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const step_r6 = ctx.$implicit;
    const ctx_r0 = i0.ɵɵnextContext(4);
    i0.ɵɵclassProp("starting-step", step_r6.StartingStep)("selected", step_r6.ID === ctx_r0.selectedStepId);
    i0.ɵɵadvance(6);
    i0.ɵɵtextInterpolate(step_r6.StartingStep ? "\uD83D\uDE80" : "\uD83D\uDCCD");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(step_r6.Name);
    i0.ɵɵadvance();
    i0.ɵɵclassMap("type-" + step_r6.StepType.toLowerCase());
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", step_r6.StepType, " ");
    i0.ɵɵadvance();
    i0.ɵɵconditional(step_r6.Status !== "Active" ? 11 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(step_r6.Description ? 12 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(step_r6.ActionInputMapping ? 13 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(step_r6.ActionOutputMapping ? 14 : -1);
} }
function FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_Conditional_8_Conditional_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 38);
    i0.ɵɵtext(1, " (showing paths for selected step) ");
    i0.ɵɵelementEnd();
} }
function FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_Conditional_8_For_6_Conditional_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 42);
    i0.ɵɵelement(1, "i", 43);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const path_r8 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" Condition: ", path_r8.Condition, " ");
} }
function FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_Conditional_8_For_6_Template(rf, ctx) { if (rf & 1) {
    const _r7 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 39)(1, "button", 40);
    i0.ɵɵlistener("click", function FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_Conditional_8_For_6_Template_button_click_1_listener() { const path_r8 = i0.ɵɵrestoreView(_r7).$implicit; const ctx_r0 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r0.openEntityRecord("MJ: AI Agent Step Paths", path_r8.ID)); });
    i0.ɵɵelement(2, "i", 26);
    i0.ɵɵtext(3, " Open ");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(4, "i", 41);
    i0.ɵɵtext(5);
    i0.ɵɵtemplate(6, FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_Conditional_8_For_6_Conditional_6_Template, 3, 1, "div", 42);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const path_r8 = ctx.$implicit;
    const ctx_r0 = i0.ɵɵnextContext(5);
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate2(" From: ", ctx_r0.getStepName(path_r8.OriginStepID), " \u2192 To: ", ctx_r0.getStepName(path_r8.DestinationStepID), " ");
    i0.ɵɵadvance();
    i0.ɵɵconditional(path_r8.Condition ? 6 : -1);
} }
function FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_Conditional_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 23)(1, "h4");
    i0.ɵɵelement(2, "i", 37);
    i0.ɵɵtext(3, " Paths ");
    i0.ɵɵtemplate(4, FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_Conditional_8_Conditional_4_Template, 2, 0, "span", 38);
    i0.ɵɵelementEnd();
    i0.ɵɵrepeaterCreate(5, FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_Conditional_8_For_6_Template, 7, 3, "div", 39, _forTrack0);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(4);
    i0.ɵɵadvance(4);
    i0.ɵɵconditional(ctx_r0.selectedStepId ? 4 : -1);
    i0.ɵɵadvance();
    i0.ɵɵrepeater(ctx_r0.filteredPaths);
} }
function FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_Conditional_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 23)(1, "h4");
    i0.ɵɵelement(2, "i", 37);
    i0.ɵɵtext(3, " Paths");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "div", 44);
    i0.ɵɵelement(5, "i", 11);
    i0.ɵɵelementStart(6, "p");
    i0.ɵɵtext(7, "No paths connected to the selected step");
    i0.ɵɵelementEnd()()();
} }
function FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 17)(1, "div", 20)(2, "h4");
    i0.ɵɵelement(3, "i", 14);
    i0.ɵɵtext(4, " Steps");
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(5, FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_Conditional_5_Template, 3, 0, "div", 21);
    i0.ɵɵrepeaterCreate(6, FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_For_7_Template, 15, 13, "div", 22, _forTrack0);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(8, FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_Conditional_8_Template, 7, 1, "div", 23)(9, FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_Conditional_9_Template, 8, 0, "div", 23);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance(5);
    i0.ɵɵconditional(ctx_r0.selectedStepId ? 5 : -1);
    i0.ɵɵadvance();
    i0.ɵɵrepeater(ctx_r0.steps);
    i0.ɵɵadvance(2);
    i0.ɵɵconditional(ctx_r0.filteredPaths.length > 0 ? 8 : ctx_r0.selectedStepId && ctx_r0.paths.length > 0 ? 9 : -1);
} }
function FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 18)(1, "p");
    i0.ɵɵelement(2, "i", 11);
    i0.ɵɵtext(3, " Use the steps and paths grids in the main form tabs to configure the workflow. ");
    i0.ɵɵelementEnd()();
} }
function FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Template(rf, ctx) { if (rf & 1) {
    const _r3 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 12)(1, "button", 13);
    i0.ɵɵlistener("click", function FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.activeTab = "diagram"); });
    i0.ɵɵelement(2, "i", 6);
    i0.ɵɵtext(3, " Diagram ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "button", 13);
    i0.ɵɵlistener("click", function FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.activeTab = "data"); });
    i0.ɵɵelement(5, "i", 14);
    i0.ɵɵtext(6, " Details ");
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(7, "div", 15);
    i0.ɵɵtemplate(8, FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_8_Template, 1, 4, "mj-integrated-flow-editor", 16)(9, FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_9_Template, 10, 2, "div", 17);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(10, FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Conditional_10_Template, 4, 0, "div", 18);
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵclassProp("active", ctx_r0.activeTab === "diagram");
    i0.ɵɵadvance(3);
    i0.ɵɵclassProp("active", ctx_r0.activeTab === "data");
    i0.ɵɵadvance(4);
    i0.ɵɵconditional(ctx_r0.activeTab === "diagram" ? 8 : 9);
    i0.ɵɵadvance(2);
    i0.ɵɵconditional(ctx_r0.EditMode && ctx_r0.activeTab === "data" ? 10 : -1);
} }
function FlowAgentFormSectionComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 5)(1, "h3");
    i0.ɵɵelement(2, "i", 6);
    i0.ɵɵtext(3, " Agent Workflow ");
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(4, FlowAgentFormSectionComponent_Conditional_3_Conditional_4_Template, 3, 0, "button", 7);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(5, FlowAgentFormSectionComponent_Conditional_3_Conditional_5_Template, 4, 0, "div", 8)(6, FlowAgentFormSectionComponent_Conditional_3_Conditional_6_Template, 11, 6);
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(4);
    i0.ɵɵconditional(ctx_r0.EditMode ? 4 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r0.steps.length === 0 && !ctx_r0.EditMode ? 5 : 6);
} }
let FlowAgentFormSectionComponent = class FlowAgentFormSectionComponent extends BaseFormSectionComponent {
    get agentId() {
        return this.record && 'ID' in this.record ? this.record.ID : null;
    }
    constructor(cdr, injector) {
        super();
        this.cdr = cdr;
        this.injector = injector;
        this.destroy$ = new Subject();
        this.steps = [];
        this.paths = [];
        this.loading = true;
        this.error = null;
        this.activeTab = 'diagram';
        this.selectedStepId = null;
        this.sharedService = this.injector.get(SharedService);
    }
    async ngOnInit() {
        await this.loadFlowData();
        if (this.steps.length > 0 || this.EditMode) {
            await this.initializeFlowVisualization();
        }
        this.loading = false;
        this.cdr.detectChanges();
    }
    ngOnDestroy() {
        this.destroy$.next();
        this.destroy$.complete();
    }
    async loadFlowData() {
        if (!this.record || !('ID' in this.record)) {
            return;
        }
        try {
            const rv = new RunView();
            // First load steps
            const stepsResult = await rv.RunView({
                EntityName: 'MJ: AI Agent Steps',
                ExtraFilter: `AgentID='${this.record.ID}'`,
                OrderBy: 'StartingStep DESC, Name',
                ResultType: 'entity_object'
            });
            if (stepsResult.Success) {
                this.steps = stepsResult.Results || [];
                // If we have steps, load paths for those steps
                if (this.steps.length > 0) {
                    const stepIds = this.steps.map(s => `'${s.ID}'`).join(',');
                    const pathsResult = await rv.RunView({
                        EntityName: 'MJ: AI Agent Step Paths',
                        ExtraFilter: `OriginStepID IN (${stepIds})`,
                        OrderBy: 'Priority DESC',
                        ResultType: 'entity_object'
                    });
                    if (pathsResult.Success) {
                        this.paths = pathsResult.Results || [];
                    }
                    else {
                        this.error = `Failed to load agent paths: ${pathsResult.ErrorMessage}`;
                    }
                }
            }
            else {
                this.error = `Failed to load agent steps: ${stepsResult.ErrorMessage}`;
            }
        }
        catch (error) {
            this.error = `Error loading flow data: ${error}`;
        }
    }
    async initializeFlowVisualization() {
        // Flow visualization is now handled by the flow-agent-diagram component
    }
    async addNewStep() {
        // This would open a dialog or form to create a new step
        // Implementation handled by flow-agent-diagram component
    }
    async refreshFlow() {
        this.loading = true;
        this.cdr.detectChanges();
        // Reload data and reinitialize
        await this.loadFlowData();
        if (this.steps.length > 0 || this.EditMode) {
            await this.initializeFlowVisualization();
        }
        this.loading = false;
        this.cdr.detectChanges();
    }
    getStepName(stepId) {
        const step = this.steps.find(s => s.ID === stepId);
        return step?.Name || 'Unknown Step';
    }
    selectStep(stepId) {
        this.selectedStepId = this.selectedStepId === stepId ? null : stepId;
        this.cdr.detectChanges();
    }
    get filteredPaths() {
        if (!this.selectedStepId) {
            return this.paths;
        }
        // Show paths where the selected step is either the origin or destination
        return this.paths.filter(p => p.OriginStepID === this.selectedStepId ||
            p.DestinationStepID === this.selectedStepId);
    }
    async openEntityRecord(entityName, recordId) {
        if (this.sharedService) {
            await this.sharedService.OpenEntityRecord(entityName, CompositeKey.FromID(recordId));
        }
    }
    static { this.ɵfac = function FlowAgentFormSectionComponent_Factory(t) { return new (t || FlowAgentFormSectionComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.Injector)); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FlowAgentFormSectionComponent, selectors: [["mj-flow-agent-form-section"]], viewQuery: function FlowAgentFormSectionComponent_Query(rf, ctx) { if (rf & 1) {
            i0.ɵɵviewQuery(_c0, 7);
        } if (rf & 2) {
            let _t;
            i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.reteContainer = _t.first);
        } }, features: [i0.ɵɵInheritDefinitionFeature], decls: 4, vars: 3, consts: [[1, "flow-agent-section"], [1, "loading-container"], [1, "error-message"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-exclamation-triangle"], [1, "flow-header"], [1, "fa-solid", "fa-project-diagram"], ["kendoButton", "", "themeColor", "primary", "title", "Refresh workflow view"], [1, "empty-state"], ["kendoButton", "", "themeColor", "primary", "title", "Refresh workflow view", 3, "click"], [1, "fa-solid", "fa-sync"], [1, "fa-solid", "fa-info-circle"], [1, "flow-tabs"], [1, "flow-tab", 3, "click"], [1, "fa-solid", "fa-list"], [1, "flow-tab-content"], [3, "agentId", "steps", "paths", "EditMode"], [1, "flow-steps-list"], [1, "flow-instructions"], [3, "stepsChanged", "pathsChanged", "agentId", "steps", "paths", "EditMode"], [1, "steps-container"], [1, "selection-info"], [1, "step-item", 3, "starting-step", "selected"], [1, "paths-container"], [1, "step-item", 3, "click"], ["title", "Open step record", 1, "open-btn", 3, "click"], [1, "fa-solid", "fa-external-link-alt"], [1, "step-header"], [1, "step-number"], [1, "step-name"], [1, "step-type"], [1, "step-status", 3, "class"], [1, "step-description"], [1, "step-mapping"], [1, "step-status"], [1, "fa-solid", "fa-sign-in-alt"], [1, "fa-solid", "fa-sign-out-alt"], [1, "fa-solid", "fa-route"], [2, "font-weight", "normal", "font-size", "0.875rem", "color", "#666"], [1, "path-item"], ["title", "Open path record", 1, "open-btn", 3, "click"], [1, "fa-solid", "fa-arrow-right"], [1, "path-condition"], [1, "fa-solid", "fa-filter"], [1, "empty-state", 2, "padding", "2rem"]], template: function FlowAgentFormSectionComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0);
            i0.ɵɵtemplate(1, FlowAgentFormSectionComponent_Conditional_1_Template, 4, 0, "div", 1)(2, FlowAgentFormSectionComponent_Conditional_2_Template, 3, 1, "div", 2)(3, FlowAgentFormSectionComponent_Conditional_3_Template, 7, 2);
            i0.ɵɵelementEnd();
        } if (rf & 2) {
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.loading ? 1 : -1);
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.error ? 2 : -1);
            i0.ɵɵadvance();
            i0.ɵɵconditional(!ctx.loading && !ctx.error ? 3 : -1);
        } }, dependencies: [i1.ButtonComponent, i2.MJIntegratedFlowEditorComponent], styles: [".flow-agent-section[_ngcontent-%COMP%] {\n    padding: 1rem;\n    height: 100%;\n    display: flex;\n    flex-direction: column;\n}\n\n\n\n.flow-tabs[_ngcontent-%COMP%] {\n    display: flex;\n    gap: 0.5rem;\n    margin-top: 1rem;\n    margin-bottom: 1rem;\n    border-bottom: 2px solid #e0e0e0;\n}\n\n.flow-tab[_ngcontent-%COMP%] {\n    padding: 0.75rem 1.5rem;\n    background: none;\n    border: none;\n    border-bottom: 3px solid transparent;\n    color: #666;\n    font-size: 0.95rem;\n    font-weight: 500;\n    cursor: pointer;\n    transition: all 0.2s ease;\n    display: flex;\n    align-items: center;\n    gap: 0.5rem;\n}\n\n.flow-tab[_ngcontent-%COMP%]:hover {\n    color: #4a90e2;\n    background-color: #f5f5f5;\n}\n\n.flow-tab.active[_ngcontent-%COMP%] {\n    color: #4a90e2;\n    border-bottom-color: #4a90e2;\n}\n\n.flow-tab[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n    font-size: 1rem;\n}\n\n.flow-tab-content[_ngcontent-%COMP%] {\n    flex: 1;\n    overflow-y: auto;\n    min-height: 600px;\n    position: relative;\n}\n\n\n\nmj-integrated-flow-editor[_ngcontent-%COMP%] {\n    display: block;\n    width: 100%;\n    height: 100%;\n    min-height: 600px;\n}\n\n.loading-container[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    gap: 0.5rem;\n    padding: 2rem;\n    color: #666;\n}\n\n.loading-container[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n    font-size: 1.5rem;\n}\n\n.error-message[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 0.5rem;\n    padding: 1rem;\n    background-color: #fee;\n    border: 1px solid #fcc;\n    border-radius: 4px;\n    color: #c00;\n}\n\n.flow-header[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    margin-bottom: 1rem;\n    padding-bottom: 0.5rem;\n    border-bottom: 1px solid #e0e0e0;\n}\n\n.flow-header[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%] {\n    margin: 0;\n    display: flex;\n    align-items: center;\n    gap: 0.5rem;\n    font-size: 1.2rem;\n    color: #333;\n}\n\n.empty-state[_ngcontent-%COMP%] {\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: center;\n    padding: 3rem;\n    text-align: center;\n    color: #666;\n}\n\n.empty-state[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n    font-size: 3rem;\n    margin-bottom: 1rem;\n    opacity: 0.5;\n}\n\n.rete-container[_ngcontent-%COMP%] {\n    flex: 1;\n    min-height: 500px;\n    background: #f5f5f5;\n    border: 1px solid #ddd;\n    border-radius: 4px;\n    position: relative;\n    overflow: hidden;\n}\n\n.flow-instructions[_ngcontent-%COMP%] {\n    margin-top: 0.5rem;\n    padding: 0.5rem 1rem;\n    background-color: #f0f7ff;\n    border: 1px solid #cce0ff;\n    border-radius: 4px;\n    color: #0066cc;\n    font-size: 0.875rem;\n}\n\n.flow-instructions[_ngcontent-%COMP%]   p[_ngcontent-%COMP%] {\n    margin: 0;\n    display: flex;\n    align-items: center;\n    gap: 0.5rem;\n}\n\n\n\n.flow-steps-list[_ngcontent-%COMP%] {\n    display: grid;\n    grid-template-columns: 1fr 1fr;\n    gap: 2rem;\n    margin-top: 1rem;\n}\n\n.steps-container[_ngcontent-%COMP%], .paths-container[_ngcontent-%COMP%] {\n    background: white;\n    border: 1px solid #e0e0e0;\n    border-radius: 8px;\n    padding: 1rem;\n}\n\n.steps-container[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%], .paths-container[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%] {\n    margin: 0 0 1rem 0;\n    display: flex;\n    align-items: center;\n    gap: 0.5rem;\n    color: #333;\n    font-size: 1.1rem;\n}\n\n.step-item[_ngcontent-%COMP%] {\n    background: #f8f9fa;\n    border: 1px solid #dee2e6;\n    border-radius: 6px;\n    padding: 0.75rem;\n    margin-bottom: 0.75rem;\n    transition: all 0.2s ease;\n    cursor: pointer;\n    position: relative;\n}\n\n.step-item[_ngcontent-%COMP%]:hover {\n    border-color: #4a90e2;\n    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.1);\n}\n\n.step-item.selected[_ngcontent-%COMP%] {\n    background: #e3f2fd;\n    border-color: #2196f3;\n    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.2);\n}\n\n.step-item.starting-step[_ngcontent-%COMP%] {\n    border-color: #28a745;\n    background: #f0fff4;\n}\n\n.step-item.starting-step.selected[_ngcontent-%COMP%] {\n    background: #d4edda;\n    border-color: #28a745;\n}\n\n.step-description[_ngcontent-%COMP%] {\n    margin-top: 0.5rem;\n    padding-left: 2rem;\n    color: #666;\n    font-size: 0.875rem;\n}\n\n.path-item[_ngcontent-%COMP%] {\n    background: #f8f9fa;\n    border: 1px solid #dee2e6;\n    border-radius: 6px;\n    padding: 0.75rem;\n    margin-bottom: 0.75rem;\n    font-size: 0.875rem;\n}\n\n.path-condition[_ngcontent-%COMP%] {\n    margin-top: 0.5rem;\n    padding-left: 1.5rem;\n    color: #666;\n    font-size: 0.813rem;\n    display: flex;\n    align-items: center;\n    gap: 0.5rem;\n}\n\n\n\n.step-header[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 0.5rem;\n    margin-bottom: 0.5rem;\n}\n\n.step-number[_ngcontent-%COMP%] {\n    font-size: 1.2rem;\n}\n\n.step-name[_ngcontent-%COMP%] {\n    font-weight: 600;\n    flex: 1;\n}\n\n.step-type[_ngcontent-%COMP%] {\n    padding: 0.2rem 0.5rem;\n    border-radius: 3px;\n    font-size: 0.85rem;\n    background: #e0e0e0;\n    color: #555;\n}\n\n.step-type.type-action[_ngcontent-%COMP%] {\n    background: #e3f2fd;\n    color: #1976d2;\n}\n\n.step-type.type-sub-agent[_ngcontent-%COMP%] {\n    background: #f3e5f5;\n    color: #7b1fa2;\n}\n\n.step-type.type-prompt[_ngcontent-%COMP%] {\n    background: #fff3e0;\n    color: #f57c00;\n}\n\n.step-status[_ngcontent-%COMP%] {\n    padding: 0.2rem 0.5rem;\n    border-radius: 3px;\n    font-size: 0.85rem;\n}\n\n.step-status.status-pending[_ngcontent-%COMP%] {\n    background: #fff3e0;\n    color: #f57c00;\n}\n\n.step-status.status-disabled[_ngcontent-%COMP%] {\n    background: #ffebee;\n    color: #c62828;\n}\n\n.step-mapping[_ngcontent-%COMP%] {\n    font-size: 0.85rem;\n    color: #555;\n    padding: 0.25rem 0;\n    padding-left: 2rem;\n    font-family: monospace;\n}\n\n.step-mapping[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n    margin-right: 0.5rem;\n    color: #999;\n}\n\n\n\n.open-btn[_ngcontent-%COMP%] {\n    position: absolute;\n    top: 0.75rem;\n    right: 0.75rem;\n    padding: 0.25rem 0.5rem;\n    font-size: 0.75rem;\n    background: #fff;\n    border: 1px solid #ddd;\n    border-radius: 3px;\n    cursor: pointer;\n    transition: all 0.2s ease;\n}\n\n.open-btn[_ngcontent-%COMP%]:hover {\n    background: #f0f0f0;\n    border-color: #4a90e2;\n    color: #4a90e2;\n}\n\n.open-btn[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n    margin-right: 0.25rem;\n}\n\n\n\n.path-item[_ngcontent-%COMP%] {\n    position: relative;\n    padding-right: 4rem;\n}\n\n\n\n.selection-info[_ngcontent-%COMP%] {\n    margin-bottom: 1rem;\n    padding: 0.5rem 1rem;\n    background-color: #e3f2fd;\n    border: 1px solid #2196f3;\n    border-radius: 4px;\n    color: #1976d2;\n    font-size: 0.875rem;\n    display: flex;\n    align-items: center;\n    gap: 0.5rem;\n}"] }); }
};
FlowAgentFormSectionComponent = __decorate([
    RegisterClass(BaseFormSectionComponent, 'AI Agents.FlowAgentSection')
], FlowAgentFormSectionComponent);
export { FlowAgentFormSectionComponent };
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FlowAgentFormSectionComponent, [{
        type: Component,
        args: [{ selector: 'mj-flow-agent-form-section', template: "<div class=\"flow-agent-section\">\n    @if (loading) {\n        <div class=\"loading-container\">\n            <i class=\"fa-solid fa-spinner fa-spin\"></i>\n            <span>Loading agent workflow...</span>\n        </div>\n    }\n    \n    @if (error) {\n        <div class=\"error-message\">\n            <i class=\"fa-solid fa-exclamation-triangle\"></i>\n            {{ error }}\n        </div>\n    }\n    \n    @if (!loading && !error) {\n        <div class=\"flow-header\">\n            <h3>\n                <i class=\"fa-solid fa-project-diagram\"></i>\n                Agent Workflow\n            </h3>\n            @if (EditMode) {\n                <button \n                    kendoButton \n                    themeColor=\"primary\" \n                    (click)=\"refreshFlow()\"\n                    title=\"Refresh workflow view\">\n                    <i class=\"fa-solid fa-sync\"></i>\n                    Refresh\n                </button>\n            }\n        </div>\n        \n        @if (steps.length === 0 && !EditMode) {\n            <div class=\"empty-state\">\n                <i class=\"fa-solid fa-info-circle\"></i>\n                <p>No workflow steps defined for this agent.</p>\n            </div>\n        } @else {\n            <!-- Tab Navigation -->\n            <div class=\"flow-tabs\">\n                <button \n                    class=\"flow-tab\"\n                    [class.active]=\"activeTab === 'diagram'\"\n                    (click)=\"activeTab = 'diagram'\">\n                    <i class=\"fa-solid fa-project-diagram\"></i>\n                    Diagram\n                </button>\n                <button \n                    class=\"flow-tab\"\n                    [class.active]=\"activeTab === 'data'\"\n                    (click)=\"activeTab = 'data'\">\n                    <i class=\"fa-solid fa-list\"></i>\n                    Details\n                </button>\n            </div>\n            \n            <!-- Tab Content -->\n            <div class=\"flow-tab-content\">\n                @if (activeTab === 'diagram') {\n                    <mj-integrated-flow-editor\n                        [agentId]=\"agentId\"\n                        [steps]=\"steps\"\n                        [paths]=\"paths\"\n                        [EditMode]=\"EditMode\"\n                        (stepsChanged)=\"refreshFlow()\"\n                        (pathsChanged)=\"refreshFlow()\">\n                    </mj-integrated-flow-editor>\n                } @else {\n                    <div class=\"flow-steps-list\">\n                        <div class=\"steps-container\">\n                            <h4><i class=\"fa-solid fa-list\"></i> Steps</h4>\n                            @if (selectedStepId) {\n                                <div class=\"selection-info\">\n                                    <i class=\"fa-solid fa-info-circle\"></i>\n                                    Click a step again to deselect and show all paths\n                                </div>\n                            }\n                            @for (step of steps; track step.ID) {\n                                <div class=\"step-item\" \n                                     [class.starting-step]=\"step.StartingStep\"\n                                     [class.selected]=\"step.ID === selectedStepId\"\n                                     (click)=\"selectStep(step.ID)\">\n                                    <button class=\"open-btn\" \n                                            (click)=\"openEntityRecord('MJ: AI Agent Steps', step.ID); $event.stopPropagation()\"\n                                            title=\"Open step record\">\n                                        <i class=\"fa-solid fa-external-link-alt\"></i>\n                                        Open\n                                    </button>\n                                    <div class=\"step-header\">\n                                        <span class=\"step-number\">{{ step.StartingStep ? '\uD83D\uDE80' : '\uD83D\uDCCD' }}</span>\n                                        <span class=\"step-name\">{{ step.Name }}</span>\n                                        <span class=\"step-type\" [class]=\"'type-' + step.StepType.toLowerCase()\">\n                                            {{ step.StepType }}\n                                        </span>\n                                        @if (step.Status !== 'Active') {\n                                            <span class=\"step-status\" [class]=\"'status-' + step.Status.toLowerCase()\">\n                                                {{ step.Status }}\n                                            </span>\n                                        }\n                                    </div>\n                                    @if (step.Description) {\n                                        <div class=\"step-description\">{{ step.Description }}</div>\n                                    }\n                                    @if (step.ActionInputMapping) {\n                                        <div class=\"step-mapping\">\n                                            <i class=\"fa-solid fa-sign-in-alt\"></i> Input: {{ step.ActionInputMapping }}\n                                        </div>\n                                    }\n                                    @if (step.ActionOutputMapping) {\n                                        <div class=\"step-mapping\">\n                                            <i class=\"fa-solid fa-sign-out-alt\"></i> Output: {{ step.ActionOutputMapping }}\n                                        </div>\n                                    }\n                                </div>\n                            }\n                        </div>\n                        \n                        @if (filteredPaths.length > 0) {\n                            <div class=\"paths-container\">\n                                <h4>\n                                    <i class=\"fa-solid fa-route\"></i> \n                                    Paths\n                                    @if (selectedStepId) {\n                                        <span style=\"font-weight: normal; font-size: 0.875rem; color: #666;\">\n                                            (showing paths for selected step)\n                                        </span>\n                                    }\n                                </h4>\n                                @for (path of filteredPaths; track path.ID) {\n                                    <div class=\"path-item\">\n                                        <button class=\"open-btn\" \n                                                (click)=\"openEntityRecord('MJ: AI Agent Step Paths', path.ID)\"\n                                                title=\"Open path record\">\n                                            <i class=\"fa-solid fa-external-link-alt\"></i>\n                                            Open\n                                        </button>\n                                        <i class=\"fa-solid fa-arrow-right\"></i>\n                                        From: {{ getStepName(path.OriginStepID) }} \n                                        \u2192 To: {{ getStepName(path.DestinationStepID) }}\n                                        @if (path.Condition) {\n                                            <div class=\"path-condition\">\n                                                <i class=\"fa-solid fa-filter\"></i>\n                                                Condition: {{ path.Condition }}\n                                            </div>\n                                        }\n                                    </div>\n                                }\n                            </div>\n                        } @else if (selectedStepId && paths.length > 0) {\n                            <div class=\"paths-container\">\n                                <h4><i class=\"fa-solid fa-route\"></i> Paths</h4>\n                                <div class=\"empty-state\" style=\"padding: 2rem;\">\n                                    <i class=\"fa-solid fa-info-circle\"></i>\n                                    <p>No paths connected to the selected step</p>\n                                </div>\n                            </div>\n                        }\n                    </div>\n                }\n            </div>\n            \n            @if (EditMode && activeTab === 'data') {\n                <div class=\"flow-instructions\">\n                    <p>\n                        <i class=\"fa-solid fa-info-circle\"></i>\n                        Use the steps and paths grids in the main form tabs to configure the workflow.\n                    </p>\n                </div>\n            }\n        }\n    }\n</div>", styles: [".flow-agent-section {\n    padding: 1rem;\n    height: 100%;\n    display: flex;\n    flex-direction: column;\n}\n\n/* Tab Navigation */\n.flow-tabs {\n    display: flex;\n    gap: 0.5rem;\n    margin-top: 1rem;\n    margin-bottom: 1rem;\n    border-bottom: 2px solid #e0e0e0;\n}\n\n.flow-tab {\n    padding: 0.75rem 1.5rem;\n    background: none;\n    border: none;\n    border-bottom: 3px solid transparent;\n    color: #666;\n    font-size: 0.95rem;\n    font-weight: 500;\n    cursor: pointer;\n    transition: all 0.2s ease;\n    display: flex;\n    align-items: center;\n    gap: 0.5rem;\n}\n\n.flow-tab:hover {\n    color: #4a90e2;\n    background-color: #f5f5f5;\n}\n\n.flow-tab.active {\n    color: #4a90e2;\n    border-bottom-color: #4a90e2;\n}\n\n.flow-tab i {\n    font-size: 1rem;\n}\n\n.flow-tab-content {\n    flex: 1;\n    overflow-y: auto;\n    min-height: 600px;\n    position: relative;\n}\n\n/* Ensure integrated flow editor has full height */\nmj-integrated-flow-editor {\n    display: block;\n    width: 100%;\n    height: 100%;\n    min-height: 600px;\n}\n\n.loading-container {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    gap: 0.5rem;\n    padding: 2rem;\n    color: #666;\n}\n\n.loading-container i {\n    font-size: 1.5rem;\n}\n\n.error-message {\n    display: flex;\n    align-items: center;\n    gap: 0.5rem;\n    padding: 1rem;\n    background-color: #fee;\n    border: 1px solid #fcc;\n    border-radius: 4px;\n    color: #c00;\n}\n\n.flow-header {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    margin-bottom: 1rem;\n    padding-bottom: 0.5rem;\n    border-bottom: 1px solid #e0e0e0;\n}\n\n.flow-header h3 {\n    margin: 0;\n    display: flex;\n    align-items: center;\n    gap: 0.5rem;\n    font-size: 1.2rem;\n    color: #333;\n}\n\n.empty-state {\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: center;\n    padding: 3rem;\n    text-align: center;\n    color: #666;\n}\n\n.empty-state i {\n    font-size: 3rem;\n    margin-bottom: 1rem;\n    opacity: 0.5;\n}\n\n.rete-container {\n    flex: 1;\n    min-height: 500px;\n    background: #f5f5f5;\n    border: 1px solid #ddd;\n    border-radius: 4px;\n    position: relative;\n    overflow: hidden;\n}\n\n.flow-instructions {\n    margin-top: 0.5rem;\n    padding: 0.5rem 1rem;\n    background-color: #f0f7ff;\n    border: 1px solid #cce0ff;\n    border-radius: 4px;\n    color: #0066cc;\n    font-size: 0.875rem;\n}\n\n.flow-instructions p {\n    margin: 0;\n    display: flex;\n    align-items: center;\n    gap: 0.5rem;\n}\n\n/* List view styles */\n.flow-steps-list {\n    display: grid;\n    grid-template-columns: 1fr 1fr;\n    gap: 2rem;\n    margin-top: 1rem;\n}\n\n.steps-container, .paths-container {\n    background: white;\n    border: 1px solid #e0e0e0;\n    border-radius: 8px;\n    padding: 1rem;\n}\n\n.steps-container h4, .paths-container h4 {\n    margin: 0 0 1rem 0;\n    display: flex;\n    align-items: center;\n    gap: 0.5rem;\n    color: #333;\n    font-size: 1.1rem;\n}\n\n.step-item {\n    background: #f8f9fa;\n    border: 1px solid #dee2e6;\n    border-radius: 6px;\n    padding: 0.75rem;\n    margin-bottom: 0.75rem;\n    transition: all 0.2s ease;\n    cursor: pointer;\n    position: relative;\n}\n\n.step-item:hover {\n    border-color: #4a90e2;\n    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.1);\n}\n\n.step-item.selected {\n    background: #e3f2fd;\n    border-color: #2196f3;\n    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.2);\n}\n\n.step-item.starting-step {\n    border-color: #28a745;\n    background: #f0fff4;\n}\n\n.step-item.starting-step.selected {\n    background: #d4edda;\n    border-color: #28a745;\n}\n\n.step-description {\n    margin-top: 0.5rem;\n    padding-left: 2rem;\n    color: #666;\n    font-size: 0.875rem;\n}\n\n.path-item {\n    background: #f8f9fa;\n    border: 1px solid #dee2e6;\n    border-radius: 6px;\n    padding: 0.75rem;\n    margin-bottom: 0.75rem;\n    font-size: 0.875rem;\n}\n\n.path-condition {\n    margin-top: 0.5rem;\n    padding-left: 1.5rem;\n    color: #666;\n    font-size: 0.813rem;\n    display: flex;\n    align-items: center;\n    gap: 0.5rem;\n}\n\n/* New styles for enhanced step display */\n.step-header {\n    display: flex;\n    align-items: center;\n    gap: 0.5rem;\n    margin-bottom: 0.5rem;\n}\n\n.step-number {\n    font-size: 1.2rem;\n}\n\n.step-name {\n    font-weight: 600;\n    flex: 1;\n}\n\n.step-type {\n    padding: 0.2rem 0.5rem;\n    border-radius: 3px;\n    font-size: 0.85rem;\n    background: #e0e0e0;\n    color: #555;\n}\n\n.step-type.type-action {\n    background: #e3f2fd;\n    color: #1976d2;\n}\n\n.step-type.type-sub-agent {\n    background: #f3e5f5;\n    color: #7b1fa2;\n}\n\n.step-type.type-prompt {\n    background: #fff3e0;\n    color: #f57c00;\n}\n\n.step-status {\n    padding: 0.2rem 0.5rem;\n    border-radius: 3px;\n    font-size: 0.85rem;\n}\n\n.step-status.status-pending {\n    background: #fff3e0;\n    color: #f57c00;\n}\n\n.step-status.status-disabled {\n    background: #ffebee;\n    color: #c62828;\n}\n\n.step-mapping {\n    font-size: 0.85rem;\n    color: #555;\n    padding: 0.25rem 0;\n    padding-left: 2rem;\n    font-family: monospace;\n}\n\n.step-mapping i {\n    margin-right: 0.5rem;\n    color: #999;\n}\n\n/* Open button styles */\n.open-btn {\n    position: absolute;\n    top: 0.75rem;\n    right: 0.75rem;\n    padding: 0.25rem 0.5rem;\n    font-size: 0.75rem;\n    background: #fff;\n    border: 1px solid #ddd;\n    border-radius: 3px;\n    cursor: pointer;\n    transition: all 0.2s ease;\n}\n\n.open-btn:hover {\n    background: #f0f0f0;\n    border-color: #4a90e2;\n    color: #4a90e2;\n}\n\n.open-btn i {\n    margin-right: 0.25rem;\n}\n\n/* Path item with open button */\n.path-item {\n    position: relative;\n    padding-right: 4rem;\n}\n\n/* Selection info */\n.selection-info {\n    margin-bottom: 1rem;\n    padding: 0.5rem 1rem;\n    background-color: #e3f2fd;\n    border: 1px solid #2196f3;\n    border-radius: 4px;\n    color: #1976d2;\n    font-size: 0.875rem;\n    display: flex;\n    align-items: center;\n    gap: 0.5rem;\n}"] }]
    }], () => [{ type: i0.ChangeDetectorRef }, { type: i0.Injector }], { reteContainer: [{
            type: ViewChild,
            args: ['reteContainer', { static: true }]
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FlowAgentFormSectionComponent, { className: "FlowAgentFormSectionComponent", filePath: "src/lib/custom/AIAgents/FlowAgentType/flow-agent-form-section.component.ts", lineNumber: 16 }); })();
//# sourceMappingURL=flow-agent-form-section.component.js.map