import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
import { BehaviorSubject, Subject, combineLatest } from 'rxjs';
import { debounceTime, distinctUntilChanged, takeUntil } from 'rxjs/operators';
import { CompositeKey } from '@memberjunction/core';
import { UserInfoEngine } from '@memberjunction/core-entities';
import { SharedService } from '@memberjunction/ng-shared';
import * as i0 from "@angular/core";
import * as i1 from "../services/scheduling-instrumentation.service";
import * as i2 from "@angular/common";
import * as i3 from "@memberjunction/ng-ui-components";
import * as i4 from "@memberjunction/ng-shared-generic";
import * as i5 from "@memberjunction/ng-scheduling";
function SchedulingJobsComponent_Conditional_0_ng_container_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
function SchedulingJobsComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, SchedulingJobsComponent_Conditional_0_ng_container_0_Template, 1, 0, "ng-container", 1);
} if (rf & 2) {
    i0.ɵɵnextContext();
    const content_r1 = i0.ɵɵreference(3);
    i0.ɵɵproperty("ngTemplateOutlet", content_r1);
} }
function SchedulingJobsComponent_Conditional_1_ng_container_15_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
function SchedulingJobsComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
    const _r2 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "mj-page-layout")(1, "mj-page-header", 2)(2, "div", 3);
    i0.ɵɵelement(3, "mj-stat-badge", 4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "div", 5)(5, "mj-refresh-button", 6);
    i0.ɵɵlistener("Clicked", function SchedulingJobsComponent_Conditional_1_Template_mj_refresh_button_Clicked_5_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.Refresh()); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "button", 7);
    i0.ɵɵlistener("click", function SchedulingJobsComponent_Conditional_1_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.OpenCreateSlideout()); });
    i0.ɵɵelement(7, "i", 8);
    i0.ɵɵelementStart(8, "span", 9);
    i0.ɵɵtext(9, "New Job");
    i0.ɵɵelementEnd()()();
    i0.ɵɵelementStart(10, "div", 10)(11, "mj-page-search", 11);
    i0.ɵɵlistener("ValueChange", function SchedulingJobsComponent_Conditional_1_Template_mj_page_search_ValueChange_11_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.OnSearchChange($event)); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(12, "mj-filter-popover", 12);
    i0.ɵɵlistener("ClearAllRequested", function SchedulingJobsComponent_Conditional_1_Template_mj_filter_popover_ClearAllRequested_12_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.ResetFilters()); });
    i0.ɵɵelementStart(13, "mj-filter-panel", 13);
    i0.ɵɵlistener("ValuesChange", function SchedulingJobsComponent_Conditional_1_Template_mj_filter_panel_ValuesChange_13_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.OnFilterValuesChange($event)); })("Reset", function SchedulingJobsComponent_Conditional_1_Template_mj_filter_panel_Reset_13_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.ResetFilters()); });
    i0.ɵɵelementEnd()()()();
    i0.ɵɵelementStart(14, "mj-page-body");
    i0.ɵɵtemplate(15, SchedulingJobsComponent_Conditional_1_ng_container_15_Template, 1, 0, "ng-container", 1);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    const content_r1 = i0.ɵɵreference(3);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("Count", ctx_r2.FilteredJobs.length)("Total", ctx_r2.Jobs.length);
    i0.ɵɵadvance(8);
    i0.ɵɵproperty("Value", ctx_r2.SearchTerm);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ActiveCount", ctx_r2.ActiveFilterCount)("ShowClearAll", ctx_r2.ActiveFilterCount > 0);
    i0.ɵɵadvance();
    i0.ɵɵproperty("Fields", ctx_r2.JobsFilterFields)("Values", ctx_r2.JobsFilterValues);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngTemplateOutlet", content_r1);
} }
function SchedulingJobsComponent_ng_template_2_Conditional_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 15);
    i0.ɵɵelement(1, "mj-loading", 19);
    i0.ɵɵelementEnd();
} }
function SchedulingJobsComponent_ng_template_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "mj-empty-state", 20);
    i0.ɵɵlistener("Action", function SchedulingJobsComponent_ng_template_2_Conditional_2_Template_mj_empty_state_Action_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.OnEmptyStateAction()); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("Variant", ctx_r2.IsListNarrowed ? "no-results" : "empty")("Message", ctx_r2.IsListNarrowed ? "No jobs match your search and filters." : "Create your first scheduled job to get started.")("ActionText", ctx_r2.IsListNarrowed ? "Reset filters" : "Create Job")("ActionIcon", ctx_r2.IsListNarrowed ? "fa-solid fa-rotate-left" : "fa-solid fa-plus");
} }
function SchedulingJobsComponent_ng_template_2_Conditional_3_For_2_Conditional_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 29);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const job_r7 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(job_r7.description);
} }
function SchedulingJobsComponent_ng_template_2_Conditional_3_For_2_Conditional_48_Conditional_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 60);
    i0.ɵɵtext(1, " Deleting... ");
} }
function SchedulingJobsComponent_ng_template_2_Conditional_3_For_2_Conditional_48_Conditional_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtext(0, " Delete ");
} }
function SchedulingJobsComponent_ng_template_2_Conditional_3_For_2_Conditional_48_Template(rf, ctx) { if (rf & 1) {
    const _r8 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 53);
    i0.ɵɵlistener("click", function SchedulingJobsComponent_ng_template_2_Conditional_3_For_2_Conditional_48_Template_div_click_0_listener($event) { i0.ɵɵrestoreView(_r8); return i0.ɵɵresetView($event.stopPropagation()); });
    i0.ɵɵelementStart(1, "div", 54);
    i0.ɵɵelement(2, "i", 55);
    i0.ɵɵelementStart(3, "span", 56);
    i0.ɵɵtext(4, "Delete this scheduled job?");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "div", 57)(6, "button", 58);
    i0.ɵɵlistener("click", function SchedulingJobsComponent_ng_template_2_Conditional_3_For_2_Conditional_48_Template_button_click_6_listener($event) { i0.ɵɵrestoreView(_r8); const job_r7 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.ConfirmDelete(job_r7.jobId, $event)); });
    i0.ɵɵconditionalCreate(7, SchedulingJobsComponent_ng_template_2_Conditional_3_For_2_Conditional_48_Conditional_7_Template, 2, 0)(8, SchedulingJobsComponent_ng_template_2_Conditional_3_For_2_Conditional_48_Conditional_8_Template, 1, 0);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(9, "button", 59);
    i0.ɵɵlistener("click", function SchedulingJobsComponent_ng_template_2_Conditional_3_For_2_Conditional_48_Template_button_click_9_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r2 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r2.CancelDelete($event)); });
    i0.ɵɵtext(10, "Cancel");
    i0.ɵɵelementEnd()()()();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext(4);
    i0.ɵɵadvance(6);
    i0.ɵɵproperty("disabled", ctx_r2.IsDeleting);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r2.IsDeleting ? 7 : 8);
} }
function SchedulingJobsComponent_ng_template_2_Conditional_3_For_2_Template(rf, ctx) { if (rf & 1) {
    const _r6 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 22);
    i0.ɵɵlistener("click", function SchedulingJobsComponent_ng_template_2_Conditional_3_For_2_Template_div_click_0_listener() { const job_r7 = i0.ɵɵrestoreView(_r6).$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.OpenEditSlideout(job_r7)); });
    i0.ɵɵelementStart(1, "div", 23)(2, "div", 24);
    i0.ɵɵelement(3, "i", 25);
    i0.ɵɵelementStart(4, "span", 26);
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(6, "span", 27);
    i0.ɵɵtext(7);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(8, "div", 28);
    i0.ɵɵconditionalCreate(9, SchedulingJobsComponent_ng_template_2_Conditional_3_For_2_Conditional_9_Template, 2, 1, "div", 29);
    i0.ɵɵelementStart(10, "div", 30)(11, "div", 31)(12, "span", 32);
    i0.ɵɵtext(13, "Type");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(14, "span", 33);
    i0.ɵɵtext(15);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(16, "div", 31)(17, "span", 32);
    i0.ɵɵtext(18, "Schedule");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(19, "span", 34);
    i0.ɵɵtext(20);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(21, "div", 31)(22, "span", 32);
    i0.ɵɵtext(23, "Last Run");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(24, "span", 33);
    i0.ɵɵtext(25);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(26, "div", 31)(27, "span", 32);
    i0.ɵɵtext(28, "Next Run");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(29, "span", 33);
    i0.ɵɵtext(30);
    i0.ɵɵelementEnd()()();
    i0.ɵɵelementStart(31, "div", 35)(32, "div", 36)(33, "span", 37);
    i0.ɵɵtext(34, "Success Rate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(35, "span", 38);
    i0.ɵɵtext(36);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(37, "div", 39);
    i0.ɵɵelement(38, "div", 40);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(39, "div", 41)(40, "span", 42);
    i0.ɵɵelement(41, "i", 43);
    i0.ɵɵtext(42);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(43, "span", 44);
    i0.ɵɵelement(44, "i", 45);
    i0.ɵɵtext(45);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(46, "span", 46);
    i0.ɵɵtext(47);
    i0.ɵɵelementEnd()()()();
    i0.ɵɵconditionalCreate(48, SchedulingJobsComponent_ng_template_2_Conditional_3_For_2_Conditional_48_Template, 11, 2, "div", 47);
    i0.ɵɵelementStart(49, "div", 48)(50, "button", 49);
    i0.ɵɵlistener("click", function SchedulingJobsComponent_ng_template_2_Conditional_3_For_2_Template_button_click_50_listener($event) { const job_r7 = i0.ɵɵrestoreView(_r6).$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.ToggleJobStatus(job_r7, $event)); });
    i0.ɵɵelement(51, "i");
    i0.ɵɵtext(52);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(53, "button", 49);
    i0.ɵɵlistener("click", function SchedulingJobsComponent_ng_template_2_Conditional_3_For_2_Template_button_click_53_listener($event) { const job_r7 = i0.ɵɵrestoreView(_r6).$implicit; const ctx_r2 = i0.ɵɵnextContext(3); ctx_r2.OpenEntityRecord(job_r7); return i0.ɵɵresetView($event.stopPropagation()); });
    i0.ɵɵelement(54, "i", 50);
    i0.ɵɵtext(55, " Full Details ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(56, "button", 51);
    i0.ɵɵlistener("click", function SchedulingJobsComponent_ng_template_2_Conditional_3_For_2_Template_button_click_56_listener($event) { const job_r7 = i0.ɵɵrestoreView(_r6).$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.ShowDeleteConfirm(job_r7, $event)); });
    i0.ɵɵelement(57, "i", 52);
    i0.ɵɵtext(58, " Delete ");
    i0.ɵɵelementEnd()()();
} if (rf & 2) {
    const job_r7 = ctx.$implicit;
    const ctx_r2 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance(3);
    i0.ɵɵclassMap(ctx_r2.GetTypeIcon(job_r7.jobType));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(job_r7.jobName);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngClass", ctx_r2.GetStatusClass(job_r7.status));
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(job_r7.status);
    i0.ɵɵadvance(2);
    i0.ɵɵconditional(job_r7.description ? 9 : -1);
    i0.ɵɵadvance(6);
    i0.ɵɵtextInterpolate(job_r7.jobType);
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(job_r7.cronExpression);
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r2.FormatDate(job_r7.lastRunAt));
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(ctx_r2.FormatDate(job_r7.nextRunAt));
    i0.ɵɵadvance(5);
    i0.ɵɵstyleProp("color", ctx_r2.GetSuccessRateColor(job_r7.successRate));
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", ctx_r2.FormatPercentage(job_r7.successRate), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵstyleProp("width", job_r7.successRate * 100 + "%")("background", ctx_r2.GetSuccessRateColor(job_r7.successRate));
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate1(" ", job_r7.successCount);
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", job_r7.failureCount);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1("", job_r7.totalRuns, " total");
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r2.IsDeleteConfirming(job_r7.jobId) ? 48 : -1);
    i0.ɵɵadvance(3);
    i0.ɵɵclassMap(job_r7.status === "Active" ? "fa-solid fa-pause" : "fa-solid fa-play");
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", job_r7.status === "Active" ? "Pause" : "Resume", " ");
} }
function SchedulingJobsComponent_ng_template_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 17);
    i0.ɵɵrepeaterCreate(1, SchedulingJobsComponent_ng_template_2_Conditional_3_For_2_Template, 59, 24, "div", 21, i0.ɵɵrepeaterTrackByIdentity);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵrepeater(ctx_r2.FilteredJobs);
} }
function SchedulingJobsComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
    const _r4 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 14);
    i0.ɵɵconditionalCreate(1, SchedulingJobsComponent_ng_template_2_Conditional_1_Template, 2, 0, "div", 15);
    i0.ɵɵconditionalCreate(2, SchedulingJobsComponent_ng_template_2_Conditional_2_Template, 1, 4, "mj-empty-state", 16);
    i0.ɵɵconditionalCreate(3, SchedulingJobsComponent_ng_template_2_Conditional_3_Template, 3, 0, "div", 17);
    i0.ɵɵelementStart(4, "mj-scheduled-job-slide-panel", 18);
    i0.ɵɵlistener("Close", function SchedulingJobsComponent_ng_template_2_Template_mj_scheduled_job_slide_panel_Close_4_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.CloseSlideout()); })("Saved", function SchedulingJobsComponent_ng_template_2_Template_mj_scheduled_job_slide_panel_Saved_4_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.OnSlideoutSaved()); })("Deleted", function SchedulingJobsComponent_ng_template_2_Template_mj_scheduled_job_slide_panel_Deleted_4_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.OnSlideoutSaved()); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r2.IsLoading ? 1 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(!ctx_r2.IsLoading && ctx_r2.FilteredJobs.length === 0 ? 2 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(!ctx_r2.IsLoading && ctx_r2.FilteredJobs.length > 0 ? 3 : -1);
    i0.ɵɵadvance();
    i0.ɵɵproperty("IsOpen", ctx_r2.SlideoutOpen)("ScheduledJobID", (ctx_r2.SelectedJob == null ? null : ctx_r2.SelectedJob.jobId) ?? null);
} }
export class SchedulingJobsComponent {
    schedulingService;
    cdr;
    initialState = {};
    /** When true, the inner toolbar is hidden — the parent shell is rendering it in `<mj-page-header>` instead. */
    HideToolbar = false;
    stateChange = new EventEmitter();
    Jobs = [];
    FilteredJobs = [];
    JobTypes = [];
    IsLoading = true;
    // Slideout state
    SlideoutOpen = false;
    SelectedJob = null;
    // Delete confirmation state
    DeleteConfirmJobId = null;
    IsDeleting = false;
    // Filters
    SearchTerm = '';
    StatusFilter = '';
    TypeFilter = '';
    StatusOptions = ['', 'Active', 'Paused', 'Disabled', 'Pending', 'Expired'];
    TypeOptions = [''];
    // Settings keys
    static SEARCH_STATE_KEY = 'Scheduling.JobsSearchState';
    searchSubject = new BehaviorSubject('');
    statusSubject = new BehaviorSubject('');
    typeSubject = new BehaviorSubject('');
    settingsPersistSubject = new Subject();
    destroy$ = new Subject();
    subscriptions = [];
    settingsLoaded = false;
    constructor(schedulingService, cdr) {
        this.schedulingService = schedulingService;
        this.cdr = cdr;
    }
    ngOnInit() {
        this.loadUserSettings();
        this.restoreState();
        this.setupFilters();
        this.setupSettingsPersistence();
        this.subscriptions.push(this.schedulingService.jobStatistics$.subscribe(jobs => {
            this.Jobs = jobs;
            this.IsLoading = false;
            this.updateTypeOptions();
            this.applyFilters();
            this.cdr.markForCheck();
        }), this.schedulingService.jobTypes$.subscribe(types => {
            this.JobTypes = types;
            this.cdr.markForCheck();
        }));
    }
    ngOnDestroy() {
        this.destroy$.next();
        this.destroy$.complete();
        this.subscriptions.forEach(s => s.unsubscribe());
    }
    loadUserSettings() {
        try {
            const stateStr = UserInfoEngine.Instance.GetSetting(SchedulingJobsComponent.SEARCH_STATE_KEY);
            if (stateStr) {
                const state = JSON.parse(stateStr);
                if (state.searchTerm)
                    this.SearchTerm = state.searchTerm;
                if (state.statusFilter)
                    this.StatusFilter = state.statusFilter;
                if (state.typeFilter)
                    this.TypeFilter = state.typeFilter;
            }
        }
        catch (error) {
            console.warn('[SchedulingJobs] Failed to load user settings:', error);
        }
        finally {
            this.settingsLoaded = true;
        }
    }
    setupSettingsPersistence() {
        this.settingsPersistSubject.pipe(debounceTime(500), takeUntil(this.destroy$)).subscribe(() => {
            this.persistSearchState();
        });
    }
    persistSearchState() {
        if (!this.settingsLoaded)
            return;
        try {
            const state = {
                searchTerm: this.SearchTerm,
                statusFilter: this.StatusFilter,
                typeFilter: this.TypeFilter
            };
            UserInfoEngine.Instance.SetSettingDebounced(SchedulingJobsComponent.SEARCH_STATE_KEY, JSON.stringify(state));
        }
        catch (error) {
            console.warn('[SchedulingJobs] Failed to persist search state:', error);
        }
    }
    restoreState() {
        if (this.initialState) {
            if (this.initialState['searchTerm'])
                this.SearchTerm = this.initialState['searchTerm'];
            if (this.initialState['statusFilter'])
                this.StatusFilter = this.initialState['statusFilter'];
            if (this.initialState['typeFilter'])
                this.TypeFilter = this.initialState['typeFilter'];
        }
    }
    setupFilters() {
        this.subscriptions.push(combineLatest([
            this.searchSubject.pipe(debounceTime(300), distinctUntilChanged()),
            this.statusSubject.pipe(distinctUntilChanged()),
            this.typeSubject.pipe(distinctUntilChanged())
        ]).subscribe(() => {
            this.applyFilters();
            this.emitState();
            this.cdr.markForCheck();
        }));
        this.searchSubject.next(this.SearchTerm);
        this.statusSubject.next(this.StatusFilter);
        this.typeSubject.next(this.TypeFilter);
    }
    OnSearchChange(term) {
        this.SearchTerm = term;
        this.searchSubject.next(term);
    }
    OnStatusFilterChange(status) {
        this.StatusFilter = status;
        this.statusSubject.next(status);
    }
    OnTypeFilterChange(type) {
        this.TypeFilter = type;
        this.typeSubject.next(type);
    }
    get JobsFilterFields() {
        const statusOptions = this.StatusOptions.map(s => ({
            text: s === '' ? 'All Statuses' : s,
            value: s
        }));
        const typeOptions = this.TypeOptions.map(t => ({
            text: t === '' ? 'All Types' : t,
            value: t
        }));
        return [
            {
                key: 'statusFilter',
                type: 'dropdown',
                label: 'Status',
                icon: 'fa-solid fa-circle-info',
                placeholder: 'All Statuses',
                options: statusOptions
            },
            {
                key: 'typeFilter',
                type: 'dropdown',
                label: 'Type',
                icon: 'fa-solid fa-shapes',
                placeholder: 'All Types',
                options: typeOptions
            }
        ];
    }
    get JobsFilterValues() {
        return {
            statusFilter: this.StatusFilter,
            typeFilter: this.TypeFilter
        };
    }
    get ActiveFilterCount() {
        let count = 0;
        if (this.StatusFilter)
            count++;
        if (this.TypeFilter)
            count++;
        return count;
    }
    OnFilterValuesChange(values) {
        const next = (values ?? {});
        if ((next.statusFilter ?? '') !== this.StatusFilter) {
            this.OnStatusFilterChange(next.statusFilter ?? '');
        }
        if ((next.typeFilter ?? '') !== this.TypeFilter) {
            this.OnTypeFilterChange(next.typeFilter ?? '');
        }
    }
    ResetFilters() {
        if (this.StatusFilter)
            this.OnStatusFilterChange('');
        if (this.TypeFilter)
            this.OnTypeFilterChange('');
    }
    /** True when search and/or filters narrow the job list. */
    get IsListNarrowed() {
        return this.SearchTerm !== '' || this.ActiveFilterCount > 0;
    }
    /** Reset search + all filters (used by the no-results empty-state CTA). */
    ResetAllFiltersAndSearch() {
        if (this.SearchTerm)
            this.OnSearchChange('');
        this.ResetFilters();
    }
    /** Empty-state primary CTA: reset when narrowed, otherwise create a job. */
    OnEmptyStateAction() {
        if (this.IsListNarrowed) {
            this.ResetAllFiltersAndSearch();
        }
        else {
            this.OpenCreateSlideout();
        }
    }
    Refresh() {
        this.schedulingService.refresh();
    }
    OpenCreateSlideout() {
        this.SelectedJob = null;
        this.SlideoutOpen = true;
        this.cdr.markForCheck();
    }
    OpenEditSlideout(job) {
        this.SelectedJob = job;
        this.SlideoutOpen = true;
        this.cdr.markForCheck();
    }
    CloseSlideout() {
        this.SlideoutOpen = false;
        this.SelectedJob = null;
        this.cdr.markForCheck();
    }
    OnSlideoutSaved() {
        this.CloseSlideout();
        this.schedulingService.refresh();
    }
    async ToggleJobStatus(job, event) {
        event.stopPropagation();
        const newStatus = job.status === 'Active' ? 'Paused' : 'Active';
        await this.schedulingService.updateJobStatus(job.jobId, newStatus);
    }
    ShowDeleteConfirm(job, event) {
        event.stopPropagation();
        this.DeleteConfirmJobId = job.jobId;
        this.cdr.markForCheck();
    }
    CancelDelete(event) {
        event.stopPropagation();
        this.DeleteConfirmJobId = null;
        this.cdr.markForCheck();
    }
    async ConfirmDelete(jobId, event) {
        event.stopPropagation();
        this.IsDeleting = true;
        this.cdr.markForCheck();
        try {
            const result = await this.schedulingService.deleteJob(jobId);
            if (result) {
                this.DeleteConfirmJobId = null;
            }
        }
        catch (err) {
            console.error('[SchedulingJobs] Delete error:', err);
        }
        finally {
            this.IsDeleting = false;
            this.cdr.markForCheck();
        }
    }
    IsDeleteConfirming(jobId) {
        return this.DeleteConfirmJobId === jobId;
    }
    OpenEntityRecord(job) {
        const compositeKey = new CompositeKey();
        compositeKey.LoadFromSingleKeyValuePair('ID', job.jobId);
        SharedService.Instance.OpenEntityRecord('MJ: Scheduled Jobs', compositeKey);
    }
    GetStatusClass(status) {
        switch (status) {
            case 'Active': return 'status-active';
            case 'Paused': return 'status-paused';
            case 'Disabled': return 'status-disabled';
            case 'Pending': return 'status-pending';
            case 'Expired': return 'status-expired';
            default: return '';
        }
    }
    GetSuccessRateColor(rate) {
        if (rate >= 0.9)
            return '#10b981';
        if (rate >= 0.7)
            return '#f59e0b';
        return '#ef4444';
    }
    GetTypeIcon(typeName) {
        const lower = typeName.toLowerCase();
        if (lower.includes('agent'))
            return 'fa-solid fa-robot';
        if (lower.includes('action'))
            return 'fa-solid fa-bolt';
        return 'fa-solid fa-gear';
    }
    FormatDate(date) {
        if (!date)
            return '-';
        return date.toLocaleString(undefined, {
            month: 'numeric', day: 'numeric', year: '2-digit',
            hour: 'numeric', minute: '2-digit', hour12: true
        });
    }
    FormatPercentage(value) {
        return `${(value * 100).toFixed(1)}%`;
    }
    applyFilters() {
        let filtered = [...this.Jobs];
        if (this.SearchTerm) {
            const term = this.SearchTerm.toLowerCase();
            filtered = filtered.filter(j => j.jobName.toLowerCase().includes(term) ||
                j.jobType.toLowerCase().includes(term) ||
                (j.description && j.description.toLowerCase().includes(term)));
        }
        if (this.StatusFilter) {
            filtered = filtered.filter(j => j.status === this.StatusFilter);
        }
        if (this.TypeFilter) {
            filtered = filtered.filter(j => j.jobType === this.TypeFilter);
        }
        this.FilteredJobs = filtered;
    }
    updateTypeOptions() {
        const types = new Set(this.Jobs.map(j => j.jobType));
        this.TypeOptions = ['', ...Array.from(types).sort()];
    }
    emitState() {
        this.stateChange.emit({
            searchTerm: this.SearchTerm,
            statusFilter: this.StatusFilter,
            typeFilter: this.TypeFilter
        });
        this.settingsPersistSubject.next();
    }
    static ɵfac = function SchedulingJobsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SchedulingJobsComponent)(i0.ɵɵdirectiveInject(i1.SchedulingInstrumentationService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
    static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SchedulingJobsComponent, selectors: [["app-scheduling-jobs"]], inputs: { initialState: "initialState", HideToolbar: "HideToolbar" }, outputs: { stateChange: "stateChange" }, standalone: false, decls: 4, vars: 1, consts: [["content", ""], [4, "ngTemplateOutlet"], ["Title", "Scheduled Jobs", "Icon", "fa-solid fa-calendar-check", "Subtitle", "Configure and manage scheduled jobs"], ["meta", ""], ["Label", "jobs", 3, "Count", "Total"], ["actions", ""], [3, "Clicked"], ["mjButton", "", "variant", "primary", "size", "sm", 3, "click"], [1, "fa-solid", "fa-plus"], [1, "action-btn-label"], ["toolbar", ""], ["Placeholder", "Search jobs...", 3, "ValueChange", "Value"], [3, "ClearAllRequested", "ActiveCount", "ShowClearAll"], [3, "ValuesChange", "Reset", "Fields", "Values"], [1, "jobs-container"], [1, "loading-container"], ["Icon", "fa-solid fa-calendar-xmark", "Title", "No jobs found", 3, "Variant", "Message", "ActionText", "ActionIcon"], [1, "jobs-grid"], [3, "Close", "Saved", "Deleted", "IsOpen", "ScheduledJobID"], ["text", "Loading jobs...", "size", "medium"], ["Icon", "fa-solid fa-calendar-xmark", "Title", "No jobs found", 3, "Action", "Variant", "Message", "ActionText", "ActionIcon"], [1, "job-card"], [1, "job-card", 3, "click"], [1, "job-card-header"], [1, "job-card-title"], [1, "type-icon"], [1, "job-name"], [1, "status-chip", 3, "ngClass"], [1, "job-card-body"], [1, "job-description"], [1, "job-meta-grid"], [1, "meta-item"], [1, "meta-label"], [1, "meta-value"], [1, "meta-value", "mono"], [1, "success-section"], [1, "success-header"], [1, "success-label"], [1, "success-value"], [1, "success-bar-track"], [1, "success-bar-fill"], [1, "run-stats"], [1, "stat-success"], [1, "fa-solid", "fa-check"], [1, "stat-failure"], [1, "fa-solid", "fa-xmark"], [1, "stat-total"], [1, "delete-confirm-overlay"], [1, "job-card-footer"], ["mjButton", "", "variant", "flat", "size", "sm", 3, "click"], [1, "fa-solid", "fa-up-right-from-square"], ["mjButton", "", "variant", "danger", "size", "sm", 3, "click"], [1, "fa-solid", "fa-trash-can"], [1, "delete-confirm-overlay", 3, "click"], [1, "delete-confirm-content"], [1, "fa-solid", "fa-triangle-exclamation", "delete-warn-icon"], [1, "delete-confirm-text"], [1, "delete-confirm-actions"], [1, "delete-confirm-btn", 3, "click", "disabled"], [1, "delete-cancel-btn", 3, "click"], [1, "fa-solid", "fa-spinner", "fa-spin"]], template: function SchedulingJobsComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵconditionalCreate(0, SchedulingJobsComponent_Conditional_0_Template, 1, 1, "ng-container")(1, SchedulingJobsComponent_Conditional_1_Template, 16, 8, "mj-page-layout");
            i0.ɵɵtemplate(2, SchedulingJobsComponent_ng_template_2_Template, 5, 5, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
        } if (rf & 2) {
            i0.ɵɵconditional(ctx.HideToolbar ? 0 : 1);
        } }, dependencies: [i2.NgClass, i2.NgTemplateOutlet, i3.MJButtonDirective, i3.MJPageHeaderComponent, i3.MJPageLayoutComponent, i3.MJPageBodyComponent, i3.MJPageSearchComponent, i3.MJFilterPopoverComponent, i3.MJFilterPanelComponent, i3.MJStatBadgeComponent, i3.MJRefreshButtonComponent, i3.MJEmptyStateComponent, i4.LoadingComponent, i5.ScheduledJobSlidePanelComponent], styles: [".jobs-container[_ngcontent-%COMP%] {\n    display: flex;\n    flex-direction: column;\n    gap: 20px;\n    position: relative;\n}\n\n\n\n.jobs-toolbar[_ngcontent-%COMP%] {\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    flex-wrap: wrap;\n    gap: 12px;\n}\n\n.toolbar-left[_ngcontent-%COMP%] {\n    display: flex;\n    gap: 8px;\n    align-items: center;\n    flex-wrap: wrap;\n}\n\n.toolbar-right[_ngcontent-%COMP%] {\n    display: flex;\n    gap: 8px;\n    align-items: center;\n}\n\n.search-box[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n    padding: 8px 14px;\n    background: var(--mj-bg-surface-card);\n    border: 1px solid var(--mj-border-default);\n    border-radius: 10px;\n    min-width: 240px;\n    transition: border-color 0.2s;\n}\n\n.search-box[_ngcontent-%COMP%]:focus-within {\n    border-color: var(--mj-brand-primary);\n    box-shadow: var(--mj-shadow-sm);\n}\n\n.search-box[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n    color: var(--mj-text-muted);\n    font-size: 0.85rem;\n}\n\n.search-box[_ngcontent-%COMP%]   input[_ngcontent-%COMP%] {\n    border: none;\n    outline: none;\n    background: transparent;\n    font-size: 0.85rem;\n    color: var(--mj-text-primary);\n    width: 100%;\n}\n\n.filter-select[_ngcontent-%COMP%] {\n    padding: 8px 14px;\n    background: var(--mj-bg-surface-card);\n    border: 1px solid var(--mj-border-default);\n    border-radius: 10px;\n    font-size: 0.85rem;\n    color: var(--mj-text-secondary);\n    cursor: pointer;\n    outline: none;\n    transition: border-color 0.2s;\n}\n\n.filter-select[_ngcontent-%COMP%]:focus {\n    border-color: var(--mj-brand-primary);\n}\n\n.result-count[_ngcontent-%COMP%] {\n    font-size: 0.8rem;\n    color: var(--mj-text-muted);\n    white-space: nowrap;\n}\n\n.control-btn[_ngcontent-%COMP%] {\n    display: inline-flex;\n    align-items: center;\n    gap: 6px;\n    padding: 8px 16px;\n    background: var(--mj-bg-surface-card);\n    border: 1px solid var(--mj-border-default);\n    border-radius: 10px;\n    cursor: pointer;\n    font-size: 0.8rem;\n    font-weight: 500;\n    color: var(--mj-text-secondary);\n    transition: all 0.2s ease;\n}\n\n.control-btn[_ngcontent-%COMP%]:hover {\n    background: var(--mj-bg-surface-sunken);\n    border-color: var(--mj-border-strong);\n}\n\n\n\n.loading-container[_ngcontent-%COMP%] {\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    min-height: 300px;\n}\n\n\n\n.jobs-grid[_ngcontent-%COMP%] {\n    display: grid;\n    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));\n    gap: 16px;\n}\n\n.job-card[_ngcontent-%COMP%] {\n    position: relative;\n    background: var(--mj-bg-surface-card);\n    border-radius: 16px;\n    border: 1px solid var(--mj-border-default);\n    box-shadow: var(--mj-shadow-sm);\n    cursor: pointer;\n    transition: all 0.2s ease;\n    display: flex;\n    flex-direction: column;\n    overflow: hidden;\n}\n\n.job-card[_ngcontent-%COMP%]:hover {\n    transform: translateY(-2px);\n    box-shadow: var(--mj-shadow-lg);\n    border-color: var(--mj-brand-primary);\n}\n\n\n\n.job-card-header[_ngcontent-%COMP%] {\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    padding: 16px 20px;\n    border-bottom: 1px solid var(--mj-bg-surface-sunken);\n}\n\n.job-card-title[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 10px;\n    flex: 1;\n    min-width: 0;\n}\n\n.type-icon[_ngcontent-%COMP%] {\n    color: var(--mj-brand-primary);\n    font-size: 1rem;\n    flex-shrink: 0;\n}\n\n.job-name[_ngcontent-%COMP%] {\n    font-weight: 700;\n    color: var(--mj-text-primary);\n    font-size: 0.9rem;\n    display: -webkit-box;\n    -webkit-line-clamp: 2;\n    -webkit-box-orient: vertical;\n    overflow: hidden;\n    line-height: 1.3;\n}\n\n.status-chip[_ngcontent-%COMP%] {\n    font-size: 0.7rem;\n    font-weight: 700;\n    padding: 3px 10px;\n    border-radius: 12px;\n    flex-shrink: 0;\n    margin-left: 8px;\n}\n\n.status-active[_ngcontent-%COMP%] { background: color-mix(in srgb, var(--mj-status-success) 15%, var(--mj-bg-surface)); color: var(--mj-status-success); }\n.status-paused[_ngcontent-%COMP%] { background: color-mix(in srgb, var(--mj-status-warning) 15%, var(--mj-bg-surface)); color: var(--mj-status-warning); }\n.status-disabled[_ngcontent-%COMP%] { background: var(--mj-bg-surface-sunken); color: var(--mj-text-secondary); }\n.status-pending[_ngcontent-%COMP%] { background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface)); color: var(--mj-brand-primary); }\n.status-expired[_ngcontent-%COMP%] { background: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface)); color: var(--mj-status-error); }\n\n\n\n.job-card-body[_ngcontent-%COMP%] {\n    padding: 16px 20px;\n    flex: 1;\n}\n\n.job-description[_ngcontent-%COMP%] {\n    font-size: 0.8rem;\n    color: var(--mj-text-secondary);\n    margin-bottom: 12px;\n    display: -webkit-box;\n    -webkit-line-clamp: 2;\n    -webkit-box-orient: vertical;\n    overflow: hidden;\n    line-height: 1.4;\n}\n\n.job-meta-grid[_ngcontent-%COMP%] {\n    display: grid;\n    grid-template-columns: 1fr 1fr;\n    gap: 8px;\n    margin-bottom: 16px;\n}\n\n.meta-item[_ngcontent-%COMP%] {\n    display: flex;\n    flex-direction: column;\n    gap: 2px;\n}\n\n.meta-label[_ngcontent-%COMP%] {\n    font-size: 0.65rem;\n    font-weight: 700;\n    color: var(--mj-text-muted);\n    text-transform: uppercase;\n    letter-spacing: 0.05em;\n}\n\n.meta-value[_ngcontent-%COMP%] {\n    font-size: 0.8rem;\n    color: var(--mj-text-primary);\n    font-weight: 500;\n}\n\n.meta-value.mono[_ngcontent-%COMP%] {\n    font-family: 'SFMono-Regular', Consolas, monospace;\n    font-size: 0.75rem;\n}\n\n\n\n.success-section[_ngcontent-%COMP%] {\n    padding-top: 12px;\n    border-top: 1px solid var(--mj-bg-surface-sunken);\n}\n\n.success-header[_ngcontent-%COMP%] {\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    margin-bottom: 6px;\n}\n\n.success-label[_ngcontent-%COMP%] {\n    font-size: 0.75rem;\n    font-weight: 600;\n    color: var(--mj-text-secondary);\n}\n\n.success-value[_ngcontent-%COMP%] {\n    font-size: 0.85rem;\n    font-weight: 800;\n}\n\n.success-bar-track[_ngcontent-%COMP%] {\n    height: 6px;\n    background: var(--mj-bg-surface-sunken);\n    border-radius: 3px;\n    overflow: hidden;\n}\n\n.success-bar-fill[_ngcontent-%COMP%] {\n    height: 100%;\n    border-radius: 3px;\n    transition: width 0.5s ease;\n}\n\n.run-stats[_ngcontent-%COMP%] {\n    display: flex;\n    gap: 12px;\n    margin-top: 8px;\n    font-size: 0.75rem;\n}\n\n.stat-success[_ngcontent-%COMP%] { color: var(--mj-status-success); font-weight: 600; }\n.stat-failure[_ngcontent-%COMP%] { color: var(--mj-status-error); font-weight: 600; }\n.stat-total[_ngcontent-%COMP%] { color: var(--mj-text-muted); margin-left: auto; }\n\n\n\n.job-card-footer[_ngcontent-%COMP%] {\n    display: flex;\n    gap: 8px;\n    padding: 12px 20px;\n    border-top: 1px solid var(--mj-bg-surface-sunken);\n    background: var(--mj-bg-surface-sunken);\n}\n\n.action-btn[_ngcontent-%COMP%] {\n    display: inline-flex;\n    align-items: center;\n    gap: 6px;\n    padding: 6px 12px;\n    background: transparent;\n    border: 1px solid var(--mj-border-default);\n    border-radius: 8px;\n    cursor: pointer;\n    font-size: 0.75rem;\n    font-weight: 500;\n    color: var(--mj-text-secondary);\n    transition: all 0.2s;\n}\n\n.action-btn[_ngcontent-%COMP%]:hover {\n    background: var(--mj-bg-surface-sunken);\n    border-color: var(--mj-border-strong);\n}\n\n\n\n.slideout-backdrop[_ngcontent-%COMP%] {\n    position: fixed;\n    top: 0;\n    left: 0;\n    right: 0;\n    bottom: 0;\n    background: var(--mj-bg-overlay);\n    z-index: 999;\n    animation: _ngcontent-%COMP%_fadeInBackdrop 0.2s ease;\n}\n\n@keyframes _ngcontent-%COMP%_fadeInBackdrop {\n    from { opacity: 0; }\n    to { opacity: 1; }\n}\n\n.slideout-panel[_ngcontent-%COMP%] {\n    position: fixed;\n    top: 0;\n    right: -100%;\n    height: 100vh;\n    background: var(--mj-bg-surface-card);\n    box-shadow: var(--mj-shadow-lg);\n    z-index: 1000;\n    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n    overflow-y: auto;\n}\n\n.slideout-panel.open[_ngcontent-%COMP%] {\n    right: 0;\n}\n\n.slideout-resize-handle[_ngcontent-%COMP%] {\n    position: absolute;\n    inset: 0;\n    background: rgba(255, 255, 255, 0.95);\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    z-index: 10;\n    border-radius: 16px;\n    backdrop-filter: blur(4px);\n}\n\n.slideout-resize-handle[_ngcontent-%COMP%]:hover {\n    background: color-mix(in srgb, var(--mj-brand-primary) 30%, transparent);\n}\n\n.slideout-resize-handle[_ngcontent-%COMP%]:active {\n    background: color-mix(in srgb, var(--mj-brand-primary) 50%, transparent);\n}\n\n\n\n.delete-confirm-overlay[_ngcontent-%COMP%] {\n    position: absolute;\n    inset: 0;\n    background: rgba(255, 255, 255, 0.95);\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    z-index: 10;\n    border-radius: 16px;\n    backdrop-filter: blur(4px);\n}\n\n.delete-confirm-content[_ngcontent-%COMP%] {\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    gap: 12px;\n    padding: 24px;\n    text-align: center;\n}\n\n.delete-warn-icon[_ngcontent-%COMP%] {\n    font-size: 1.5rem;\n    color: var(--mj-status-error);\n}\n\n.delete-confirm-text[_ngcontent-%COMP%] {\n    font-size: 0.85rem;\n    font-weight: 600;\n    color: var(--mj-text-primary);\n}\n\n.delete-confirm-actions[_ngcontent-%COMP%] {\n    display: flex;\n    gap: 8px;\n    margin-top: 4px;\n}\n\n.delete-confirm-btn[_ngcontent-%COMP%] {\n    display: inline-flex;\n    align-items: center;\n    gap: 6px;\n    padding: 6px 16px;\n    background: var(--mj-status-error);\n    color: var(--mj-text-inverse);\n    border: none;\n    border-radius: 8px;\n    cursor: pointer;\n    font-size: 0.8rem;\n    font-weight: 600;\n    transition: background 0.2s;\n}\n\n.delete-confirm-btn[_ngcontent-%COMP%]:hover:not(:disabled) {\n    background: var(--mj-status-error-text);\n}\n\n.delete-confirm-btn[_ngcontent-%COMP%]:disabled {\n    opacity: 0.7;\n    cursor: not-allowed;\n}\n\n.delete-cancel-btn[_ngcontent-%COMP%] {\n    padding: 6px 16px;\n    background: var(--mj-bg-surface);\n    color: var(--mj-text-secondary);\n    border: 1px solid var(--mj-border-default);\n    border-radius: 8px;\n    cursor: pointer;\n    font-size: 0.8rem;\n    font-weight: 500;\n    transition: all 0.2s;\n}\n\n.delete-cancel-btn[_ngcontent-%COMP%]:hover {\n    background: var(--mj-bg-surface-sunken);\n    border-color: var(--mj-border-strong);\n}\n\n\n\n.action-btn-danger[_ngcontent-%COMP%] {\n    margin-left: auto;\n    color: var(--mj-status-error);\n    border-color: var(--mj-status-error-border);\n}\n\n.action-btn-danger[_ngcontent-%COMP%]:hover {\n    background: var(--mj-status-error-bg);\n    border-color: var(--mj-status-error);\n    color: var(--mj-status-error-text);\n}\n\n\n\n@media (max-width: 1024px) {\n    .jobs-grid[_ngcontent-%COMP%] {\n        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));\n    }\n}\n\n@media (max-width: 768px) {\n    .jobs-toolbar[_ngcontent-%COMP%] {\n        flex-direction: column;\n        align-items: stretch;\n    }\n    .toolbar-right[_ngcontent-%COMP%] {\n        justify-content: space-between;\n    }\n    .jobs-grid[_ngcontent-%COMP%] {\n        grid-template-columns: 1fr;\n    }\n    .search-box[_ngcontent-%COMP%] {\n        min-width: auto;\n        flex: 1;\n    }\n}"], changeDetection: 0 });
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SchedulingJobsComponent, [{
        type: Component,
        args: [{ standalone: false, selector: 'app-scheduling-jobs', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (HideToolbar) {\n  <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n} @else {\n  <mj-page-layout>\n    <mj-page-header\n      Title=\"Scheduled Jobs\"\n      Icon=\"fa-solid fa-calendar-check\"\n      Subtitle=\"Configure and manage scheduled jobs\">\n      <div meta>\n        <mj-stat-badge [Count]=\"FilteredJobs.length\" [Total]=\"Jobs.length\" Label=\"jobs\"></mj-stat-badge>\n      </div>\n      <div actions>\n        <mj-refresh-button (Clicked)=\"Refresh()\"></mj-refresh-button>\n        <button mjButton variant=\"primary\" size=\"sm\" (click)=\"OpenCreateSlideout()\">\n          <i class=\"fa-solid fa-plus\"></i> <span class=\"action-btn-label\">New Job</span>\n        </button>\n      </div>\n      <div toolbar>\n        <mj-page-search\n          Placeholder=\"Search jobs...\"\n          [Value]=\"SearchTerm\"\n          (ValueChange)=\"OnSearchChange($event)\">\n        </mj-page-search>\n        <mj-filter-popover\n          [ActiveCount]=\"ActiveFilterCount\"\n          [ShowClearAll]=\"ActiveFilterCount > 0\"\n          (ClearAllRequested)=\"ResetFilters()\">\n          <mj-filter-panel\n            [Fields]=\"JobsFilterFields\"\n            [Values]=\"JobsFilterValues\"\n            (ValuesChange)=\"OnFilterValuesChange($event)\"\n            (Reset)=\"ResetFilters()\">\n          </mj-filter-panel>\n        </mj-filter-popover>\n      </div>\n    </mj-page-header>\n    <mj-page-body>\n      <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n    </mj-page-body>\n  </mj-page-layout>\n}\n\n<ng-template #content>\n<div class=\"jobs-container\">\n\n  <!-- Loading -->\n  @if (IsLoading) {\n    <div class=\"loading-container\">\n      <mj-loading text=\"Loading jobs...\" size=\"medium\"></mj-loading>\n    </div>\n  }\n\n  <!-- Empty State -->\n  @if (!IsLoading && FilteredJobs.length === 0) {\n    <mj-empty-state\n      [Variant]=\"IsListNarrowed ? 'no-results' : 'empty'\"\n      Icon=\"fa-solid fa-calendar-xmark\"\n      Title=\"No jobs found\"\n      [Message]=\"IsListNarrowed ? 'No jobs match your search and filters.' : 'Create your first scheduled job to get started.'\"\n      [ActionText]=\"IsListNarrowed ? 'Reset filters' : 'Create Job'\"\n      [ActionIcon]=\"IsListNarrowed ? 'fa-solid fa-rotate-left' : 'fa-solid fa-plus'\"\n      (Action)=\"OnEmptyStateAction()\" />\n  }\n\n  <!-- Job Cards Grid -->\n  @if (!IsLoading && FilteredJobs.length > 0) {\n    <div class=\"jobs-grid\">\n      @for (job of FilteredJobs; track job) {\n        <div\n          class=\"job-card\"\n          (click)=\"OpenEditSlideout(job)\">\n          <!-- Card Header -->\n          <div class=\"job-card-header\">\n            <div class=\"job-card-title\">\n              <i [class]=\"GetTypeIcon(job.jobType)\" class=\"type-icon\"></i>\n              <span class=\"job-name\">{{job.jobName}}</span>\n            </div>\n            <span class=\"status-chip\" [ngClass]=\"GetStatusClass(job.status)\">{{job.status}}</span>\n          </div>\n          <!-- Card Body -->\n          <div class=\"job-card-body\">\n            @if (job.description) {\n              <div class=\"job-description\">{{job.description}}</div>\n            }\n            <div class=\"job-meta-grid\">\n              <div class=\"meta-item\">\n                <span class=\"meta-label\">Type</span>\n                <span class=\"meta-value\">{{job.jobType}}</span>\n              </div>\n              <div class=\"meta-item\">\n                <span class=\"meta-label\">Schedule</span>\n                <span class=\"meta-value mono\">{{job.cronExpression}}</span>\n              </div>\n              <div class=\"meta-item\">\n                <span class=\"meta-label\">Last Run</span>\n                <span class=\"meta-value\">{{FormatDate(job.lastRunAt)}}</span>\n              </div>\n              <div class=\"meta-item\">\n                <span class=\"meta-label\">Next Run</span>\n                <span class=\"meta-value\">{{FormatDate(job.nextRunAt)}}</span>\n              </div>\n            </div>\n            <!-- Success Rate Bar -->\n            <div class=\"success-section\">\n              <div class=\"success-header\">\n                <span class=\"success-label\">Success Rate</span>\n                <span class=\"success-value\" [style.color]=\"GetSuccessRateColor(job.successRate)\">\n                  {{FormatPercentage(job.successRate)}}\n                </span>\n              </div>\n              <div class=\"success-bar-track\">\n                <div class=\"success-bar-fill\"\n                  [style.width]=\"(job.successRate * 100) + '%'\"\n                  [style.background]=\"GetSuccessRateColor(job.successRate)\">\n                </div>\n              </div>\n              <div class=\"run-stats\">\n                <span class=\"stat-success\"><i class=\"fa-solid fa-check\"></i> {{job.successCount}}</span>\n                <span class=\"stat-failure\"><i class=\"fa-solid fa-xmark\"></i> {{job.failureCount}}</span>\n                <span class=\"stat-total\">{{job.totalRuns}} total</span>\n              </div>\n            </div>\n          </div>\n          <!-- Delete confirmation overlay -->\n          @if (IsDeleteConfirming(job.jobId)) {\n            <div class=\"delete-confirm-overlay\" (click)=\"$event.stopPropagation()\">\n              <div class=\"delete-confirm-content\">\n                <i class=\"fa-solid fa-triangle-exclamation delete-warn-icon\"></i>\n                <span class=\"delete-confirm-text\">Delete this scheduled job?</span>\n                <div class=\"delete-confirm-actions\">\n                  <button class=\"delete-confirm-btn\" [disabled]=\"IsDeleting\" (click)=\"ConfirmDelete(job.jobId, $event)\">\n                    @if (IsDeleting) {\n                      <i class=\"fa-solid fa-spinner fa-spin\"></i> Deleting...\n                    } @else {\n                      Delete\n                    }\n                  </button>\n                  <button class=\"delete-cancel-btn\" (click)=\"CancelDelete($event)\">Cancel</button>\n                </div>\n              </div>\n            </div>\n          }\n          <!-- Card Footer -->\n          <div class=\"job-card-footer\">\n            <button mjButton variant=\"flat\" size=\"sm\" (click)=\"ToggleJobStatus(job, $event)\">\n              <i [class]=\"job.status === 'Active' ? 'fa-solid fa-pause' : 'fa-solid fa-play'\"></i>\n              {{job.status === 'Active' ? 'Pause' : 'Resume'}}\n            </button>\n            <button mjButton variant=\"flat\" size=\"sm\" (click)=\"OpenEntityRecord(job); $event.stopPropagation()\">\n              <i class=\"fa-solid fa-up-right-from-square\"></i>\n              Full Details\n            </button>\n            <button mjButton variant=\"danger\" size=\"sm\" (click)=\"ShowDeleteConfirm(job, $event)\">\n              <i class=\"fa-solid fa-trash-can\"></i>\n              Delete\n            </button>\n          </div>\n        </div>\n      }\n    </div>\n  }\n\n  <!-- Slideout Panel -->\n  <mj-scheduled-job-slide-panel\n    [IsOpen]=\"SlideoutOpen\"\n    [ScheduledJobID]=\"SelectedJob?.jobId ?? null\"\n    (Close)=\"CloseSlideout()\"\n    (Saved)=\"OnSlideoutSaved()\"\n    (Deleted)=\"OnSlideoutSaved()\">\n  </mj-scheduled-job-slide-panel>\n</div>\n</ng-template>\n", styles: [".jobs-container {\n    display: flex;\n    flex-direction: column;\n    gap: 20px;\n    position: relative;\n}\n\n/* \u2500\u2500 Toolbar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.jobs-toolbar {\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    flex-wrap: wrap;\n    gap: 12px;\n}\n\n.toolbar-left {\n    display: flex;\n    gap: 8px;\n    align-items: center;\n    flex-wrap: wrap;\n}\n\n.toolbar-right {\n    display: flex;\n    gap: 8px;\n    align-items: center;\n}\n\n.search-box {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n    padding: 8px 14px;\n    background: var(--mj-bg-surface-card);\n    border: 1px solid var(--mj-border-default);\n    border-radius: 10px;\n    min-width: 240px;\n    transition: border-color 0.2s;\n}\n\n.search-box:focus-within {\n    border-color: var(--mj-brand-primary);\n    box-shadow: var(--mj-shadow-sm);\n}\n\n.search-box i {\n    color: var(--mj-text-muted);\n    font-size: 0.85rem;\n}\n\n.search-box input {\n    border: none;\n    outline: none;\n    background: transparent;\n    font-size: 0.85rem;\n    color: var(--mj-text-primary);\n    width: 100%;\n}\n\n.filter-select {\n    padding: 8px 14px;\n    background: var(--mj-bg-surface-card);\n    border: 1px solid var(--mj-border-default);\n    border-radius: 10px;\n    font-size: 0.85rem;\n    color: var(--mj-text-secondary);\n    cursor: pointer;\n    outline: none;\n    transition: border-color 0.2s;\n}\n\n.filter-select:focus {\n    border-color: var(--mj-brand-primary);\n}\n\n.result-count {\n    font-size: 0.8rem;\n    color: var(--mj-text-muted);\n    white-space: nowrap;\n}\n\n.control-btn {\n    display: inline-flex;\n    align-items: center;\n    gap: 6px;\n    padding: 8px 16px;\n    background: var(--mj-bg-surface-card);\n    border: 1px solid var(--mj-border-default);\n    border-radius: 10px;\n    cursor: pointer;\n    font-size: 0.8rem;\n    font-weight: 500;\n    color: var(--mj-text-secondary);\n    transition: all 0.2s ease;\n}\n\n.control-btn:hover {\n    background: var(--mj-bg-surface-sunken);\n    border-color: var(--mj-border-strong);\n}\n\n/* \u2500\u2500 Loading & Empty \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.loading-container {\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    min-height: 300px;\n}\n\n/* \u2500\u2500 Job Cards Grid \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.jobs-grid {\n    display: grid;\n    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));\n    gap: 16px;\n}\n\n.job-card {\n    position: relative;\n    background: var(--mj-bg-surface-card);\n    border-radius: 16px;\n    border: 1px solid var(--mj-border-default);\n    box-shadow: var(--mj-shadow-sm);\n    cursor: pointer;\n    transition: all 0.2s ease;\n    display: flex;\n    flex-direction: column;\n    overflow: hidden;\n}\n\n.job-card:hover {\n    transform: translateY(-2px);\n    box-shadow: var(--mj-shadow-lg);\n    border-color: var(--mj-brand-primary);\n}\n\n/* Card Header */\n.job-card-header {\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    padding: 16px 20px;\n    border-bottom: 1px solid var(--mj-bg-surface-sunken);\n}\n\n.job-card-title {\n    display: flex;\n    align-items: center;\n    gap: 10px;\n    flex: 1;\n    min-width: 0;\n}\n\n.type-icon {\n    color: var(--mj-brand-primary);\n    font-size: 1rem;\n    flex-shrink: 0;\n}\n\n.job-name {\n    font-weight: 700;\n    color: var(--mj-text-primary);\n    font-size: 0.9rem;\n    display: -webkit-box;\n    -webkit-line-clamp: 2;\n    -webkit-box-orient: vertical;\n    overflow: hidden;\n    line-height: 1.3;\n}\n\n.status-chip {\n    font-size: 0.7rem;\n    font-weight: 700;\n    padding: 3px 10px;\n    border-radius: 12px;\n    flex-shrink: 0;\n    margin-left: 8px;\n}\n\n.status-active { background: color-mix(in srgb, var(--mj-status-success) 15%, var(--mj-bg-surface)); color: var(--mj-status-success); }\n.status-paused { background: color-mix(in srgb, var(--mj-status-warning) 15%, var(--mj-bg-surface)); color: var(--mj-status-warning); }\n.status-disabled { background: var(--mj-bg-surface-sunken); color: var(--mj-text-secondary); }\n.status-pending { background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface)); color: var(--mj-brand-primary); }\n.status-expired { background: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface)); color: var(--mj-status-error); }\n\n/* Card Body */\n.job-card-body {\n    padding: 16px 20px;\n    flex: 1;\n}\n\n.job-description {\n    font-size: 0.8rem;\n    color: var(--mj-text-secondary);\n    margin-bottom: 12px;\n    display: -webkit-box;\n    -webkit-line-clamp: 2;\n    -webkit-box-orient: vertical;\n    overflow: hidden;\n    line-height: 1.4;\n}\n\n.job-meta-grid {\n    display: grid;\n    grid-template-columns: 1fr 1fr;\n    gap: 8px;\n    margin-bottom: 16px;\n}\n\n.meta-item {\n    display: flex;\n    flex-direction: column;\n    gap: 2px;\n}\n\n.meta-label {\n    font-size: 0.65rem;\n    font-weight: 700;\n    color: var(--mj-text-muted);\n    text-transform: uppercase;\n    letter-spacing: 0.05em;\n}\n\n.meta-value {\n    font-size: 0.8rem;\n    color: var(--mj-text-primary);\n    font-weight: 500;\n}\n\n.meta-value.mono {\n    font-family: 'SFMono-Regular', Consolas, monospace;\n    font-size: 0.75rem;\n}\n\n/* Success Rate */\n.success-section {\n    padding-top: 12px;\n    border-top: 1px solid var(--mj-bg-surface-sunken);\n}\n\n.success-header {\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    margin-bottom: 6px;\n}\n\n.success-label {\n    font-size: 0.75rem;\n    font-weight: 600;\n    color: var(--mj-text-secondary);\n}\n\n.success-value {\n    font-size: 0.85rem;\n    font-weight: 800;\n}\n\n.success-bar-track {\n    height: 6px;\n    background: var(--mj-bg-surface-sunken);\n    border-radius: 3px;\n    overflow: hidden;\n}\n\n.success-bar-fill {\n    height: 100%;\n    border-radius: 3px;\n    transition: width 0.5s ease;\n}\n\n.run-stats {\n    display: flex;\n    gap: 12px;\n    margin-top: 8px;\n    font-size: 0.75rem;\n}\n\n.stat-success { color: var(--mj-status-success); font-weight: 600; }\n.stat-failure { color: var(--mj-status-error); font-weight: 600; }\n.stat-total { color: var(--mj-text-muted); margin-left: auto; }\n\n/* Card Footer */\n.job-card-footer {\n    display: flex;\n    gap: 8px;\n    padding: 12px 20px;\n    border-top: 1px solid var(--mj-bg-surface-sunken);\n    background: var(--mj-bg-surface-sunken);\n}\n\n.action-btn {\n    display: inline-flex;\n    align-items: center;\n    gap: 6px;\n    padding: 6px 12px;\n    background: transparent;\n    border: 1px solid var(--mj-border-default);\n    border-radius: 8px;\n    cursor: pointer;\n    font-size: 0.75rem;\n    font-weight: 500;\n    color: var(--mj-text-secondary);\n    transition: all 0.2s;\n}\n\n.action-btn:hover {\n    background: var(--mj-bg-surface-sunken);\n    border-color: var(--mj-border-strong);\n}\n\n/* \u2500\u2500 Slideout Panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.slideout-backdrop {\n    position: fixed;\n    top: 0;\n    left: 0;\n    right: 0;\n    bottom: 0;\n    background: var(--mj-bg-overlay);\n    z-index: 999;\n    animation: fadeInBackdrop 0.2s ease;\n}\n\n@keyframes fadeInBackdrop {\n    from { opacity: 0; }\n    to { opacity: 1; }\n}\n\n.slideout-panel {\n    position: fixed;\n    top: 0;\n    right: -100%;\n    height: 100vh;\n    background: var(--mj-bg-surface-card);\n    box-shadow: var(--mj-shadow-lg);\n    z-index: 1000;\n    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n    overflow-y: auto;\n}\n\n.slideout-panel.open {\n    right: 0;\n}\n\n.slideout-resize-handle {\n    position: absolute;\n    inset: 0;\n    background: rgba(255, 255, 255, 0.95);\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    z-index: 10;\n    border-radius: 16px;\n    backdrop-filter: blur(4px);\n}\n\n.slideout-resize-handle:hover {\n    background: color-mix(in srgb, var(--mj-brand-primary) 30%, transparent);\n}\n\n.slideout-resize-handle:active {\n    background: color-mix(in srgb, var(--mj-brand-primary) 50%, transparent);\n}\n\n/* \u2500\u2500 Delete Confirmation Overlay \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.delete-confirm-overlay {\n    position: absolute;\n    inset: 0;\n    background: rgba(255, 255, 255, 0.95);\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    z-index: 10;\n    border-radius: 16px;\n    backdrop-filter: blur(4px);\n}\n\n.delete-confirm-content {\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    gap: 12px;\n    padding: 24px;\n    text-align: center;\n}\n\n.delete-warn-icon {\n    font-size: 1.5rem;\n    color: var(--mj-status-error);\n}\n\n.delete-confirm-text {\n    font-size: 0.85rem;\n    font-weight: 600;\n    color: var(--mj-text-primary);\n}\n\n.delete-confirm-actions {\n    display: flex;\n    gap: 8px;\n    margin-top: 4px;\n}\n\n.delete-confirm-btn {\n    display: inline-flex;\n    align-items: center;\n    gap: 6px;\n    padding: 6px 16px;\n    background: var(--mj-status-error);\n    color: var(--mj-text-inverse);\n    border: none;\n    border-radius: 8px;\n    cursor: pointer;\n    font-size: 0.8rem;\n    font-weight: 600;\n    transition: background 0.2s;\n}\n\n.delete-confirm-btn:hover:not(:disabled) {\n    background: var(--mj-status-error-text);\n}\n\n.delete-confirm-btn:disabled {\n    opacity: 0.7;\n    cursor: not-allowed;\n}\n\n.delete-cancel-btn {\n    padding: 6px 16px;\n    background: var(--mj-bg-surface);\n    color: var(--mj-text-secondary);\n    border: 1px solid var(--mj-border-default);\n    border-radius: 8px;\n    cursor: pointer;\n    font-size: 0.8rem;\n    font-weight: 500;\n    transition: all 0.2s;\n}\n\n.delete-cancel-btn:hover {\n    background: var(--mj-bg-surface-sunken);\n    border-color: var(--mj-border-strong);\n}\n\n/* \u2500\u2500 Danger Action Button \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.action-btn-danger {\n    margin-left: auto;\n    color: var(--mj-status-error);\n    border-color: var(--mj-status-error-border);\n}\n\n.action-btn-danger:hover {\n    background: var(--mj-status-error-bg);\n    border-color: var(--mj-status-error);\n    color: var(--mj-status-error-text);\n}\n\n/* \u2500\u2500 Responsive \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n@media (max-width: 1024px) {\n    .jobs-grid {\n        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));\n    }\n}\n\n@media (max-width: 768px) {\n    .jobs-toolbar {\n        flex-direction: column;\n        align-items: stretch;\n    }\n    .toolbar-right {\n        justify-content: space-between;\n    }\n    .jobs-grid {\n        grid-template-columns: 1fr;\n    }\n    .search-box {\n        min-width: auto;\n        flex: 1;\n    }\n}\n"] }]
    }], () => [{ type: i1.SchedulingInstrumentationService }, { type: i0.ChangeDetectorRef }], { initialState: [{
            type: Input
        }], HideToolbar: [{
            type: Input
        }], stateChange: [{
            type: Output
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SchedulingJobsComponent, { className: "SchedulingJobsComponent", filePath: "src/Scheduling/components/scheduling-jobs.component.ts", lineNumber: 21 }); })();
//# sourceMappingURL=scheduling-jobs.component.js.map