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, RunView } from '@memberjunction/core';
import { BaseFormComponent } from '@memberjunction/ng-base-forms';
import { RegisterClass } from '@memberjunction/global';
import { SharedService } from '@memberjunction/ng-shared';
import { TestSuiteFormComponent } from '../../generated/Entities/TestSuite/testsuite.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 "@memberjunction/ng-testing";
import * as i4 from "@angular/common";
import * as i5 from "@progress/kendo-angular-dialog";
import * as i6 from "@progress/kendo-angular-buttons";
function TestSuiteFormComponentExtended_div_15_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 23)(1, "p");
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(ctx_r0.record.Description);
} }
function TestSuiteFormComponentExtended_span_24_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 24);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(ctx_r0.suiteTests.length);
} }
function TestSuiteFormComponentExtended_span_28_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 24);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(ctx_r0.suiteRuns.length);
} }
function TestSuiteFormComponentExtended_div_30_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 25)(1, "div", 26)(2, "h3");
    i0.ɵɵtext(3, "Suite Information");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "div", 27)(5, "div", 28)(6, "div", 29);
    i0.ɵɵtext(7, "Name");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(8, "div", 30);
    i0.ɵɵtext(9);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(10, "div", 28)(11, "div", 29);
    i0.ɵɵtext(12, "Status");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(13, "div", 30);
    i0.ɵɵtext(14);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(15, "div", 28)(16, "div", 29);
    i0.ɵɵtext(17, "Created");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(18, "div", 30);
    i0.ɵɵtext(19);
    i0.ɵɵpipe(20, "date");
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(21, "div", 28)(22, "div", 29);
    i0.ɵɵtext(23, "Updated");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(24, "div", 30);
    i0.ɵɵtext(25);
    i0.ɵɵpipe(26, "date");
    i0.ɵɵelementEnd()()()()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(9);
    i0.ɵɵtextInterpolate(ctx_r0.record.Name);
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r0.record.Status);
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(20, 4, ctx_r0.record.__mj_CreatedAt, "medium"));
    i0.ɵɵadvance(6);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(26, 7, ctx_r0.record.__mj_UpdatedAt, "medium"));
} }
function TestSuiteFormComponentExtended_div_31_div_1_div_1_Template(rf, ctx) { if (rf & 1) {
    const _r2 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 36);
    i0.ɵɵlistener("click", function TestSuiteFormComponentExtended_div_31_div_1_div_1_Template_div_click_0_listener() { const test_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.openTest(test_r3.TestID)); });
    i0.ɵɵelementStart(1, "div", 37);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "div", 38);
    i0.ɵɵelement(4, "i", 16);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "div", 39)(6, "div", 40);
    i0.ɵɵtext(7);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(8, "div", 41);
    i0.ɵɵtext(9);
    i0.ɵɵelementEnd()();
    i0.ɵɵelement(10, "i", 42);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const test_r3 = ctx.$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(test_r3.Sequence);
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(test_r3.Test);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(test_r3.Status);
} }
function TestSuiteFormComponentExtended_div_31_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 34);
    i0.ɵɵtemplate(1, TestSuiteFormComponentExtended_div_31_div_1_div_1_Template, 11, 3, "div", 35);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngForOf", ctx_r0.suiteTests);
} }
function TestSuiteFormComponentExtended_div_31_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 43);
    i0.ɵɵelement(1, "i", 44);
    i0.ɵɵelementStart(2, "p");
    i0.ɵɵtext(3, "No tests in this suite");
    i0.ɵɵelementEnd()();
} }
function TestSuiteFormComponentExtended_div_31_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 31);
    i0.ɵɵtemplate(1, TestSuiteFormComponentExtended_div_31_div_1_Template, 2, 1, "div", 32)(2, TestSuiteFormComponentExtended_div_31_div_2_Template, 4, 0, "div", 33);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r0.suiteTests.length > 0);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r0.testsLoaded && ctx_r0.suiteTests.length === 0);
} }
function TestSuiteFormComponentExtended_div_32_div_1_div_1_span_13_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const run_r5 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate2("", run_r5.PassedTests, "/", run_r5.TotalTests, " passed");
} }
function TestSuiteFormComponentExtended_div_32_div_1_div_1_Template(rf, ctx) { if (rf & 1) {
    const _r4 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 49);
    i0.ɵɵlistener("click", function TestSuiteFormComponentExtended_div_32_div_1_div_1_Template_div_click_0_listener() { const run_r5 = i0.ɵɵrestoreView(_r4).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.openSuiteRun(run_r5.ID)); });
    i0.ɵɵelementStart(1, "div", 50);
    i0.ɵɵelement(2, "i", 51);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "div", 52)(4, "div", 53)(5, "span", 54);
    i0.ɵɵtext(6);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(7, "span", 55);
    i0.ɵɵtext(8);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(9, "div", 56)(10, "span");
    i0.ɵɵtext(11);
    i0.ɵɵpipe(12, "date");
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(13, TestSuiteFormComponentExtended_div_32_div_1_div_1_span_13_Template, 2, 2, "span", 57);
    i0.ɵɵelementEnd()();
    i0.ɵɵelement(14, "i", 42);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const run_r5 = ctx.$implicit;
    i0.ɵɵadvance();
    i0.ɵɵstyleProp("background-color", run_r5.Status === "Completed" ? "#4caf50" : run_r5.Status === "Failed" ? "#f44336" : "#2196f3");
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(run_r5.ID.substring(0, 8));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(run_r5.Status);
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(12, 6, run_r5.StartedAt, "short"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", run_r5.TotalTests);
} }
function TestSuiteFormComponentExtended_div_32_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 47);
    i0.ɵɵtemplate(1, TestSuiteFormComponentExtended_div_32_div_1_div_1_Template, 15, 9, "div", 48);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngForOf", ctx_r0.suiteRuns);
} }
function TestSuiteFormComponentExtended_div_32_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 43);
    i0.ɵɵelement(1, "i", 44);
    i0.ɵɵelementStart(2, "p");
    i0.ɵɵtext(3, "No runs for this suite");
    i0.ɵɵelementEnd()();
} }
function TestSuiteFormComponentExtended_div_32_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 45);
    i0.ɵɵtemplate(1, TestSuiteFormComponentExtended_div_32_div_1_Template, 2, 1, "div", 46)(2, TestSuiteFormComponentExtended_div_32_div_2_Template, 4, 0, "div", 33);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r0.suiteRuns.length > 0);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r0.runsLoaded && ctx_r0.suiteRuns.length === 0);
} }
let TestSuiteFormComponentExtended = class TestSuiteFormComponentExtended extends TestSuiteFormComponent {
    constructor(elementRef, sharedService, router, route, cdr, testingDialogService) {
        super(elementRef, sharedService, router, route, cdr);
        this.router = router;
        this.cdr = cdr;
        this.testingDialogService = testingDialogService;
        this.destroy$ = new Subject();
        this.activeTab = 'overview';
        this.loading = false;
        this.testsLoaded = false;
        this.runsLoaded = false;
        this.suiteTests = [];
        this.suiteRuns = [];
    }
    async ngOnInit() {
        await super.ngOnInit();
    }
    ngOnDestroy() {
        this.destroy$.next();
        this.destroy$.complete();
    }
    changeTab(tab) {
        this.activeTab = tab;
        if (tab === 'tests' && !this.testsLoaded)
            this.loadTests();
        if (tab === 'runs' && !this.runsLoaded)
            this.loadRuns();
        this.cdr.markForCheck();
    }
    async loadTests() {
        const rv = new RunView();
        const result = await rv.RunView({
            EntityName: 'MJ: Test Suite Tests',
            ExtraFilter: `SuiteID='${this.record.ID}'`,
            OrderBy: 'Sequence',
            ResultType: 'entity_object'
        });
        if (result.Success)
            this.suiteTests = result.Results || [];
        this.testsLoaded = true;
        this.cdr.markForCheck();
    }
    async loadRuns() {
        const rv = new RunView();
        const result = await rv.RunView({
            EntityName: 'MJ: Test Suite Runs',
            ExtraFilter: `SuiteID='${this.record.ID}'`,
            OrderBy: 'StartedAt DESC',
            MaxRows: 50,
            ResultType: 'entity_object'
        });
        if (result.Success)
            this.suiteRuns = result.Results || [];
        this.runsLoaded = true;
        this.cdr.markForCheck();
    }
    getStatusColor() {
        return this.record.Status === 'Active' ? '#4caf50' : '#9e9e9e';
    }
    openTest(testId) {
        SharedService.Instance.OpenEntityRecord('MJ: Tests', CompositeKey.FromID(testId));
    }
    openSuiteRun(runId) {
        SharedService.Instance.OpenEntityRecord('MJ: Test Suite Runs', CompositeKey.FromID(runId));
    }
    async runSuite() {
        if (this.record?.ID) {
            this.testingDialogService.OpenSuiteDialog(this.record.ID);
        }
    }
    static { this.ɵfac = function TestSuiteFormComponentExtended_Factory(t) { return new (t || TestSuiteFormComponentExtended)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.SharedService), i0.ɵɵdirectiveInject(i2.Router), i0.ɵɵdirectiveInject(i2.ActivatedRoute), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i3.TestingDialogService)); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TestSuiteFormComponentExtended, selectors: [["mj-test-suite-form"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 33, vars: 18, consts: [["kendoDialogContainer", "", 1, "test-suite-form"], [1, "suite-header"], [1, "header-content"], [1, "header-left"], [1, "suite-icon"], [1, "fas", "fa-layer-group"], [1, "suite-info"], [1, "suite-meta"], [1, "status-badge"], [1, "header-actions"], ["kendoButton", "", "icon", "play", 3, "click"], ["class", "suite-description", 4, "ngIf"], [1, "tabs-container"], [1, "tabs"], [1, "tab", 3, "click"], [1, "fas", "fa-th-large"], [1, "fas", "fa-flask"], ["class", "tab-badge", 4, "ngIf"], [1, "fas", "fa-history"], [1, "tab-content"], ["class", "overview-tab", 4, "ngIf"], ["class", "tests-tab", 4, "ngIf"], ["class", "runs-tab", 4, "ngIf"], [1, "suite-description"], [1, "tab-badge"], [1, "overview-tab"], [1, "info-section"], [1, "info-grid"], [1, "info-item"], [1, "info-label"], [1, "info-value"], [1, "tests-tab"], ["class", "tests-list", 4, "ngIf"], ["class", "no-data", 4, "ngIf"], [1, "tests-list"], ["class", "test-item", 3, "click", 4, "ngFor", "ngForOf"], [1, "test-item", 3, "click"], [1, "test-sequence"], [1, "test-icon"], [1, "test-content"], [1, "test-name"], [1, "test-status"], [1, "fas", "fa-chevron-right"], [1, "no-data"], [1, "fas", "fa-inbox"], [1, "runs-tab"], ["class", "runs-list", 4, "ngIf"], [1, "runs-list"], ["class", "run-item", 3, "click", 4, "ngFor", "ngForOf"], [1, "run-item", 3, "click"], [1, "run-icon"], [1, "fas", "fa-play"], [1, "run-content"], [1, "run-header"], [1, "run-id"], [1, "run-status"], [1, "run-meta"], [4, "ngIf"]], template: function TestSuiteFormComponentExtended_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "div", 3)(4, "div", 4);
            i0.ɵɵelement(5, "i", 5);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(6, "div", 6)(7, "h1");
            i0.ɵɵtext(8);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(9, "div", 7)(10, "span", 8);
            i0.ɵɵtext(11);
            i0.ɵɵelementEnd()()()();
            i0.ɵɵelementStart(12, "div", 9)(13, "button", 10);
            i0.ɵɵlistener("click", function TestSuiteFormComponentExtended_Template_button_click_13_listener() { return ctx.runSuite(); });
            i0.ɵɵtext(14, "Run Suite");
            i0.ɵɵelementEnd()()();
            i0.ɵɵtemplate(15, TestSuiteFormComponentExtended_div_15_Template, 3, 1, "div", 11);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(16, "div", 12)(17, "div", 13)(18, "button", 14);
            i0.ɵɵlistener("click", function TestSuiteFormComponentExtended_Template_button_click_18_listener() { return ctx.changeTab("overview"); });
            i0.ɵɵelement(19, "i", 15);
            i0.ɵɵtext(20, " Overview ");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(21, "button", 14);
            i0.ɵɵlistener("click", function TestSuiteFormComponentExtended_Template_button_click_21_listener() { return ctx.changeTab("tests"); });
            i0.ɵɵelement(22, "i", 16);
            i0.ɵɵtext(23, " Tests ");
            i0.ɵɵtemplate(24, TestSuiteFormComponentExtended_span_24_Template, 2, 1, "span", 17);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(25, "button", 14);
            i0.ɵɵlistener("click", function TestSuiteFormComponentExtended_Template_button_click_25_listener() { return ctx.changeTab("runs"); });
            i0.ɵɵelement(26, "i", 18);
            i0.ɵɵtext(27, " Runs ");
            i0.ɵɵtemplate(28, TestSuiteFormComponentExtended_span_28_Template, 2, 1, "span", 17);
            i0.ɵɵelementEnd()()();
            i0.ɵɵelementStart(29, "div", 19);
            i0.ɵɵtemplate(30, TestSuiteFormComponentExtended_div_30_Template, 27, 10, "div", 20)(31, TestSuiteFormComponentExtended_div_31_Template, 3, 2, "div", 21)(32, TestSuiteFormComponentExtended_div_32_Template, 3, 2, "div", 22);
            i0.ɵɵelementEnd()();
        } if (rf & 2) {
            i0.ɵɵadvance(4);
            i0.ɵɵstyleProp("background-color", ctx.getStatusColor());
            i0.ɵɵadvance(4);
            i0.ɵɵtextInterpolate(ctx.record.Name);
            i0.ɵɵadvance(2);
            i0.ɵɵstyleProp("background-color", ctx.getStatusColor());
            i0.ɵɵadvance();
            i0.ɵɵtextInterpolate1(" ", ctx.record.Status, " ");
            i0.ɵɵadvance(4);
            i0.ɵɵproperty("ngIf", ctx.record.Description);
            i0.ɵɵadvance(3);
            i0.ɵɵclassProp("active", ctx.activeTab === "overview");
            i0.ɵɵadvance(3);
            i0.ɵɵclassProp("active", ctx.activeTab === "tests");
            i0.ɵɵadvance(3);
            i0.ɵɵproperty("ngIf", ctx.testsLoaded);
            i0.ɵɵadvance();
            i0.ɵɵclassProp("active", ctx.activeTab === "runs");
            i0.ɵɵadvance(3);
            i0.ɵɵproperty("ngIf", ctx.runsLoaded);
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("ngIf", ctx.activeTab === "overview");
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.activeTab === "tests");
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.activeTab === "runs");
        } }, dependencies: [i4.NgForOf, i4.NgIf, i5.DialogContainerDirective, i6.ButtonComponent, i4.DatePipe], styles: [".test-suite-form[_ngcontent-%COMP%] { display: flex; flex-direction: column; height: 100%; background: #f8f9fa; }\n.suite-header[_ngcontent-%COMP%] { background: white; border-bottom: 1px solid #e0e0e0; padding: 20px; }\n.header-content[_ngcontent-%COMP%] { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }\n.header-left[_ngcontent-%COMP%] { display: flex; gap: 16px; }\n.suite-icon[_ngcontent-%COMP%] { width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; font-size: 24px; }\n.suite-info[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%] { margin: 0 0 8px 0; font-size: 24px; font-weight: 600; color: #333; }\n.suite-meta[_ngcontent-%COMP%] { display: flex; align-items: center; gap: 12px; }\n.status-badge[_ngcontent-%COMP%] { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 12px; color: white; font-size: 12px; font-weight: 600; }\n.suite-description[_ngcontent-%COMP%] { padding: 16px; background: #f8f9fa; border-radius: 8px; }\n.suite-description[_ngcontent-%COMP%]   p[_ngcontent-%COMP%] { margin: 0; color: #666; line-height: 1.5; }\n.tabs-container[_ngcontent-%COMP%] { background: white; border-bottom: 1px solid #e0e0e0; }\n.tabs[_ngcontent-%COMP%] { display: flex; padding: 0 20px; overflow-x: auto; }\n.tab[_ngcontent-%COMP%] { display: flex; align-items: center; gap: 8px; padding: 16px 20px; border: none; background: transparent; border-bottom: 3px solid transparent; color: #666; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s ease; }\n.tab[_ngcontent-%COMP%]:hover { color: #2196f3; background: rgba(33, 150, 243, 0.05); }\n.tab.active[_ngcontent-%COMP%] { color: #2196f3; border-bottom-color: #2196f3; }\n.tab-badge[_ngcontent-%COMP%] { background: #e0e0e0; color: #666; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }\n.tab.active[_ngcontent-%COMP%]   .tab-badge[_ngcontent-%COMP%] { background: #e3f2fd; color: #2196f3; }\n.tab-content[_ngcontent-%COMP%] { flex: 1; overflow-y: auto; padding: 20px; }\n.info-section[_ngcontent-%COMP%] { background: white; border-radius: 12px; padding: 20px; }\n.info-section[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%] { margin: 0 0 16px 0; font-size: 18px; font-weight: 600; color: #333; }\n.info-grid[_ngcontent-%COMP%] { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }\n.info-item[_ngcontent-%COMP%] { display: flex; flex-direction: column; gap: 4px; }\n.info-label[_ngcontent-%COMP%] { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #999; }\n.info-value[_ngcontent-%COMP%] { font-size: 14px; color: #333; word-wrap: break-word; }\n.tests-list[_ngcontent-%COMP%], .runs-list[_ngcontent-%COMP%] { display: flex; flex-direction: column; gap: 12px; }\n.test-item[_ngcontent-%COMP%], .run-item[_ngcontent-%COMP%] { display: flex; align-items: center; gap: 12px; padding: 16px; background: white; border: 2px solid transparent; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; }\n.test-item[_ngcontent-%COMP%]:hover, .run-item[_ngcontent-%COMP%]:hover { background: #e3f2fd; border-color: #90caf9; }\n.test-sequence[_ngcontent-%COMP%] { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: #f0f0f0; border-radius: 50%; font-size: 14px; font-weight: 700; color: #666; flex-shrink: 0; }\n.test-icon[_ngcontent-%COMP%], .run-icon[_ngcontent-%COMP%] { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 8px; color: white; font-size: 18px; flex-shrink: 0; background: #2196f3; }\n.test-content[_ngcontent-%COMP%], .run-content[_ngcontent-%COMP%] { flex: 1; }\n.test-name[_ngcontent-%COMP%], .run-header[_ngcontent-%COMP%] { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 4px; }\n.test-status[_ngcontent-%COMP%], .run-meta[_ngcontent-%COMP%] { font-size: 12px; color: #666; }\n.run-meta[_ngcontent-%COMP%] { display: flex; gap: 12px; }\n.no-data[_ngcontent-%COMP%] { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: #999; text-align: center; background: white; border-radius: 12px; }\n.no-data[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] { font-size: 48px; margin-bottom: 16px; opacity: 0.3; }\n.no-data[_ngcontent-%COMP%]   p[_ngcontent-%COMP%] { margin: 0; font-size: 14px; }"], changeDetection: 0 }); }
};
TestSuiteFormComponentExtended = __decorate([
    RegisterClass(BaseFormComponent, 'MJ: Test Suites')
], TestSuiteFormComponentExtended);
export { TestSuiteFormComponentExtended };
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TestSuiteFormComponentExtended, [{
        type: Component,
        args: [{ selector: 'mj-test-suite-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"test-suite-form\" kendoDialogContainer>\n  <div class=\"suite-header\">\n    <div class=\"header-content\">\n      <div class=\"header-left\">\n        <div class=\"suite-icon\" [style.background-color]=\"getStatusColor()\">\n          <i class=\"fas fa-layer-group\"></i>\n        </div>\n        <div class=\"suite-info\">\n          <h1>{{ record.Name }}</h1>\n          <div class=\"suite-meta\">\n            <span class=\"status-badge\" [style.background-color]=\"getStatusColor()\">\n              {{ record.Status }}\n            </span>\n          </div>\n        </div>\n      </div>\n      <div class=\"header-actions\">\n        <button kendoButton (click)=\"runSuite()\" icon=\"play\">Run Suite</button>\n      </div>\n    </div>\n    <div class=\"suite-description\" *ngIf=\"record.Description\">\n      <p>{{ record.Description }}</p>\n    </div>\n  </div>\n\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> Overview\n      </button>\n      <button class=\"tab\" [class.active]=\"activeTab === 'tests'\" (click)=\"changeTab('tests')\">\n        <i class=\"fas fa-flask\"></i> Tests\n        <span class=\"tab-badge\" *ngIf=\"testsLoaded\">{{ suiteTests.length }}</span>\n      </button>\n      <button class=\"tab\" [class.active]=\"activeTab === 'runs'\" (click)=\"changeTab('runs')\">\n        <i class=\"fas fa-history\"></i> Runs\n        <span class=\"tab-badge\" *ngIf=\"runsLoaded\">{{ suiteRuns.length }}</span>\n      </button>\n    </div>\n  </div>\n\n  <div class=\"tab-content\">\n    <div class=\"overview-tab\" *ngIf=\"activeTab === 'overview'\">\n      <div class=\"info-section\">\n        <h3>Suite Information</h3>\n        <div class=\"info-grid\">\n          <div class=\"info-item\">\n            <div class=\"info-label\">Name</div>\n            <div class=\"info-value\">{{ record.Name }}</div>\n          </div>\n          <div class=\"info-item\">\n            <div class=\"info-label\">Status</div>\n            <div class=\"info-value\">{{ record.Status }}</div>\n          </div>\n          <div class=\"info-item\">\n            <div class=\"info-label\">Created</div>\n            <div class=\"info-value\">{{ record.__mj_CreatedAt | date:'medium' }}</div>\n          </div>\n          <div class=\"info-item\">\n            <div class=\"info-label\">Updated</div>\n            <div class=\"info-value\">{{ record.__mj_UpdatedAt | date:'medium' }}</div>\n          </div>\n        </div>\n      </div>\n    </div>\n\n    <div class=\"tests-tab\" *ngIf=\"activeTab === 'tests'\">\n      <div class=\"tests-list\" *ngIf=\"suiteTests.length > 0\">\n        <div class=\"test-item\" *ngFor=\"let test of suiteTests\" (click)=\"openTest(test.TestID)\">\n          <div class=\"test-sequence\">{{ test.Sequence }}</div>\n          <div class=\"test-icon\"><i class=\"fas fa-flask\"></i></div>\n          <div class=\"test-content\">\n            <div class=\"test-name\">{{ test.Test }}</div>\n            <div class=\"test-status\">{{ test.Status }}</div>\n          </div>\n          <i class=\"fas fa-chevron-right\"></i>\n        </div>\n      </div>\n      <div class=\"no-data\" *ngIf=\"testsLoaded && suiteTests.length === 0\">\n        <i class=\"fas fa-inbox\"></i>\n        <p>No tests in this suite</p>\n      </div>\n    </div>\n\n    <div class=\"runs-tab\" *ngIf=\"activeTab === 'runs'\">\n      <div class=\"runs-list\" *ngIf=\"suiteRuns.length > 0\">\n        <div class=\"run-item\" *ngFor=\"let run of suiteRuns\" (click)=\"openSuiteRun(run.ID)\">\n          <div class=\"run-icon\" [style.background-color]=\"run.Status === 'Completed' ? '#4caf50' : run.Status === 'Failed' ? '#f44336' : '#2196f3'\">\n            <i class=\"fas fa-play\"></i>\n          </div>\n          <div class=\"run-content\">\n            <div class=\"run-header\">\n              <span class=\"run-id\">{{ run.ID.substring(0, 8) }}</span>\n              <span class=\"run-status\">{{ run.Status }}</span>\n            </div>\n            <div class=\"run-meta\">\n              <span>{{ run.StartedAt | date:'short' }}</span>\n              <span *ngIf=\"run.TotalTests\">{{ run.PassedTests }}/{{ run.TotalTests }} passed</span>\n            </div>\n          </div>\n          <i class=\"fas fa-chevron-right\"></i>\n        </div>\n      </div>\n      <div class=\"no-data\" *ngIf=\"runsLoaded && suiteRuns.length === 0\">\n        <i class=\"fas fa-inbox\"></i>\n        <p>No runs for this suite</p>\n      </div>\n    </div>\n  </div>\n</div>\n", styles: [".test-suite-form { display: flex; flex-direction: column; height: 100%; background: #f8f9fa; }\n.suite-header { background: white; border-bottom: 1px solid #e0e0e0; padding: 20px; }\n.header-content { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }\n.header-left { display: flex; gap: 16px; }\n.suite-icon { width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; font-size: 24px; }\n.suite-info h1 { margin: 0 0 8px 0; font-size: 24px; font-weight: 600; color: #333; }\n.suite-meta { display: flex; align-items: center; gap: 12px; }\n.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 12px; color: white; font-size: 12px; font-weight: 600; }\n.suite-description { padding: 16px; background: #f8f9fa; border-radius: 8px; }\n.suite-description p { margin: 0; color: #666; line-height: 1.5; }\n.tabs-container { background: white; border-bottom: 1px solid #e0e0e0; }\n.tabs { display: flex; padding: 0 20px; overflow-x: auto; }\n.tab { display: flex; align-items: center; gap: 8px; padding: 16px 20px; border: none; background: transparent; border-bottom: 3px solid transparent; color: #666; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s ease; }\n.tab:hover { color: #2196f3; background: rgba(33, 150, 243, 0.05); }\n.tab.active { color: #2196f3; border-bottom-color: #2196f3; }\n.tab-badge { background: #e0e0e0; color: #666; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }\n.tab.active .tab-badge { background: #e3f2fd; color: #2196f3; }\n.tab-content { flex: 1; overflow-y: auto; padding: 20px; }\n.info-section { background: white; border-radius: 12px; padding: 20px; }\n.info-section h3 { margin: 0 0 16px 0; font-size: 18px; font-weight: 600; color: #333; }\n.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }\n.info-item { display: flex; flex-direction: column; gap: 4px; }\n.info-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #999; }\n.info-value { font-size: 14px; color: #333; word-wrap: break-word; }\n.tests-list, .runs-list { display: flex; flex-direction: column; gap: 12px; }\n.test-item, .run-item { display: flex; align-items: center; gap: 12px; padding: 16px; background: white; border: 2px solid transparent; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; }\n.test-item:hover, .run-item:hover { background: #e3f2fd; border-color: #90caf9; }\n.test-sequence { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: #f0f0f0; border-radius: 50%; font-size: 14px; font-weight: 700; color: #666; flex-shrink: 0; }\n.test-icon, .run-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 8px; color: white; font-size: 18px; flex-shrink: 0; background: #2196f3; }\n.test-content, .run-content { flex: 1; }\n.test-name, .run-header { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 4px; }\n.test-status, .run-meta { font-size: 12px; color: #666; }\n.run-meta { display: flex; gap: 12px; }\n.no-data { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: #999; text-align: center; background: white; border-radius: 12px; }\n.no-data i { font-size: 48px; margin-bottom: 16px; opacity: 0.3; }\n.no-data p { margin: 0; font-size: 14px; }\n"] }]
    }], () => [{ type: i0.ElementRef }, { type: i1.SharedService }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i0.ChangeDetectorRef }, { type: i3.TestingDialogService }], null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TestSuiteFormComponentExtended, { className: "TestSuiteFormComponentExtended", filePath: "src/lib/custom/Tests/test-suite-form.component.ts", lineNumber: 19 }); })();
export function LoadTestSuiteFormComponentExtended() { }
LoadTestSuiteFormComponentExtended();
//# sourceMappingURL=test-suite-form.component.js.map