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, ChangeDetectionStrategy } from '@angular/core';
import { Subject } from 'rxjs';
import { CompositeKey, Metadata, RunView } from '@memberjunction/core';
import { BaseFormComponent } from '@memberjunction/ng-base-forms';
import { RegisterClass } from '@memberjunction/global';
import { SharedService } from '@memberjunction/ng-shared';
import { TestSuiteRunFormComponent } from '../../generated/Entities/TestSuiteRun/testsuiterun.form.component';
import * as i0 from "@angular/core";
import * as i1 from "@memberjunction/ng-shared";
import * as i2 from "@angular/router";
import * as i3 from "@angular/common";
import * as i4 from "@progress/kendo-angular-buttons";
function TestSuiteRunFormComponentExtended_div_2_Template(rf, ctx) { if (rf & 1) {
    const _r1 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 42)(1, "a", 43);
    i0.ɵɵlistener("click", function TestSuiteRunFormComponentExtended_div_2_Template_a_click_1_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.openTestSuite()); });
    i0.ɵɵelement(2, "i", 44);
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
    i0.ɵɵelement(4, "i", 45);
    i0.ɵɵelementStart(5, "span");
    i0.ɵɵtext(6);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", ctx_r1.testSuite.Name, " ");
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1("Run #", ctx_r1.record.ID.substring(0, 8), "");
} }
function TestSuiteRunFormComponentExtended_span_14_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 46);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(ctx_r1.record.Environment);
} }
function TestSuiteRunFormComponentExtended_span_15_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 47);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(ctx_r1.record.TriggerType);
} }
function TestSuiteRunFormComponentExtended_span_88_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 48);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(ctx_r1.testRuns.length);
} }
function TestSuiteRunFormComponentExtended_div_94_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 49)(1, "div", 50)(2, "div", 51);
    i0.ɵɵelement(3, "i", 10);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "div", 52)(5, "h2");
    i0.ɵɵtext(6);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(7, "div", 53);
    i0.ɵɵtext(8);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(9, "div", 54);
    i0.ɵɵtext(10);
    i0.ɵɵelementEnd()()()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵclassProp("passed", ctx_r1.record.Status === "Completed" && ctx_r1.getPassRate() >= 90)("failed", ctx_r1.record.Status === "Failed");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngClass", ctx_r1.getStatusIcon());
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1("SUITE ", ctx_r1.record.Status.toUpperCase(), "");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1("Pass Rate: ", ctx_r1.getPassRate().toFixed(1), "%");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate2("", ctx_r1.record.PassedTests, " of ", ctx_r1.record.TotalTests, " tests passed");
} }
function TestSuiteRunFormComponentExtended_div_95_div_1_div_1_span_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const run_r4 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1("Score: ", run_r4.Score.toFixed(4), "");
} }
function TestSuiteRunFormComponentExtended_div_95_div_1_div_1_span_12_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const run_r4 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1("", run_r4.DurationSeconds.toFixed(1), "s");
} }
function TestSuiteRunFormComponentExtended_div_95_div_1_div_1_Template(rf, ctx) { if (rf & 1) {
    const _r3 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 60);
    i0.ɵɵlistener("click", function TestSuiteRunFormComponentExtended_div_95_div_1_div_1_Template_div_click_0_listener() { const run_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.openTestRun(run_r4.ID)); });
    i0.ɵɵelementStart(1, "div", 61);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "div", 62);
    i0.ɵɵelement(4, "i", 63);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "div", 64)(6, "div", 65);
    i0.ɵɵtext(7);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(8, "div", 66)(9, "span", 67);
    i0.ɵɵtext(10);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(11, TestSuiteRunFormComponentExtended_div_95_div_1_div_1_span_11_Template, 2, 1, "span", 68)(12, TestSuiteRunFormComponentExtended_div_95_div_1_div_1_span_12_Template, 2, 1, "span", 68);
    i0.ɵɵelementEnd()();
    i0.ɵɵelement(13, "i", 45);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const run_r4 = ctx.$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(run_r4.Sequence);
    i0.ɵɵadvance();
    i0.ɵɵstyleProp("background-color", run_r4.Status === "Passed" ? "#4caf50" : run_r4.Status === "Failed" ? "#f44336" : "#ff9800");
    i0.ɵɵadvance();
    i0.ɵɵclassProp("fa-check", run_r4.Status === "Passed")("fa-times", run_r4.Status === "Failed")("fa-exclamation", run_r4.Status === "Error");
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(run_r4.Test);
    i0.ɵɵadvance(2);
    i0.ɵɵstyleProp("color", run_r4.Status === "Passed" ? "#4caf50" : run_r4.Status === "Failed" ? "#f44336" : "#ff9800");
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(run_r4.Status);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", run_r4.Score != null);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", run_r4.DurationSeconds);
} }
function TestSuiteRunFormComponentExtended_div_95_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 58);
    i0.ɵɵtemplate(1, TestSuiteRunFormComponentExtended_div_95_div_1_div_1_Template, 14, 15, "div", 59);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngForOf", ctx_r1.testRuns);
} }
function TestSuiteRunFormComponentExtended_div_95_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 69);
    i0.ɵɵelement(1, "i", 70);
    i0.ɵɵelementStart(2, "p");
    i0.ɵɵtext(3, "No test runs found for this suite execution");
    i0.ɵɵelementEnd()();
} }
function TestSuiteRunFormComponentExtended_div_95_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 55);
    i0.ɵɵtemplate(1, TestSuiteRunFormComponentExtended_div_95_div_1_Template, 2, 1, "div", 56)(2, TestSuiteRunFormComponentExtended_div_95_div_2_Template, 4, 0, "div", 57);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r1.testRuns.length > 0);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r1.testRunsLoaded && ctx_r1.testRuns.length === 0);
} }
function TestSuiteRunFormComponentExtended_div_96_a_11_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "a", 43);
    i0.ɵɵlistener("click", function TestSuiteRunFormComponentExtended_div_96_a_11_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.openTestSuite()); });
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(ctx_r1.testSuite.Name);
} }
function TestSuiteRunFormComponentExtended_div_96_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 71)(1, "div", 72)(2, "div", 73)(3, "div", 74);
    i0.ɵɵtext(4, "Run ID");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "div", 75);
    i0.ɵɵtext(6);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(7, "div", 73)(8, "div", 74);
    i0.ɵɵtext(9, "Test Suite");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(10, "div", 75);
    i0.ɵɵtemplate(11, TestSuiteRunFormComponentExtended_div_96_a_11_Template, 2, 1, "a", 76);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(12, "div", 73)(13, "div", 74);
    i0.ɵɵtext(14, "Status");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(15, "div", 75);
    i0.ɵɵtext(16);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(17, "div", 73)(18, "div", 74);
    i0.ɵɵtext(19, "Run By");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(20, "div", 75);
    i0.ɵɵtext(21);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(22, "div", 73)(23, "div", 74);
    i0.ɵɵtext(24, "Environment");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(25, "div", 75);
    i0.ɵɵtext(26);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(27, "div", 73)(28, "div", 74);
    i0.ɵɵtext(29, "Trigger Type");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(30, "div", 75);
    i0.ɵɵtext(31);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(32, "div", 73)(33, "div", 74);
    i0.ɵɵtext(34, "Git Commit");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(35, "div", 75);
    i0.ɵɵtext(36);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(37, "div", 73)(38, "div", 74);
    i0.ɵɵtext(39, "Agent Version");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(40, "div", 75);
    i0.ɵɵtext(41);
    i0.ɵɵelementEnd()()()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(6);
    i0.ɵɵtextInterpolate(ctx_r1.record.ID);
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("ngIf", ctx_r1.testSuite);
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r1.record.Status);
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r1.record.RunByUser);
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r1.record.Environment || "N/A");
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r1.record.TriggerType || "N/A");
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r1.record.GitCommit || "N/A");
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r1.record.AgentVersion || "N/A");
} }
let TestSuiteRunFormComponentExtended = class TestSuiteRunFormComponentExtended extends TestSuiteRunFormComponent {
    constructor(elementRef, sharedService, router, route, cdr) {
        super(elementRef, sharedService, router, route, cdr);
        this.router = router;
        this.cdr = cdr;
        this.destroy$ = new Subject();
        // UI state
        this.activeTab = 'overview';
        this.loading = false;
        this.error = null;
        this.testRunsLoaded = false;
        // Related entities
        this.testSuite = null;
        this.testRuns = [];
    }
    async ngOnInit() {
        await super.ngOnInit();
        if (this.record && this.record.ID) {
            await this.loadRelatedData();
        }
    }
    ngOnDestroy() {
        this.destroy$.next();
        this.destroy$.complete();
    }
    async loadRelatedData() {
        this.loading = true;
        try {
            // Load test suite
            if (this.record.SuiteID) {
                const md = new Metadata();
                const suite = await md.GetEntityObject('MJ: Test Suites');
                if (suite && await suite.Load(this.record.SuiteID)) {
                    this.testSuite = suite;
                }
            }
            this.cdr.markForCheck();
        }
        catch (error) {
            console.error('Error loading related data:', error);
            this.error = 'Failed to load related data';
        }
        finally {
            this.loading = false;
            this.cdr.markForCheck();
        }
    }
    async loadTestRuns() {
        if (this.testRunsLoaded)
            return;
        try {
            const rv = new RunView();
            const result = await rv.RunView({
                EntityName: 'MJ: Test Runs',
                ExtraFilter: `TestSuiteRunID='${this.record.ID}'`,
                OrderBy: 'Sequence ASC, StartedAt ASC',
                ResultType: 'entity_object'
            });
            if (result.Success) {
                this.testRuns = result.Results || [];
            }
            this.testRunsLoaded = true;
            this.cdr.markForCheck();
        }
        catch (error) {
            console.error('Error loading test runs:', error);
        }
    }
    changeTab(tab) {
        this.activeTab = tab;
        // Lazy load tabs
        if (tab === 'runs' && !this.testRunsLoaded) {
            this.loadTestRuns();
        }
        this.cdr.markForCheck();
    }
    getStatusColor() {
        switch (this.record.Status) {
            case 'Completed': return '#4caf50';
            case 'Failed': return '#f44336';
            case 'Running': return '#2196f3';
            case 'Pending': return '#ffc107';
            case 'Cancelled': return '#9e9e9e';
            default: return '#999';
        }
    }
    getStatusIcon() {
        switch (this.record.Status) {
            case 'Completed': return 'fa-check-circle';
            case 'Failed': return 'fa-times-circle';
            case 'Running': return 'fa-spinner fa-spin';
            case 'Pending': return 'fa-clock';
            case 'Cancelled': return 'fa-ban';
            default: return 'fa-question-circle';
        }
    }
    calculateDuration() {
        if (!this.record.TotalDurationSeconds)
            return 'N/A';
        const seconds = this.record.TotalDurationSeconds;
        if (seconds < 60)
            return `${seconds.toFixed(1)}s`;
        if (seconds < 3600) {
            const mins = Math.floor(seconds / 60);
            const secs = Math.floor(seconds % 60);
            return `${mins}m ${secs}s`;
        }
        const hours = Math.floor(seconds / 3600);
        const mins = Math.floor((seconds % 3600) / 60);
        return `${hours}h ${mins}m`;
    }
    formatCost(cost) {
        if (cost === null || cost === undefined)
            return 'N/A';
        return `$${cost.toFixed(6)}`;
    }
    getPassRate() {
        const total = this.record.TotalTests || 0;
        const passed = this.record.PassedTests || 0;
        if (total === 0)
            return 0;
        return (passed / total) * 100;
    }
    openTestSuite() {
        if (this.testSuite) {
            SharedService.Instance.OpenEntityRecord('MJ: Test Suites', CompositeKey.FromID(this.testSuite.ID));
        }
    }
    openTestRun(runId) {
        SharedService.Instance.OpenEntityRecord('MJ: Test Runs', CompositeKey.FromID(runId));
    }
    async refresh() {
        await this.loadRelatedData();
        if (this.testRunsLoaded) {
            this.testRunsLoaded = false;
            await this.loadTestRuns();
        }
        this.cdr.markForCheck();
    }
    static { this.ɵfac = function TestSuiteRunFormComponentExtended_Factory(t) { return new (t || TestSuiteRunFormComponentExtended)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.SharedService), i0.ɵɵdirectiveInject(i2.Router), i0.ɵɵdirectiveInject(i2.ActivatedRoute), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TestSuiteRunFormComponentExtended, selectors: [["mj-test-suite-run-form"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 97, vars: 35, consts: [[1, "test-suite-run-form"], [1, "suite-run-header"], ["class", "breadcrumb", 4, "ngIf"], [1, "header-content"], [1, "header-left"], [1, "suite-run-icon"], [1, "fas", "fa-layer-group"], [1, "suite-run-info"], [1, "suite-run-meta"], [1, "status-badge"], [1, "fas", 3, "ngClass"], ["class", "environment", 4, "ngIf"], ["class", "trigger", 4, "ngIf"], [1, "header-actions"], ["kendoButton", "", "icon", "sync", 3, "click"], [1, "metrics-bar"], [1, "metric-card"], [1, "metric-label"], [1, "metric-value"], [1, "results-summary"], [1, "result-item", "passed"], [1, "fas", "fa-check-circle"], [1, "count"], [1, "label"], [1, "result-item", "failed"], [1, "fas", "fa-times-circle"], [1, "result-item", "skipped"], [1, "fas", "fa-forward"], [1, "result-item", "error"], [1, "fas", "fa-exclamation-circle"], [1, "result-item", "total"], [1, "fas", "fa-list"], [1, "tabs-container"], [1, "tabs"], [1, "tab", 3, "click"], [1, "fas", "fa-th-large"], ["class", "tab-badge", 4, "ngIf"], [1, "fas", "fa-info-circle"], [1, "tab-content"], ["class", "overview-tab", 4, "ngIf"], ["class", "runs-tab", 4, "ngIf"], ["class", "details-tab", 4, "ngIf"], [1, "breadcrumb"], ["href", "javascript:void(0)", 3, "click"], [1, "fas", "fa-folder"], [1, "fas", "fa-chevron-right"], [1, "environment"], [1, "trigger"], [1, "tab-badge"], [1, "overview-tab"], [1, "result-hero"], [1, "result-icon"], [1, "result-text"], [1, "result-stats"], [1, "result-counts"], [1, "runs-tab"], ["class", "test-runs-list", 4, "ngIf"], ["class", "no-data", 4, "ngIf"], [1, "test-runs-list"], ["class", "test-run-item", 3, "click", 4, "ngFor", "ngForOf"], [1, "test-run-item", 3, "click"], [1, "run-sequence"], [1, "run-icon"], [1, "fas"], [1, "run-content"], [1, "run-name"], [1, "run-meta"], [1, "status"], [4, "ngIf"], [1, "no-data"], [1, "fas", "fa-inbox"], [1, "details-tab"], [1, "details-grid"], [1, "detail-item"], [1, "detail-label"], [1, "detail-value"], ["href", "javascript:void(0)", 3, "click", 4, "ngIf"]], template: function TestSuiteRunFormComponentExtended_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
            i0.ɵɵtemplate(2, TestSuiteRunFormComponentExtended_div_2_Template, 7, 2, "div", 2);
            i0.ɵɵelementStart(3, "div", 3)(4, "div", 4)(5, "div", 5);
            i0.ɵɵelement(6, "i", 6);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(7, "div", 7)(8, "h1");
            i0.ɵɵtext(9, "Test Suite Run");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(10, "div", 8)(11, "span", 9);
            i0.ɵɵelement(12, "i", 10);
            i0.ɵɵtext(13);
            i0.ɵɵelementEnd();
            i0.ɵɵtemplate(14, TestSuiteRunFormComponentExtended_span_14_Template, 2, 1, "span", 11)(15, TestSuiteRunFormComponentExtended_span_15_Template, 2, 1, "span", 12);
            i0.ɵɵelementEnd()()();
            i0.ɵɵelementStart(16, "div", 13)(17, "button", 14);
            i0.ɵɵlistener("click", function TestSuiteRunFormComponentExtended_Template_button_click_17_listener() { return ctx.refresh(); });
            i0.ɵɵtext(18, " Refresh ");
            i0.ɵɵelementEnd()()();
            i0.ɵɵelementStart(19, "div", 15)(20, "div", 16)(21, "div", 17);
            i0.ɵɵtext(22, "Started");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(23, "div", 18);
            i0.ɵɵtext(24);
            i0.ɵɵpipe(25, "date");
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(26, "div", 16)(27, "div", 17);
            i0.ɵɵtext(28, "Completed");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(29, "div", 18);
            i0.ɵɵtext(30);
            i0.ɵɵpipe(31, "date");
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(32, "div", 16)(33, "div", 17);
            i0.ɵɵtext(34, "Duration");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(35, "div", 18);
            i0.ɵɵtext(36);
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(37, "div", 16)(38, "div", 17);
            i0.ɵɵtext(39, "Pass Rate");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(40, "div", 18);
            i0.ɵɵtext(41);
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(42, "div", 16)(43, "div", 17);
            i0.ɵɵtext(44, "Cost");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(45, "div", 18);
            i0.ɵɵtext(46);
            i0.ɵɵelementEnd()()();
            i0.ɵɵelementStart(47, "div", 19)(48, "div", 20);
            i0.ɵɵelement(49, "i", 21);
            i0.ɵɵelementStart(50, "span", 22);
            i0.ɵɵtext(51);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(52, "span", 23);
            i0.ɵɵtext(53, "Passed");
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(54, "div", 24);
            i0.ɵɵelement(55, "i", 25);
            i0.ɵɵelementStart(56, "span", 22);
            i0.ɵɵtext(57);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(58, "span", 23);
            i0.ɵɵtext(59, "Failed");
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(60, "div", 26);
            i0.ɵɵelement(61, "i", 27);
            i0.ɵɵelementStart(62, "span", 22);
            i0.ɵɵtext(63);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(64, "span", 23);
            i0.ɵɵtext(65, "Skipped");
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(66, "div", 28);
            i0.ɵɵelement(67, "i", 29);
            i0.ɵɵelementStart(68, "span", 22);
            i0.ɵɵtext(69);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(70, "span", 23);
            i0.ɵɵtext(71, "Errors");
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(72, "div", 30);
            i0.ɵɵelement(73, "i", 31);
            i0.ɵɵelementStart(74, "span", 22);
            i0.ɵɵtext(75);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(76, "span", 23);
            i0.ɵɵtext(77, "Total");
            i0.ɵɵelementEnd()()()();
            i0.ɵɵelementStart(78, "div", 32)(79, "div", 33)(80, "button", 34);
            i0.ɵɵlistener("click", function TestSuiteRunFormComponentExtended_Template_button_click_80_listener() { return ctx.changeTab("overview"); });
            i0.ɵɵelement(81, "i", 35);
            i0.ɵɵelementStart(82, "span");
            i0.ɵɵtext(83, "Overview");
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(84, "button", 34);
            i0.ɵɵlistener("click", function TestSuiteRunFormComponentExtended_Template_button_click_84_listener() { return ctx.changeTab("runs"); });
            i0.ɵɵelement(85, "i", 31);
            i0.ɵɵelementStart(86, "span");
            i0.ɵɵtext(87, "Test Runs");
            i0.ɵɵelementEnd();
            i0.ɵɵtemplate(88, TestSuiteRunFormComponentExtended_span_88_Template, 2, 1, "span", 36);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(89, "button", 34);
            i0.ɵɵlistener("click", function TestSuiteRunFormComponentExtended_Template_button_click_89_listener() { return ctx.changeTab("details"); });
            i0.ɵɵelement(90, "i", 37);
            i0.ɵɵelementStart(91, "span");
            i0.ɵɵtext(92, "Details");
            i0.ɵɵelementEnd()()()();
            i0.ɵɵelementStart(93, "div", 38);
            i0.ɵɵtemplate(94, TestSuiteRunFormComponentExtended_div_94_Template, 11, 9, "div", 39)(95, TestSuiteRunFormComponentExtended_div_95_Template, 3, 2, "div", 40)(96, TestSuiteRunFormComponentExtended_div_96_Template, 42, 8, "div", 41);
            i0.ɵɵelementEnd()();
        } if (rf & 2) {
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("ngIf", ctx.testSuite);
            i0.ɵɵadvance(3);
            i0.ɵɵstyleProp("background-color", ctx.getStatusColor());
            i0.ɵɵadvance(6);
            i0.ɵɵstyleProp("background-color", ctx.getStatusColor());
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngClass", ctx.getStatusIcon());
            i0.ɵɵadvance();
            i0.ɵɵtextInterpolate1(" ", ctx.record.Status, " ");
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.record.Environment);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.record.TriggerType);
            i0.ɵɵadvance(9);
            i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(25, 29, ctx.record.StartedAt, "short"));
            i0.ɵɵadvance(6);
            i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(31, 32, ctx.record.CompletedAt, "short"));
            i0.ɵɵadvance(6);
            i0.ɵɵtextInterpolate(ctx.calculateDuration());
            i0.ɵɵadvance(5);
            i0.ɵɵtextInterpolate1("", ctx.getPassRate().toFixed(1), "%");
            i0.ɵɵadvance(5);
            i0.ɵɵtextInterpolate(ctx.formatCost(ctx.record.TotalCostUSD));
            i0.ɵɵadvance(5);
            i0.ɵɵtextInterpolate(ctx.record.PassedTests || 0);
            i0.ɵɵadvance(6);
            i0.ɵɵtextInterpolate(ctx.record.FailedTests || 0);
            i0.ɵɵadvance(6);
            i0.ɵɵtextInterpolate(ctx.record.SkippedTests || 0);
            i0.ɵɵadvance(6);
            i0.ɵɵtextInterpolate(ctx.record.ErrorTests || 0);
            i0.ɵɵadvance(6);
            i0.ɵɵtextInterpolate(ctx.record.TotalTests || 0);
            i0.ɵɵadvance(5);
            i0.ɵɵclassProp("active", ctx.activeTab === "overview");
            i0.ɵɵadvance(4);
            i0.ɵɵclassProp("active", ctx.activeTab === "runs");
            i0.ɵɵadvance(4);
            i0.ɵɵproperty("ngIf", ctx.testRunsLoaded);
            i0.ɵɵadvance();
            i0.ɵɵclassProp("active", ctx.activeTab === "details");
            i0.ɵɵadvance(5);
            i0.ɵɵproperty("ngIf", ctx.activeTab === "overview");
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.activeTab === "runs");
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.activeTab === "details");
        } }, dependencies: [i3.NgClass, i3.NgForOf, i3.NgIf, i4.ButtonComponent, i3.DatePipe], styles: [".test-suite-run-form[_ngcontent-%COMP%] {\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  background: #f8f9fa;\n}\n\n\n\n.suite-run-header[_ngcontent-%COMP%] {\n  background: white;\n  border-bottom: 1px solid #e0e0e0;\n  padding: 20px;\n}\n\n.breadcrumb[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  font-size: 13px;\n  color: #666;\n  margin-bottom: 16px;\n}\n\n.breadcrumb[_ngcontent-%COMP%]   a[_ngcontent-%COMP%] {\n  color: #2196f3;\n  text-decoration: none;\n  display: flex;\n  align-items: center;\n  gap: 6px;\n}\n\n.breadcrumb[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover {\n  text-decoration: underline;\n}\n\n.header-content[_ngcontent-%COMP%] {\n  display: flex;\n  justify-content: space-between;\n  align-items: flex-start;\n  margin-bottom: 20px;\n}\n\n.header-left[_ngcontent-%COMP%] {\n  display: flex;\n  gap: 16px;\n}\n\n.suite-run-icon[_ngcontent-%COMP%] {\n  width: 56px;\n  height: 56px;\n  border-radius: 12px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  color: white;\n  font-size: 24px;\n}\n\n.suite-run-info[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%] {\n  margin: 0 0 8px 0;\n  font-size: 24px;\n  font-weight: 600;\n  color: #333;\n}\n\n.suite-run-meta[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n}\n\n.status-badge[_ngcontent-%COMP%] {\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  padding: 4px 12px;\n  border-radius: 12px;\n  color: white;\n  font-size: 12px;\n  font-weight: 600;\n}\n\n.environment[_ngcontent-%COMP%], \n.trigger[_ngcontent-%COMP%] {\n  font-size: 13px;\n  color: #666;\n  padding: 4px 8px;\n  background: #f0f0f0;\n  border-radius: 6px;\n}\n\n.header-actions[_ngcontent-%COMP%] {\n  display: flex;\n  gap: 8px;\n}\n\n.metrics-bar[_ngcontent-%COMP%] {\n  display: grid;\n  grid-template-columns: repeat(5, 1fr);\n  gap: 16px;\n  margin-bottom: 16px;\n}\n\n.metric-card[_ngcontent-%COMP%] {\n  background: #f5f7fa;\n  border-radius: 8px;\n  padding: 12px;\n  text-align: center;\n}\n\n.metric-label[_ngcontent-%COMP%] {\n  font-size: 11px;\n  font-weight: 600;\n  text-transform: uppercase;\n  letter-spacing: 0.5px;\n  color: #999;\n  margin-bottom: 4px;\n}\n\n.metric-value[_ngcontent-%COMP%] {\n  font-size: 16px;\n  font-weight: 600;\n  color: #333;\n}\n\n.results-summary[_ngcontent-%COMP%] {\n  display: flex;\n  gap: 16px;\n  padding-top: 16px;\n  border-top: 1px solid #e0e0e0;\n}\n\n.result-item[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  padding: 8px 12px;\n  border-radius: 8px;\n  background: #f8f9fa;\n}\n\n.result-item[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n  font-size: 20px;\n}\n\n.result-item[_ngcontent-%COMP%]   .count[_ngcontent-%COMP%] {\n  font-size: 20px;\n  font-weight: 700;\n}\n\n.result-item[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%] {\n  font-size: 12px;\n  font-weight: 500;\n  color: #666;\n}\n\n.result-item.passed[_ngcontent-%COMP%]   i[_ngcontent-%COMP%], \n.result-item.passed[_ngcontent-%COMP%]   .count[_ngcontent-%COMP%] {\n  color: #4caf50;\n}\n\n.result-item.failed[_ngcontent-%COMP%]   i[_ngcontent-%COMP%], \n.result-item.failed[_ngcontent-%COMP%]   .count[_ngcontent-%COMP%] {\n  color: #f44336;\n}\n\n.result-item.skipped[_ngcontent-%COMP%]   i[_ngcontent-%COMP%], \n.result-item.skipped[_ngcontent-%COMP%]   .count[_ngcontent-%COMP%] {\n  color: #9e9e9e;\n}\n\n.result-item.error[_ngcontent-%COMP%]   i[_ngcontent-%COMP%], \n.result-item.error[_ngcontent-%COMP%]   .count[_ngcontent-%COMP%] {\n  color: #ff9800;\n}\n\n.result-item.total[_ngcontent-%COMP%]   i[_ngcontent-%COMP%], \n.result-item.total[_ngcontent-%COMP%]   .count[_ngcontent-%COMP%] {\n  color: #2196f3;\n}\n\n\n\n.tabs-container[_ngcontent-%COMP%] {\n  background: white;\n  border-bottom: 1px solid #e0e0e0;\n}\n\n.tabs[_ngcontent-%COMP%] {\n  display: flex;\n  padding: 0 20px;\n  overflow-x: auto;\n}\n\n.tab[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  padding: 16px 20px;\n  border: none;\n  background: transparent;\n  border-bottom: 3px solid transparent;\n  color: #666;\n  font-size: 14px;\n  font-weight: 500;\n  cursor: pointer;\n  transition: all 0.2s ease;\n}\n\n.tab[_ngcontent-%COMP%]:hover {\n  color: #2196f3;\n  background: rgba(33, 150, 243, 0.05);\n}\n\n.tab.active[_ngcontent-%COMP%] {\n  color: #2196f3;\n  border-bottom-color: #2196f3;\n}\n\n.tab[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n  font-size: 16px;\n}\n\n.tab-badge[_ngcontent-%COMP%] {\n  background: #e0e0e0;\n  color: #666;\n  padding: 2px 8px;\n  border-radius: 10px;\n  font-size: 11px;\n  font-weight: 600;\n}\n\n.tab.active[_ngcontent-%COMP%]   .tab-badge[_ngcontent-%COMP%] {\n  background: #e3f2fd;\n  color: #2196f3;\n}\n\n\n\n.tab-content[_ngcontent-%COMP%] {\n  flex: 1;\n  overflow-y: auto;\n  padding: 20px;\n}\n\n\n\n.overview-tab[_ngcontent-%COMP%] {\n  display: flex;\n  flex-direction: column;\n  gap: 20px;\n}\n\n.result-hero[_ngcontent-%COMP%] {\n  background: white;\n  border-radius: 12px;\n  padding: 32px;\n  text-align: center;\n  border: 3px solid #e0e0e0;\n}\n\n.result-hero.passed[_ngcontent-%COMP%] {\n  background: #e8f5e9;\n  border-color: #4caf50;\n}\n\n.result-hero.failed[_ngcontent-%COMP%] {\n  background: #ffebee;\n  border-color: #f44336;\n}\n\n.result-icon[_ngcontent-%COMP%] {\n  font-size: 64px;\n  margin-bottom: 16px;\n}\n\n.result-hero.passed[_ngcontent-%COMP%]   .result-icon[_ngcontent-%COMP%] {\n  color: #4caf50;\n}\n\n.result-hero.failed[_ngcontent-%COMP%]   .result-icon[_ngcontent-%COMP%] {\n  color: #f44336;\n}\n\n.result-text[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%] {\n  margin: 0 0 12px 0;\n  font-size: 32px;\n  font-weight: 700;\n  color: #333;\n}\n\n.result-stats[_ngcontent-%COMP%] {\n  font-size: 20px;\n  font-weight: 600;\n  color: #666;\n  margin-bottom: 8px;\n}\n\n.result-counts[_ngcontent-%COMP%] {\n  font-size: 16px;\n  color: #999;\n}\n\n\n\n.test-runs-list[_ngcontent-%COMP%] {\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n}\n\n.test-run-item[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  padding: 16px;\n  background: white;\n  border: 2px solid transparent;\n  border-radius: 8px;\n  cursor: pointer;\n  transition: all 0.2s ease;\n}\n\n.test-run-item[_ngcontent-%COMP%]:hover {\n  background: #e3f2fd;\n  border-color: #90caf9;\n}\n\n.run-sequence[_ngcontent-%COMP%] {\n  width: 32px;\n  height: 32px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  background: #f0f0f0;\n  border-radius: 50%;\n  font-size: 14px;\n  font-weight: 700;\n  color: #666;\n  flex-shrink: 0;\n}\n\n.run-icon[_ngcontent-%COMP%] {\n  width: 40px;\n  height: 40px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  border-radius: 8px;\n  color: white;\n  font-size: 18px;\n  flex-shrink: 0;\n}\n\n.run-content[_ngcontent-%COMP%] {\n  flex: 1;\n}\n\n.run-name[_ngcontent-%COMP%] {\n  font-size: 14px;\n  font-weight: 600;\n  color: #333;\n  margin-bottom: 4px;\n}\n\n.run-meta[_ngcontent-%COMP%] {\n  display: flex;\n  gap: 12px;\n  font-size: 12px;\n  color: #666;\n}\n\n.run-meta[_ngcontent-%COMP%]   .status[_ngcontent-%COMP%] {\n  font-weight: 700;\n}\n\n.test-run-item[_ngcontent-%COMP%]    > i[_ngcontent-%COMP%] {\n  color: #999;\n  font-size: 14px;\n}\n\n\n\n.details-tab[_ngcontent-%COMP%] {\n  background: white;\n  border-radius: 12px;\n  padding: 20px;\n}\n\n.details-grid[_ngcontent-%COMP%] {\n  display: grid;\n  grid-template-columns: repeat(2, 1fr);\n  gap: 16px;\n}\n\n.detail-item[_ngcontent-%COMP%] {\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n}\n\n.detail-label[_ngcontent-%COMP%] {\n  font-size: 12px;\n  font-weight: 600;\n  text-transform: uppercase;\n  letter-spacing: 0.5px;\n  color: #999;\n}\n\n.detail-value[_ngcontent-%COMP%] {\n  font-size: 14px;\n  color: #333;\n  word-wrap: break-word;\n}\n\n.detail-value[_ngcontent-%COMP%]   a[_ngcontent-%COMP%] {\n  color: #2196f3;\n  text-decoration: none;\n}\n\n.detail-value[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover {\n  text-decoration: underline;\n}\n\n\n\n.no-data[_ngcontent-%COMP%] {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  padding: 60px 20px;\n  color: #999;\n  text-align: center;\n  background: white;\n  border-radius: 12px;\n}\n\n.no-data[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n  font-size: 48px;\n  margin-bottom: 16px;\n  opacity: 0.3;\n}\n\n.no-data[_ngcontent-%COMP%]   p[_ngcontent-%COMP%] {\n  margin: 0;\n  font-size: 14px;\n}\n\n\n\n@media (max-width: 1200px) {\n  .metrics-bar[_ngcontent-%COMP%] {\n    grid-template-columns: repeat(3, 1fr);\n  }\n\n  .results-summary[_ngcontent-%COMP%] {\n    flex-wrap: wrap;\n  }\n}\n\n@media (max-width: 768px) {\n  .metrics-bar[_ngcontent-%COMP%] {\n    grid-template-columns: repeat(2, 1fr);\n  }\n\n  .details-grid[_ngcontent-%COMP%] {\n    grid-template-columns: 1fr;\n  }\n\n  .header-content[_ngcontent-%COMP%] {\n    flex-direction: column;\n    gap: 16px;\n  }\n\n  .tabs[_ngcontent-%COMP%] {\n    overflow-x: auto;\n  }\n}"], changeDetection: 0 }); }
};
TestSuiteRunFormComponentExtended = __decorate([
    RegisterClass(BaseFormComponent, 'MJ: Test Suite Runs')
], TestSuiteRunFormComponentExtended);
export { TestSuiteRunFormComponentExtended };
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TestSuiteRunFormComponentExtended, [{
        type: Component,
        args: [{ selector: 'mj-test-suite-run-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"test-suite-run-form\">\n  <!-- Header Section -->\n  <div class=\"suite-run-header\">\n    <div class=\"breadcrumb\" *ngIf=\"testSuite\">\n      <a href=\"javascript:void(0)\" (click)=\"openTestSuite()\">\n        <i class=\"fas fa-folder\"></i> {{ testSuite.Name }}\n      </a>\n      <i class=\"fas fa-chevron-right\"></i>\n      <span>Run #{{ record.ID.substring(0, 8) }}</span>\n    </div>\n\n    <div class=\"header-content\">\n      <div class=\"header-left\">\n        <div class=\"suite-run-icon\" [style.background-color]=\"getStatusColor()\">\n          <i class=\"fas fa-layer-group\"></i>\n        </div>\n        <div class=\"suite-run-info\">\n          <h1>Test Suite Run</h1>\n          <div class=\"suite-run-meta\">\n            <span class=\"status-badge\" [style.background-color]=\"getStatusColor()\">\n              <i class=\"fas\" [ngClass]=\"getStatusIcon()\"></i>\n              {{ record.Status }}\n            </span>\n            <span class=\"environment\" *ngIf=\"record.Environment\">{{ record.Environment }}</span>\n            <span class=\"trigger\" *ngIf=\"record.TriggerType\">{{ record.TriggerType }}</span>\n          </div>\n        </div>\n      </div>\n      <div class=\"header-actions\">\n        <button kendoButton (click)=\"refresh()\" icon=\"sync\">\n          Refresh\n        </button>\n      </div>\n    </div>\n\n    <!-- Metrics Bar -->\n    <div class=\"metrics-bar\">\n      <div class=\"metric-card\">\n        <div class=\"metric-label\">Started</div>\n        <div class=\"metric-value\">{{ record.StartedAt | date:'short' }}</div>\n      </div>\n      <div class=\"metric-card\">\n        <div class=\"metric-label\">Completed</div>\n        <div class=\"metric-value\">{{ record.CompletedAt | date:'short' }}</div>\n      </div>\n      <div class=\"metric-card\">\n        <div class=\"metric-label\">Duration</div>\n        <div class=\"metric-value\">{{ calculateDuration() }}</div>\n      </div>\n      <div class=\"metric-card\">\n        <div class=\"metric-label\">Pass Rate</div>\n        <div class=\"metric-value\">{{ getPassRate().toFixed(1) }}%</div>\n      </div>\n      <div class=\"metric-card\">\n        <div class=\"metric-label\">Cost</div>\n        <div class=\"metric-value\">{{ formatCost(record.TotalCostUSD) }}</div>\n      </div>\n    </div>\n\n    <!-- Test Results Summary -->\n    <div class=\"results-summary\">\n      <div class=\"result-item passed\">\n        <i class=\"fas fa-check-circle\"></i>\n        <span class=\"count\">{{ record.PassedTests || 0 }}</span>\n        <span class=\"label\">Passed</span>\n      </div>\n      <div class=\"result-item failed\">\n        <i class=\"fas fa-times-circle\"></i>\n        <span class=\"count\">{{ record.FailedTests || 0 }}</span>\n        <span class=\"label\">Failed</span>\n      </div>\n      <div class=\"result-item skipped\">\n        <i class=\"fas fa-forward\"></i>\n        <span class=\"count\">{{ record.SkippedTests || 0 }}</span>\n        <span class=\"label\">Skipped</span>\n      </div>\n      <div class=\"result-item error\">\n        <i class=\"fas fa-exclamation-circle\"></i>\n        <span class=\"count\">{{ record.ErrorTests || 0 }}</span>\n        <span class=\"label\">Errors</span>\n      </div>\n      <div class=\"result-item total\">\n        <i class=\"fas fa-list\"></i>\n        <span class=\"count\">{{ record.TotalTests || 0 }}</span>\n        <span class=\"label\">Total</span>\n      </div>\n    </div>\n  </div>\n\n  <!-- Tabs -->\n  <div class=\"tabs-container\">\n    <div class=\"tabs\">\n      <button class=\"tab\" [class.active]=\"activeTab === 'overview'\" (click)=\"changeTab('overview')\">\n        <i class=\"fas fa-th-large\"></i>\n        <span>Overview</span>\n      </button>\n      <button class=\"tab\" [class.active]=\"activeTab === 'runs'\" (click)=\"changeTab('runs')\">\n        <i class=\"fas fa-list\"></i>\n        <span>Test Runs</span>\n        <span class=\"tab-badge\" *ngIf=\"testRunsLoaded\">{{ testRuns.length }}</span>\n      </button>\n      <button class=\"tab\" [class.active]=\"activeTab === 'details'\" (click)=\"changeTab('details')\">\n        <i class=\"fas fa-info-circle\"></i>\n        <span>Details</span>\n      </button>\n    </div>\n  </div>\n\n  <!-- Tab Content -->\n  <div class=\"tab-content\">\n    <!-- Overview Tab -->\n    <div class=\"overview-tab\" *ngIf=\"activeTab === 'overview'\">\n      <!-- Result Hero -->\n      <div class=\"result-hero\" [class.passed]=\"record.Status === 'Completed' && getPassRate() >= 90\" [class.failed]=\"record.Status === 'Failed'\">\n        <div class=\"result-icon\">\n          <i class=\"fas\" [ngClass]=\"getStatusIcon()\"></i>\n        </div>\n        <div class=\"result-text\">\n          <h2>SUITE {{ record.Status.toUpperCase() }}</h2>\n          <div class=\"result-stats\">Pass Rate: {{ getPassRate().toFixed(1) }}%</div>\n          <div class=\"result-counts\">{{ record.PassedTests }} of {{ record.TotalTests }} tests passed</div>\n        </div>\n      </div>\n    </div>\n\n    <!-- Test Runs Tab -->\n    <div class=\"runs-tab\" *ngIf=\"activeTab === 'runs'\">\n      <div class=\"test-runs-list\" *ngIf=\"testRuns.length > 0\">\n        <div class=\"test-run-item\" *ngFor=\"let run of testRuns\" (click)=\"openTestRun(run.ID)\">\n          <div class=\"run-sequence\">{{ run.Sequence }}</div>\n          <div class=\"run-icon\" [style.background-color]=\"run.Status === 'Passed' ? '#4caf50' : run.Status === 'Failed' ? '#f44336' : '#ff9800'\">\n            <i class=\"fas\" [class.fa-check]=\"run.Status === 'Passed'\" [class.fa-times]=\"run.Status === 'Failed'\" [class.fa-exclamation]=\"run.Status === 'Error'\"></i>\n          </div>\n          <div class=\"run-content\">\n            <div class=\"run-name\">{{ run.Test }}</div>\n            <div class=\"run-meta\">\n              <span class=\"status\" [style.color]=\"run.Status === 'Passed' ? '#4caf50' : run.Status === 'Failed' ? '#f44336' : '#ff9800'\">{{ run.Status }}</span>\n              <span *ngIf=\"run.Score != null\">Score: {{ run.Score.toFixed(4) }}</span>\n              <span *ngIf=\"run.DurationSeconds\">{{ run.DurationSeconds.toFixed(1) }}s</span>\n            </div>\n          </div>\n          <i class=\"fas fa-chevron-right\"></i>\n        </div>\n      </div>\n\n      <div class=\"no-data\" *ngIf=\"testRunsLoaded && testRuns.length === 0\">\n        <i class=\"fas fa-inbox\"></i>\n        <p>No test runs found for this suite execution</p>\n      </div>\n    </div>\n\n    <!-- Details Tab -->\n    <div class=\"details-tab\" *ngIf=\"activeTab === 'details'\">\n      <div class=\"details-grid\">\n        <div class=\"detail-item\">\n          <div class=\"detail-label\">Run ID</div>\n          <div class=\"detail-value\">{{ record.ID }}</div>\n        </div>\n        <div class=\"detail-item\">\n          <div class=\"detail-label\">Test Suite</div>\n          <div class=\"detail-value\">\n            <a href=\"javascript:void(0)\" (click)=\"openTestSuite()\" *ngIf=\"testSuite\">{{ testSuite.Name }}</a>\n          </div>\n        </div>\n        <div class=\"detail-item\">\n          <div class=\"detail-label\">Status</div>\n          <div class=\"detail-value\">{{ record.Status }}</div>\n        </div>\n        <div class=\"detail-item\">\n          <div class=\"detail-label\">Run By</div>\n          <div class=\"detail-value\">{{ record.RunByUser }}</div>\n        </div>\n        <div class=\"detail-item\">\n          <div class=\"detail-label\">Environment</div>\n          <div class=\"detail-value\">{{ record.Environment || 'N/A' }}</div>\n        </div>\n        <div class=\"detail-item\">\n          <div class=\"detail-label\">Trigger Type</div>\n          <div class=\"detail-value\">{{ record.TriggerType || 'N/A' }}</div>\n        </div>\n        <div class=\"detail-item\">\n          <div class=\"detail-label\">Git Commit</div>\n          <div class=\"detail-value\">{{ record.GitCommit || 'N/A' }}</div>\n        </div>\n        <div class=\"detail-item\">\n          <div class=\"detail-label\">Agent Version</div>\n          <div class=\"detail-value\">{{ record.AgentVersion || 'N/A' }}</div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n", styles: [".test-suite-run-form {\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  background: #f8f9fa;\n}\n\n/* Header */\n.suite-run-header {\n  background: white;\n  border-bottom: 1px solid #e0e0e0;\n  padding: 20px;\n}\n\n.breadcrumb {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  font-size: 13px;\n  color: #666;\n  margin-bottom: 16px;\n}\n\n.breadcrumb a {\n  color: #2196f3;\n  text-decoration: none;\n  display: flex;\n  align-items: center;\n  gap: 6px;\n}\n\n.breadcrumb a:hover {\n  text-decoration: underline;\n}\n\n.header-content {\n  display: flex;\n  justify-content: space-between;\n  align-items: flex-start;\n  margin-bottom: 20px;\n}\n\n.header-left {\n  display: flex;\n  gap: 16px;\n}\n\n.suite-run-icon {\n  width: 56px;\n  height: 56px;\n  border-radius: 12px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  color: white;\n  font-size: 24px;\n}\n\n.suite-run-info h1 {\n  margin: 0 0 8px 0;\n  font-size: 24px;\n  font-weight: 600;\n  color: #333;\n}\n\n.suite-run-meta {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n}\n\n.status-badge {\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  padding: 4px 12px;\n  border-radius: 12px;\n  color: white;\n  font-size: 12px;\n  font-weight: 600;\n}\n\n.environment,\n.trigger {\n  font-size: 13px;\n  color: #666;\n  padding: 4px 8px;\n  background: #f0f0f0;\n  border-radius: 6px;\n}\n\n.header-actions {\n  display: flex;\n  gap: 8px;\n}\n\n.metrics-bar {\n  display: grid;\n  grid-template-columns: repeat(5, 1fr);\n  gap: 16px;\n  margin-bottom: 16px;\n}\n\n.metric-card {\n  background: #f5f7fa;\n  border-radius: 8px;\n  padding: 12px;\n  text-align: center;\n}\n\n.metric-label {\n  font-size: 11px;\n  font-weight: 600;\n  text-transform: uppercase;\n  letter-spacing: 0.5px;\n  color: #999;\n  margin-bottom: 4px;\n}\n\n.metric-value {\n  font-size: 16px;\n  font-weight: 600;\n  color: #333;\n}\n\n.results-summary {\n  display: flex;\n  gap: 16px;\n  padding-top: 16px;\n  border-top: 1px solid #e0e0e0;\n}\n\n.result-item {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  padding: 8px 12px;\n  border-radius: 8px;\n  background: #f8f9fa;\n}\n\n.result-item i {\n  font-size: 20px;\n}\n\n.result-item .count {\n  font-size: 20px;\n  font-weight: 700;\n}\n\n.result-item .label {\n  font-size: 12px;\n  font-weight: 500;\n  color: #666;\n}\n\n.result-item.passed i,\n.result-item.passed .count {\n  color: #4caf50;\n}\n\n.result-item.failed i,\n.result-item.failed .count {\n  color: #f44336;\n}\n\n.result-item.skipped i,\n.result-item.skipped .count {\n  color: #9e9e9e;\n}\n\n.result-item.error i,\n.result-item.error .count {\n  color: #ff9800;\n}\n\n.result-item.total i,\n.result-item.total .count {\n  color: #2196f3;\n}\n\n/* Tabs */\n.tabs-container {\n  background: white;\n  border-bottom: 1px solid #e0e0e0;\n}\n\n.tabs {\n  display: flex;\n  padding: 0 20px;\n  overflow-x: auto;\n}\n\n.tab {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  padding: 16px 20px;\n  border: none;\n  background: transparent;\n  border-bottom: 3px solid transparent;\n  color: #666;\n  font-size: 14px;\n  font-weight: 500;\n  cursor: pointer;\n  transition: all 0.2s ease;\n}\n\n.tab:hover {\n  color: #2196f3;\n  background: rgba(33, 150, 243, 0.05);\n}\n\n.tab.active {\n  color: #2196f3;\n  border-bottom-color: #2196f3;\n}\n\n.tab i {\n  font-size: 16px;\n}\n\n.tab-badge {\n  background: #e0e0e0;\n  color: #666;\n  padding: 2px 8px;\n  border-radius: 10px;\n  font-size: 11px;\n  font-weight: 600;\n}\n\n.tab.active .tab-badge {\n  background: #e3f2fd;\n  color: #2196f3;\n}\n\n/* Tab Content */\n.tab-content {\n  flex: 1;\n  overflow-y: auto;\n  padding: 20px;\n}\n\n/* Overview Tab */\n.overview-tab {\n  display: flex;\n  flex-direction: column;\n  gap: 20px;\n}\n\n.result-hero {\n  background: white;\n  border-radius: 12px;\n  padding: 32px;\n  text-align: center;\n  border: 3px solid #e0e0e0;\n}\n\n.result-hero.passed {\n  background: #e8f5e9;\n  border-color: #4caf50;\n}\n\n.result-hero.failed {\n  background: #ffebee;\n  border-color: #f44336;\n}\n\n.result-icon {\n  font-size: 64px;\n  margin-bottom: 16px;\n}\n\n.result-hero.passed .result-icon {\n  color: #4caf50;\n}\n\n.result-hero.failed .result-icon {\n  color: #f44336;\n}\n\n.result-text h2 {\n  margin: 0 0 12px 0;\n  font-size: 32px;\n  font-weight: 700;\n  color: #333;\n}\n\n.result-stats {\n  font-size: 20px;\n  font-weight: 600;\n  color: #666;\n  margin-bottom: 8px;\n}\n\n.result-counts {\n  font-size: 16px;\n  color: #999;\n}\n\n/* Test Runs Tab */\n.test-runs-list {\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n}\n\n.test-run-item {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  padding: 16px;\n  background: white;\n  border: 2px solid transparent;\n  border-radius: 8px;\n  cursor: pointer;\n  transition: all 0.2s ease;\n}\n\n.test-run-item:hover {\n  background: #e3f2fd;\n  border-color: #90caf9;\n}\n\n.run-sequence {\n  width: 32px;\n  height: 32px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  background: #f0f0f0;\n  border-radius: 50%;\n  font-size: 14px;\n  font-weight: 700;\n  color: #666;\n  flex-shrink: 0;\n}\n\n.run-icon {\n  width: 40px;\n  height: 40px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  border-radius: 8px;\n  color: white;\n  font-size: 18px;\n  flex-shrink: 0;\n}\n\n.run-content {\n  flex: 1;\n}\n\n.run-name {\n  font-size: 14px;\n  font-weight: 600;\n  color: #333;\n  margin-bottom: 4px;\n}\n\n.run-meta {\n  display: flex;\n  gap: 12px;\n  font-size: 12px;\n  color: #666;\n}\n\n.run-meta .status {\n  font-weight: 700;\n}\n\n.test-run-item > i {\n  color: #999;\n  font-size: 14px;\n}\n\n/* Details Tab */\n.details-tab {\n  background: white;\n  border-radius: 12px;\n  padding: 20px;\n}\n\n.details-grid {\n  display: grid;\n  grid-template-columns: repeat(2, 1fr);\n  gap: 16px;\n}\n\n.detail-item {\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n}\n\n.detail-label {\n  font-size: 12px;\n  font-weight: 600;\n  text-transform: uppercase;\n  letter-spacing: 0.5px;\n  color: #999;\n}\n\n.detail-value {\n  font-size: 14px;\n  color: #333;\n  word-wrap: break-word;\n}\n\n.detail-value a {\n  color: #2196f3;\n  text-decoration: none;\n}\n\n.detail-value a:hover {\n  text-decoration: underline;\n}\n\n/* No Data State */\n.no-data {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  padding: 60px 20px;\n  color: #999;\n  text-align: center;\n  background: white;\n  border-radius: 12px;\n}\n\n.no-data i {\n  font-size: 48px;\n  margin-bottom: 16px;\n  opacity: 0.3;\n}\n\n.no-data p {\n  margin: 0;\n  font-size: 14px;\n}\n\n/* Responsive */\n@media (max-width: 1200px) {\n  .metrics-bar {\n    grid-template-columns: repeat(3, 1fr);\n  }\n\n  .results-summary {\n    flex-wrap: wrap;\n  }\n}\n\n@media (max-width: 768px) {\n  .metrics-bar {\n    grid-template-columns: repeat(2, 1fr);\n  }\n\n  .details-grid {\n    grid-template-columns: 1fr;\n  }\n\n  .header-content {\n    flex-direction: column;\n    gap: 16px;\n  }\n\n  .tabs {\n    overflow-x: auto;\n  }\n}\n"] }]
    }], () => [{ type: i0.ElementRef }, { type: i1.SharedService }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i0.ChangeDetectorRef }], null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TestSuiteRunFormComponentExtended, { className: "TestSuiteRunFormComponentExtended", filePath: "src/lib/custom/Tests/test-suite-run-form.component.ts", lineNumber: 19 }); })();
export function LoadTestSuiteRunFormComponentExtended() {
    // Prevents tree-shaking
}
LoadTestSuiteRunFormComponentExtended();
//# sourceMappingURL=test-suite-run-form.component.js.map