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;
};
var VersionHistoryRestoreResourceComponent_1;
import { Component, ChangeDetectionStrategy } from '@angular/core';
import { Subject } from 'rxjs';
import { RegisterClass } from '@memberjunction/global';
import { BaseResourceComponent } from '@memberjunction/ng-shared';
import { RunView } from '@memberjunction/core';
import { UserInfoEngine } from '@memberjunction/core-entities';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@memberjunction/ng-ui-components";
import * as i3 from "@memberjunction/ng-shared-generic";
const _c0 = a0 => ({ "expanded": a0 });
function VersionHistoryRestoreResourceComponent_Conditional_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "mj-loading", 8);
} }
function VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_33_For_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 30);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const restore_r2 = i0.ɵɵnextContext().$implicit;
    const ctx_r2 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(ctx_r2.FormatDate(restore_r2.StartedAt));
} }
function VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_33_For_2_Conditional_14_Conditional_17_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 38)(1, "span", 39);
    i0.ɵɵtext(2, "Restored By");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "span", 41);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const restore_r2 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate(restore_r2.User);
} }
function VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_33_For_2_Conditional_14_Conditional_18_Conditional_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 43);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const restore_r2 = i0.ɵɵnextContext(3).$implicit;
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", restore_r2.PreRestoreLabel, " ");
} }
function VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_33_For_2_Conditional_14_Conditional_18_Conditional_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 43);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "slice");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const restore_r2 = i0.ɵɵnextContext(3).$implicit;
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(2, 1, restore_r2.PreRestoreLabelID, 0, 20), "... ");
} }
function VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_33_For_2_Conditional_14_Conditional_18_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 38)(1, "span", 39);
    i0.ɵɵtext(2, "Pre-Restore Label");
    i0.ɵɵelementEnd();
    i0.ɵɵconditionalCreate(3, VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_33_For_2_Conditional_14_Conditional_18_Conditional_3_Template, 2, 1, "span", 43);
    i0.ɵɵconditionalCreate(4, VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_33_For_2_Conditional_14_Conditional_18_Conditional_4_Template, 3, 5, "span", 43);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const restore_r2 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵconditional(restore_r2.PreRestoreLabel ? 3 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(!restore_r2.PreRestoreLabel ? 4 : -1);
} }
function VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_33_For_2_Conditional_14_Conditional_19_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 42)(1, "div", 44);
    i0.ɵɵelement(2, "i", 45);
    i0.ɵɵtext(3, " Error Log ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "pre", 46);
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const restore_r2 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(restore_r2.ErrorLog);
} }
function VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_33_For_2_Conditional_14_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 36)(1, "div", 37)(2, "div", 38)(3, "span", 39);
    i0.ɵɵtext(4, "Status");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "span", 40);
    i0.ɵɵtext(6);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(7, "div", 38)(8, "span", 39);
    i0.ɵɵtext(9, "Items Completed");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(10, "span", 41);
    i0.ɵɵtext(11);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(12, "div", 38)(13, "span", 39);
    i0.ɵɵtext(14, "Items Failed");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(15, "span", 41);
    i0.ɵɵtext(16);
    i0.ɵɵelementEnd()();
    i0.ɵɵconditionalCreate(17, VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_33_For_2_Conditional_14_Conditional_17_Template, 5, 1, "div", 38);
    i0.ɵɵconditionalCreate(18, VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_33_For_2_Conditional_14_Conditional_18_Template, 5, 2, "div", 38);
    i0.ɵɵelementEnd();
    i0.ɵɵconditionalCreate(19, VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_33_For_2_Conditional_14_Conditional_19_Template, 6, 1, "div", 42);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const restore_r2 = i0.ɵɵnextContext().$implicit;
    const ctx_r2 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("ngClass", ctx_r2.GetStatusClass(restore_r2.Status));
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", restore_r2.Status, " ");
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(restore_r2.CompletedItems ?? 0);
    i0.ɵɵadvance(4);
    i0.ɵɵclassProp("text-error", (restore_r2.FailedItems ?? 0) > 0);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", restore_r2.FailedItems ?? 0, " ");
    i0.ɵɵadvance();
    i0.ɵɵconditional(restore_r2.User ? 17 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(restore_r2.PreRestoreLabelID ? 18 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(restore_r2.ErrorLog ? 19 : -1);
} }
function VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_33_For_2_Template(rf, ctx) { if (rf & 1) {
    const _r1 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 24)(1, "div", 25);
    i0.ɵɵlistener("click", function VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_33_For_2_Template_div_click_1_listener() { const restore_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.ToggleExpand(restore_r2.ID)); });
    i0.ɵɵelementStart(2, "div", 26);
    i0.ɵɵelement(3, "i", 27);
    i0.ɵɵelementStart(4, "div", 28)(5, "div", 29);
    i0.ɵɵtext(6);
    i0.ɵɵelementEnd();
    i0.ɵɵconditionalCreate(7, VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_33_For_2_Conditional_7_Template, 2, 1, "div", 30);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(8, "div", 31)(9, "div", 32);
    i0.ɵɵelement(10, "div", 33);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(11, "span", 34);
    i0.ɵɵtext(12);
    i0.ɵɵelementEnd();
    i0.ɵɵelement(13, "i", 35);
    i0.ɵɵelementEnd()();
    i0.ɵɵconditionalCreate(14, VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_33_For_2_Conditional_14_Template, 20, 9, "div", 36);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const restore_r2 = ctx.$implicit;
    const ctx_r2 = i0.ɵɵnextContext(3);
    i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(13, _c0, ctx_r2.IsExpanded(restore_r2.ID)));
    i0.ɵɵadvance(3);
    i0.ɵɵclassMap(ctx_r2.GetStatusIcon(restore_r2.Status));
    i0.ɵɵproperty("ngClass", ctx_r2.GetStatusClass(restore_r2.Status));
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", restore_r2.VersionLabel, " ");
    i0.ɵɵadvance();
    i0.ɵɵconditional(restore_r2.StartedAt ? 7 : -1);
    i0.ɵɵadvance(3);
    i0.ɵɵstyleProp("width", ctx_r2.GetProgressPercent(restore_r2), "%");
    i0.ɵɵproperty("ngClass", ctx_r2.GetStatusClass(restore_r2.Status));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate2(" ", restore_r2.CompletedItems ?? 0, " / ", restore_r2.TotalItems ?? 0, " items ");
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngClass", ctx_r2.IsExpanded(restore_r2.ID) ? "fa-chevron-up" : "fa-chevron-down");
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r2.IsExpanded(restore_r2.ID) ? 14 : -1);
} }
function VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_33_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 22);
    i0.ɵɵrepeaterCreate(1, VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_33_For_2_Template, 15, 15, "div", 24, i0.ɵɵrepeaterTrackByIdentity);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵrepeater(ctx_r2.FilteredRestores);
} }
function VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_34_Conditional_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "p");
    i0.ɵɵtext(1, " Try adjusting your filters. ");
    i0.ɵɵelementEnd();
} }
function VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_34_Conditional_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "p");
    i0.ɵɵtext(1, " No restores have been performed yet. Use the VersionHistoryEngine to restore records to a labeled state. ");
    i0.ɵɵelementEnd();
} }
function VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_34_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 23);
    i0.ɵɵelement(1, "i", 47);
    i0.ɵɵelementStart(2, "h3");
    i0.ɵɵtext(3, "No restore operations found");
    i0.ɵɵelementEnd();
    i0.ɵɵconditionalCreate(4, VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_34_Conditional_4_Template, 2, 0, "p");
    i0.ɵɵconditionalCreate(5, VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_34_Conditional_5_Template, 2, 0, "p");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(4);
    i0.ɵɵconditional(ctx_r2.StatusFilter ? 4 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(!ctx_r2.StatusFilter ? 5 : -1);
} }
function VersionHistoryRestoreResourceComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 9)(1, "div", 10)(2, "div", 11);
    i0.ɵɵelement(3, "i", 12);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "div", 13)(5, "div", 14);
    i0.ɵɵtext(6);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(7, "div", 15);
    i0.ɵɵtext(8, "Total Restores");
    i0.ɵɵelementEnd()()();
    i0.ɵɵelementStart(9, "div", 10)(10, "div", 16);
    i0.ɵɵelement(11, "i", 17);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(12, "div", 13)(13, "div", 14);
    i0.ɵɵtext(14);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(15, "div", 15);
    i0.ɵɵtext(16, "Successful");
    i0.ɵɵelementEnd()()();
    i0.ɵɵelementStart(17, "div", 10)(18, "div", 18);
    i0.ɵɵelement(19, "i", 19);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(20, "div", 13)(21, "div", 14);
    i0.ɵɵtext(22);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(23, "div", 15);
    i0.ɵɵtext(24, "Failed");
    i0.ɵɵelementEnd()()();
    i0.ɵɵelementStart(25, "div", 10)(26, "div", 20);
    i0.ɵɵelement(27, "i", 21);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(28, "div", 13)(29, "div", 14);
    i0.ɵɵtext(30);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(31, "div", 15);
    i0.ɵɵtext(32, "Partial");
    i0.ɵɵelementEnd()()()();
    i0.ɵɵconditionalCreate(33, VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_33_Template, 3, 0, "div", 22);
    i0.ɵɵconditionalCreate(34, VersionHistoryRestoreResourceComponent_Conditional_11_Conditional_34_Template, 6, 2, "div", 23);
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance(6);
    i0.ɵɵtextInterpolate(ctx_r2.TotalRestores);
    i0.ɵɵadvance(8);
    i0.ɵɵtextInterpolate(ctx_r2.SuccessfulRestores);
    i0.ɵɵadvance(8);
    i0.ɵɵtextInterpolate(ctx_r2.FailedRestores);
    i0.ɵɵadvance(8);
    i0.ɵɵtextInterpolate(ctx_r2.PartialRestores);
    i0.ɵɵadvance(3);
    i0.ɵɵconditional(ctx_r2.FilteredRestores.length > 0 ? 33 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r2.FilteredRestores.length === 0 && !ctx_r2.IsLoading ? 34 : -1);
} }
let VersionHistoryRestoreResourceComponent = class VersionHistoryRestoreResourceComponent extends BaseResourceComponent {
    static { VersionHistoryRestoreResourceComponent_1 = this; }
    cdr;
    IsLoading = true;
    // Stats
    TotalRestores = 0;
    SuccessfulRestores = 0;
    FailedRestores = 0;
    PartialRestores = 0;
    // Data
    Restores = [];
    FilteredRestores = [];
    // Filters
    StatusFilter = '';
    // Expanded detail
    ExpandedRestoreId = '';
    static PREFS_KEY = 'VersionHistory.Restore.UserPreferences';
    preferencesLoaded = false;
    destroy$ = new Subject();
    constructor(cdr) {
        super();
        this.cdr = cdr;
    }
    ngOnInit() {
        super.ngOnInit();
        this.loadUserPreferences();
        this.LoadData();
    }
    ngOnDestroy() {
        super.ngOnDestroy();
        this.destroy$.next();
        this.destroy$.complete();
    }
    async GetResourceDisplayName(data) {
        return 'Restore History';
    }
    async GetResourceIconClass(data) {
        return 'fa-solid fa-clock-rotate-left';
    }
    async LoadData() {
        try {
            this.IsLoading = true;
            this.cdr.markForCheck();
            const rv = RunView.FromMetadataProvider(this.ProviderToUse);
            const result = await rv.RunView({
                EntityName: 'MJ: Version Label Restores',
                OrderBy: '__mj_CreatedAt DESC',
                MaxRows: 200,
                ResultType: 'simple'
            });
            if (result.Success) {
                this.Restores = result.Results;
                this.computeStats();
                this.applyFilters();
            }
        }
        catch (error) {
            console.error('Error loading restore history:', error);
        }
        finally {
            this.IsLoading = false;
            this.NotifyLoadComplete();
            this.cdr.markForCheck();
        }
    }
    computeStats() {
        this.TotalRestores = this.Restores.length;
        this.SuccessfulRestores = this.Restores.filter(r => r.Status === 'Complete').length;
        this.FailedRestores = this.Restores.filter(r => r.Status === 'Error').length;
        this.PartialRestores = this.Restores.filter(r => r.Status === 'Partial').length;
    }
    applyFilters() {
        this.FilteredRestores = this.Restores.filter(r => {
            if (this.StatusFilter && r.Status !== this.StatusFilter)
                return false;
            return true;
        });
        this.cdr.markForCheck();
    }
    OnStatusFilterChange(status) {
        this.StatusFilter = this.StatusFilter === status ? '' : status;
        this.applyFilters();
        this.persistPreferences();
    }
    // -- Concise chrome: Status lives behind the one Filter popover ------------
    get statusFilterFields() {
        return [{
                key: 'status',
                type: 'chips',
                label: 'Status',
                chipOptions: [
                    { text: 'All', value: '' },
                    { text: 'Complete', value: 'Complete', icon: 'fa-solid fa-circle-check' },
                    { text: 'Error', value: 'Error', icon: 'fa-solid fa-circle-xmark' },
                    { text: 'Partial', value: 'Partial', icon: 'fa-solid fa-circle-half-stroke' },
                ],
            }];
    }
    get statusFilterValues() {
        return { status: this.StatusFilter };
    }
    get ActiveFilterCount() {
        return this.StatusFilter ? 1 : 0;
    }
    onFilterValuesChange(values) {
        this.StatusFilter = values['status'] ?? '';
        this.applyFilters();
        this.persistPreferences();
    }
    resetStatusFilter() {
        this.StatusFilter = '';
        this.applyFilters();
        this.persistPreferences();
    }
    loadUserPreferences() {
        try {
            const raw = UserInfoEngine.Instance.GetSetting(VersionHistoryRestoreResourceComponent_1.PREFS_KEY);
            if (raw) {
                const prefs = JSON.parse(raw);
                if (prefs.StatusFilter != null) {
                    this.StatusFilter = prefs.StatusFilter;
                }
            }
        }
        catch (error) {
            console.error('Error loading restore preferences:', error);
            this.StatusFilter = '';
        }
        this.preferencesLoaded = true;
    }
    persistPreferences() {
        if (!this.preferencesLoaded)
            return;
        const prefs = {
            StatusFilter: this.StatusFilter
        };
        UserInfoEngine.Instance.SetSettingDebounced(VersionHistoryRestoreResourceComponent_1.PREFS_KEY, JSON.stringify(prefs));
    }
    ToggleExpand(restoreId) {
        const id = restoreId ?? '';
        this.ExpandedRestoreId = this.ExpandedRestoreId === id ? '' : id;
        this.cdr.markForCheck();
    }
    IsExpanded(restoreId) {
        return this.ExpandedRestoreId === (restoreId ?? '');
    }
    GetStatusClass(status) {
        const classes = {
            'Complete': 'status-success',
            'Error': 'status-failed',
            'In Progress': 'status-progress',
            'Pending': 'status-pending',
            'Partial': 'status-partial'
        };
        return classes[status ?? ''] ?? '';
    }
    GetStatusIcon(status) {
        const icons = {
            'Complete': 'fa-solid fa-circle-check',
            'Error': 'fa-solid fa-circle-xmark',
            'In Progress': 'fa-solid fa-spinner fa-spin',
            'Pending': 'fa-solid fa-clock',
            'Partial': 'fa-solid fa-circle-half-stroke'
        };
        return icons[status ?? ''] ?? 'fa-solid fa-circle';
    }
    GetProgressPercent(restore) {
        if (!restore.TotalItems)
            return 0;
        return Math.round(((restore.CompletedItems ?? 0) / restore.TotalItems) * 100);
    }
    FormatDate(date) {
        if (!date)
            return '';
        const d = date instanceof Date ? date : new Date(date);
        return d.toLocaleDateString('en-US', {
            month: 'short',
            day: 'numeric',
            year: 'numeric',
            hour: '2-digit',
            minute: '2-digit'
        });
    }
    Refresh() {
        this.LoadData();
    }
    static ɵfac = function VersionHistoryRestoreResourceComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || VersionHistoryRestoreResourceComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
    static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: VersionHistoryRestoreResourceComponent, selectors: [["mj-version-history-restore-resource"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 12, vars: 9, consts: [["Title", "Restore History", "Icon", "fa-solid fa-clock-rotate-left", "Subtitle", "Track all restore operations and their outcomes"], ["meta", ""], ["Label", "restores", 3, "Count", "Total"], ["actions", ""], [3, "Clicked", "Loading"], ["toolbar", ""], [3, "ClearAllRequested", "ActiveCount", "ShowClearAll"], [3, "ValuesChange", "Reset", "Fields", "Values"], ["text", "Loading restore history..."], [1, "kpi-row"], [1, "kpi-card"], [1, "kpi-icon", 2, "background", "color-mix(in srgb, var(--mj-brand-primary) 10%, transparent)", "color", "var(--mj-brand-primary)"], [1, "fa-solid", "fa-clock-rotate-left"], [1, "kpi-content"], [1, "kpi-value"], [1, "kpi-label"], [1, "kpi-icon", 2, "background", "color-mix(in srgb, var(--mj-status-success) 10%, transparent)", "color", "var(--mj-status-success)"], [1, "fa-solid", "fa-circle-check"], [1, "kpi-icon", 2, "background", "color-mix(in srgb, var(--mj-status-error) 10%, transparent)", "color", "var(--mj-status-error)"], [1, "fa-solid", "fa-circle-xmark"], [1, "kpi-icon", 2, "background", "color-mix(in srgb, var(--mj-status-warning) 10%, transparent)", "color", "var(--mj-status-warning)"], [1, "fa-solid", "fa-circle-half-stroke"], [1, "restore-list"], [1, "empty-state"], [1, "restore-card", 3, "ngClass"], [1, "restore-header", 3, "click"], [1, "restore-header-left"], [1, "status-icon", 3, "ngClass"], [1, "restore-info"], [1, "restore-label-name"], [1, "restore-date"], [1, "restore-header-right"], [1, "restore-progress-bar"], [1, "progress-fill", 3, "ngClass"], [1, "restore-count"], [1, "expand-icon", 3, "ngClass"], [1, "restore-details"], [1, "detail-grid"], [1, "detail-item"], [1, "detail-label"], [1, "detail-value", 3, "ngClass"], [1, "detail-value"], [1, "error-log"], [1, "detail-value", "detail-mono"], [1, "error-log-header"], [1, "fa-solid", "fa-triangle-exclamation"], [1, "error-log-content"], [1, "fa-solid", "fa-clock-rotate-left", "empty-icon"]], template: function VersionHistoryRestoreResourceComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "mj-page-layout")(1, "mj-page-header", 0)(2, "div", 1);
            i0.ɵɵelement(3, "mj-stat-badge", 2);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(4, "div", 3)(5, "mj-refresh-button", 4);
            i0.ɵɵlistener("Clicked", function VersionHistoryRestoreResourceComponent_Template_mj_refresh_button_Clicked_5_listener() { return ctx.Refresh(); });
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(6, "div", 5)(7, "mj-filter-popover", 6);
            i0.ɵɵlistener("ClearAllRequested", function VersionHistoryRestoreResourceComponent_Template_mj_filter_popover_ClearAllRequested_7_listener() { return ctx.resetStatusFilter(); });
            i0.ɵɵelementStart(8, "mj-filter-panel", 7);
            i0.ɵɵlistener("ValuesChange", function VersionHistoryRestoreResourceComponent_Template_mj_filter_panel_ValuesChange_8_listener($event) { return ctx.onFilterValuesChange($event); })("Reset", function VersionHistoryRestoreResourceComponent_Template_mj_filter_panel_Reset_8_listener() { return ctx.resetStatusFilter(); });
            i0.ɵɵelementEnd()()()();
            i0.ɵɵelementStart(9, "mj-page-body");
            i0.ɵɵconditionalCreate(10, VersionHistoryRestoreResourceComponent_Conditional_10_Template, 1, 0, "mj-loading", 8);
            i0.ɵɵconditionalCreate(11, VersionHistoryRestoreResourceComponent_Conditional_11_Template, 35, 6);
            i0.ɵɵelementEnd()();
        } if (rf & 2) {
            i0.ɵɵadvance(3);
            i0.ɵɵproperty("Count", ctx.FilteredRestores.length)("Total", ctx.Restores.length);
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("Loading", ctx.IsLoading);
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("ActiveCount", ctx.ActiveFilterCount)("ShowClearAll", ctx.ActiveFilterCount > 0);
            i0.ɵɵadvance();
            i0.ɵɵproperty("Fields", ctx.statusFilterFields)("Values", ctx.statusFilterValues);
            i0.ɵɵadvance(2);
            i0.ɵɵconditional(ctx.IsLoading ? 10 : -1);
            i0.ɵɵadvance();
            i0.ɵɵconditional(!ctx.IsLoading ? 11 : -1);
        } }, dependencies: [i1.NgClass, i2.MJPageHeaderComponent, i2.MJPageLayoutComponent, i2.MJPageBodyComponent, i2.MJFilterPopoverComponent, i2.MJFilterPanelComponent, i2.MJStatBadgeComponent, i2.MJRefreshButtonComponent, i3.LoadingComponent, i1.SlicePipe], styles: ["\n\n.kpi-row[_ngcontent-%COMP%] {\n    display: grid;\n    grid-template-columns: repeat(4, 1fr);\n    gap: 16px;\n    margin-bottom: 24px;\n}\n\n.kpi-card[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 16px;\n    padding: 20px;\n    background: var(--mj-bg-surface-card);\n    border: 1px solid var(--mj-border-default);\n    border-radius: 12px;\n}\n\n.kpi-icon[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    width: 48px;\n    height: 48px;\n    border-radius: 12px;\n    font-size: 20px;\n    flex-shrink: 0;\n}\n\n.kpi-value[_ngcontent-%COMP%] {\n    font-size: 28px;\n    font-weight: 700;\n    color: var(--mj-text-primary);\n    line-height: 1;\n}\n\n.kpi-label[_ngcontent-%COMP%] {\n    font-size: 13px;\n    color: var(--mj-text-secondary);\n    margin-top: 4px;\n}\n\n\n\n.restore-list[_ngcontent-%COMP%] {\n    display: flex;\n    flex-direction: column;\n    gap: 10px;\n}\n\n.restore-card[_ngcontent-%COMP%] {\n    background: var(--mj-bg-surface-card);\n    border: 1px solid var(--mj-border-default);\n    border-radius: 12px;\n    overflow: hidden;\n    transition: all 0.2s ease;\n}\n\n.restore-card[_ngcontent-%COMP%]:hover {\n    border-color: var(--mj-border-strong);\n}\n\n.restore-card.expanded[_ngcontent-%COMP%] {\n    box-shadow: var(--mj-shadow-md);\n}\n\n.restore-header[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    padding: 16px 20px;\n    cursor: pointer;\n}\n\n.restore-header-left[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 14px;\n}\n\n.status-icon[_ngcontent-%COMP%] {\n    font-size: 20px;\n}\n\n.status-success[_ngcontent-%COMP%] { color: var(--mj-status-success); }\n.status-failed[_ngcontent-%COMP%] { color: var(--mj-status-error); }\n.status-progress[_ngcontent-%COMP%] { color: var(--mj-brand-primary); }\n.status-pending[_ngcontent-%COMP%] { color: var(--mj-status-warning); }\n\n.restore-info[_ngcontent-%COMP%] {\n    display: flex;\n    flex-direction: column;\n    gap: 2px;\n}\n\n.restore-label-name[_ngcontent-%COMP%] {\n    font-size: 15px;\n    font-weight: 600;\n    color: var(--mj-text-primary);\n    display: flex;\n    align-items: center;\n    gap: 8px;\n}\n\n.dry-run-badge[_ngcontent-%COMP%] {\n    font-size: 10px;\n    font-weight: 700;\n    padding: 2px 8px;\n    background: color-mix(in srgb, var(--mj-status-warning) 10%, transparent);\n    color: var(--mj-status-warning);\n    border-radius: 8px;\n    letter-spacing: 0.5px;\n}\n\n.restore-date[_ngcontent-%COMP%] {\n    font-size: 13px;\n    color: var(--mj-text-secondary);\n}\n\n.restore-header-right[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 14px;\n}\n\n.restore-progress-bar[_ngcontent-%COMP%] {\n    width: 80px;\n    height: 6px;\n    background: var(--mj-bg-surface-sunken);\n    border-radius: 3px;\n    overflow: hidden;\n}\n\n.progress-fill[_ngcontent-%COMP%] {\n    height: 100%;\n    border-radius: 3px;\n    transition: width 0.3s ease;\n}\n\n.progress-fill.status-success[_ngcontent-%COMP%] { background: var(--mj-status-success); }\n.progress-fill.status-failed[_ngcontent-%COMP%] { background: var(--mj-status-error); }\n.progress-fill.status-progress[_ngcontent-%COMP%] { background: var(--mj-brand-primary); }\n.progress-fill.status-pending[_ngcontent-%COMP%] { background: var(--mj-status-warning); }\n\n.restore-count[_ngcontent-%COMP%] {\n    font-size: 13px;\n    color: var(--mj-text-secondary);\n    white-space: nowrap;\n}\n\n.expand-icon[_ngcontent-%COMP%] {\n    color: var(--mj-text-muted);\n    font-size: 12px;\n}\n\n\n\n.restore-details[_ngcontent-%COMP%] {\n    padding: 0 20px 20px;\n    border-top: 1px solid var(--mj-border-default);\n}\n\n.detail-grid[_ngcontent-%COMP%] {\n    display: grid;\n    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));\n    gap: 16px;\n    padding-top: 16px;\n}\n\n.detail-item[_ngcontent-%COMP%] {\n    display: flex;\n    flex-direction: column;\n    gap: 4px;\n}\n\n.detail-label[_ngcontent-%COMP%] {\n    font-size: 12px;\n    font-weight: 600;\n    color: var(--mj-text-secondary);\n    text-transform: uppercase;\n    letter-spacing: 0.5px;\n}\n\n.detail-value[_ngcontent-%COMP%] {\n    font-size: 15px;\n    color: var(--mj-text-primary);\n    font-weight: 500;\n}\n\n.detail-mono[_ngcontent-%COMP%] {\n    font-family: 'SF Mono', 'Fira Code', monospace;\n    font-size: 13px;\n}\n\n.text-error[_ngcontent-%COMP%] {\n    color: var(--mj-status-error);\n}\n\n\n\n.error-log[_ngcontent-%COMP%] {\n    margin-top: 16px;\n    border: 1px solid color-mix(in srgb, var(--mj-status-error) 20%, transparent);\n    border-radius: 8px;\n    overflow: hidden;\n}\n\n.error-log-header[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n    padding: 10px 14px;\n    background: color-mix(in srgb, var(--mj-status-error) 6%, transparent);\n    color: var(--mj-status-error);\n    font-size: 13px;\n    font-weight: 600;\n}\n\n.error-log-content[_ngcontent-%COMP%] {\n    margin: 0;\n    padding: 12px 14px;\n    font-size: 12px;\n    font-family: 'SF Mono', 'Fira Code', monospace;\n    color: var(--mj-text-primary);\n    background: var(--mj-bg-surface-card);\n    overflow-x: auto;\n    white-space: pre-wrap;\n    word-break: break-word;\n}\n\n\n\n.empty-state[_ngcontent-%COMP%] {\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: center;\n    padding: 60px 20px;\n    text-align: center;\n}\n\n.empty-icon[_ngcontent-%COMP%] {\n    font-size: 48px;\n    color: var(--mj-text-muted);\n    margin-bottom: 16px;\n}\n\n.empty-state[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%] {\n    font-size: 18px;\n    font-weight: 600;\n    color: var(--mj-text-primary);\n    margin: 0 0 8px 0;\n}\n\n.empty-state[_ngcontent-%COMP%]   p[_ngcontent-%COMP%] {\n    font-size: 14px;\n    color: var(--mj-text-secondary);\n    margin: 0;\n    max-width: 400px;\n}\n\n@media (max-width: 768px) {\n    .kpi-row[_ngcontent-%COMP%] { grid-template-columns: repeat(2, 1fr); }\n}"], changeDetection: 0 });
};
VersionHistoryRestoreResourceComponent = VersionHistoryRestoreResourceComponent_1 = __decorate([
    RegisterClass(BaseResourceComponent, 'VersionHistoryRestoreResource')
], VersionHistoryRestoreResourceComponent);
export { VersionHistoryRestoreResourceComponent };
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(VersionHistoryRestoreResourceComponent, [{
        type: Component,
        args: [{ standalone: false, selector: 'mj-version-history-restore-resource', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mj-page-layout>\n  <mj-page-header\n    Title=\"Restore History\"\n    Icon=\"fa-solid fa-clock-rotate-left\"\n    Subtitle=\"Track all restore operations and their outcomes\">\n    <div meta>\n      <mj-stat-badge\n        [Count]=\"FilteredRestores.length\"\n        [Total]=\"Restores.length\"\n        Label=\"restores\">\n      </mj-stat-badge>\n    </div>\n    <div actions>\n      <mj-refresh-button [Loading]=\"IsLoading\" (Clicked)=\"Refresh()\"></mj-refresh-button>\n    </div>\n    <div toolbar>\n      <mj-filter-popover\n        [ActiveCount]=\"ActiveFilterCount\"\n        [ShowClearAll]=\"ActiveFilterCount > 0\"\n        (ClearAllRequested)=\"resetStatusFilter()\">\n        <mj-filter-panel\n          [Fields]=\"statusFilterFields\"\n          [Values]=\"statusFilterValues\"\n          (ValuesChange)=\"onFilterValuesChange($event)\"\n          (Reset)=\"resetStatusFilter()\">\n        </mj-filter-panel>\n      </mj-filter-popover>\n    </div>\n  </mj-page-header>\n\n  <mj-page-body>\n  @if (IsLoading) {\n    <mj-loading text=\"Loading restore history...\"></mj-loading>\n  }\n\n  @if (!IsLoading) {\n    <!-- KPI Cards -->\n    <div class=\"kpi-row\">\n      <div class=\"kpi-card\">\n        <div class=\"kpi-icon\" style=\"background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent); color: var(--mj-brand-primary);\">\n          <i class=\"fa-solid fa-clock-rotate-left\"></i>\n        </div>\n        <div class=\"kpi-content\">\n          <div class=\"kpi-value\">{{TotalRestores}}</div>\n          <div class=\"kpi-label\">Total Restores</div>\n        </div>\n      </div>\n      <div class=\"kpi-card\">\n        <div class=\"kpi-icon\" style=\"background: color-mix(in srgb, var(--mj-status-success) 10%, transparent); color: var(--mj-status-success);\">\n          <i class=\"fa-solid fa-circle-check\"></i>\n        </div>\n        <div class=\"kpi-content\">\n          <div class=\"kpi-value\">{{SuccessfulRestores}}</div>\n          <div class=\"kpi-label\">Successful</div>\n        </div>\n      </div>\n      <div class=\"kpi-card\">\n        <div class=\"kpi-icon\" style=\"background: color-mix(in srgb, var(--mj-status-error) 10%, transparent); color: var(--mj-status-error);\">\n          <i class=\"fa-solid fa-circle-xmark\"></i>\n        </div>\n        <div class=\"kpi-content\">\n          <div class=\"kpi-value\">{{FailedRestores}}</div>\n          <div class=\"kpi-label\">Failed</div>\n        </div>\n      </div>\n      <div class=\"kpi-card\">\n        <div class=\"kpi-icon\" style=\"background: color-mix(in srgb, var(--mj-status-warning) 10%, transparent); color: var(--mj-status-warning);\">\n          <i class=\"fa-solid fa-circle-half-stroke\"></i>\n        </div>\n        <div class=\"kpi-content\">\n          <div class=\"kpi-value\">{{PartialRestores}}</div>\n          <div class=\"kpi-label\">Partial</div>\n        </div>\n      </div>\n    </div>\n    <!-- Restore List -->\n    @if (FilteredRestores.length > 0) {\n      <div class=\"restore-list\">\n        @for (restore of FilteredRestores; track restore) {\n          <div class=\"restore-card\"\n            [ngClass]=\"{'expanded': IsExpanded(restore.ID)}\">\n            <div class=\"restore-header\" (click)=\"ToggleExpand(restore.ID)\">\n              <div class=\"restore-header-left\">\n                <i [class]=\"GetStatusIcon(restore.Status)\"\n                  [ngClass]=\"GetStatusClass(restore.Status)\"\n                class=\"status-icon\"></i>\n                <div class=\"restore-info\">\n                  <div class=\"restore-label-name\">\n                    {{restore.VersionLabel}}\n                  </div>\n                  @if (restore.StartedAt) {\n                    <div class=\"restore-date\">{{FormatDate(restore.StartedAt)}}</div>\n                  }\n                </div>\n              </div>\n              <div class=\"restore-header-right\">\n                <div class=\"restore-progress-bar\">\n                  <div class=\"progress-fill\"\n                    [ngClass]=\"GetStatusClass(restore.Status)\"\n                    [style.width.%]=\"GetProgressPercent(restore)\">\n                  </div>\n                </div>\n                <span class=\"restore-count\">\n                  {{restore.CompletedItems ?? 0}} / {{restore.TotalItems ?? 0}} items\n                </span>\n                <i class=\"fa-solid\"\n                  [ngClass]=\"IsExpanded(restore.ID) ? 'fa-chevron-up' : 'fa-chevron-down'\"\n                  class=\"expand-icon\">\n                </i>\n              </div>\n            </div>\n            <!-- Expanded Details -->\n            @if (IsExpanded(restore.ID)) {\n              <div class=\"restore-details\">\n                <div class=\"detail-grid\">\n                  <div class=\"detail-item\">\n                    <span class=\"detail-label\">Status</span>\n                    <span class=\"detail-value\" [ngClass]=\"GetStatusClass(restore.Status)\">\n                      {{restore.Status}}\n                    </span>\n                  </div>\n                  <div class=\"detail-item\">\n                    <span class=\"detail-label\">Items Completed</span>\n                    <span class=\"detail-value\">{{restore.CompletedItems ?? 0}}</span>\n                  </div>\n                  <div class=\"detail-item\">\n                    <span class=\"detail-label\">Items Failed</span>\n                    <span class=\"detail-value\" [class.text-error]=\"(restore.FailedItems ?? 0) > 0\">\n                      {{restore.FailedItems ?? 0}}\n                    </span>\n                  </div>\n                  @if (restore.User) {\n                    <div class=\"detail-item\">\n                      <span class=\"detail-label\">Restored By</span>\n                      <span class=\"detail-value\">{{restore.User}}</span>\n                    </div>\n                  }\n                  @if (restore.PreRestoreLabelID) {\n                    <div class=\"detail-item\">\n                      <span class=\"detail-label\">Pre-Restore Label</span>\n                      @if (restore.PreRestoreLabel) {\n                        <span class=\"detail-value detail-mono\">\n                          {{restore.PreRestoreLabel}}\n                        </span>\n                      }\n                      @if (!restore.PreRestoreLabel) {\n                        <span class=\"detail-value detail-mono\">\n                          {{restore.PreRestoreLabelID | slice:0:20}}...\n                        </span>\n                      }\n                    </div>\n                  }\n                </div>\n                @if (restore.ErrorLog) {\n                  <div class=\"error-log\">\n                    <div class=\"error-log-header\">\n                      <i class=\"fa-solid fa-triangle-exclamation\"></i>\n                      Error Log\n                    </div>\n                    <pre class=\"error-log-content\">{{restore.ErrorLog}}</pre>\n                  </div>\n                }\n              </div>\n            }\n          </div>\n        }\n      </div>\n    }\n    <!-- Empty State -->\n    @if (FilteredRestores.length === 0 && !IsLoading) {\n      <div class=\"empty-state\">\n        <i class=\"fa-solid fa-clock-rotate-left empty-icon\"></i>\n        <h3>No restore operations found</h3>\n        @if (StatusFilter) {\n          <p>\n            Try adjusting your filters.\n          </p>\n        }\n        @if (!StatusFilter) {\n          <p>\n            No restores have been performed yet. Use the VersionHistoryEngine to restore records to a labeled state.\n          </p>\n        }\n      </div>\n    }\n  }\n  </mj-page-body>\n</mj-page-layout>\n", styles: ["/* KPI Row */\n.kpi-row {\n    display: grid;\n    grid-template-columns: repeat(4, 1fr);\n    gap: 16px;\n    margin-bottom: 24px;\n}\n\n.kpi-card {\n    display: flex;\n    align-items: center;\n    gap: 16px;\n    padding: 20px;\n    background: var(--mj-bg-surface-card);\n    border: 1px solid var(--mj-border-default);\n    border-radius: 12px;\n}\n\n.kpi-icon {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    width: 48px;\n    height: 48px;\n    border-radius: 12px;\n    font-size: 20px;\n    flex-shrink: 0;\n}\n\n.kpi-value {\n    font-size: 28px;\n    font-weight: 700;\n    color: var(--mj-text-primary);\n    line-height: 1;\n}\n\n.kpi-label {\n    font-size: 13px;\n    color: var(--mj-text-secondary);\n    margin-top: 4px;\n}\n\n/* Restore List */\n.restore-list {\n    display: flex;\n    flex-direction: column;\n    gap: 10px;\n}\n\n.restore-card {\n    background: var(--mj-bg-surface-card);\n    border: 1px solid var(--mj-border-default);\n    border-radius: 12px;\n    overflow: hidden;\n    transition: all 0.2s ease;\n}\n\n.restore-card:hover {\n    border-color: var(--mj-border-strong);\n}\n\n.restore-card.expanded {\n    box-shadow: var(--mj-shadow-md);\n}\n\n.restore-header {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    padding: 16px 20px;\n    cursor: pointer;\n}\n\n.restore-header-left {\n    display: flex;\n    align-items: center;\n    gap: 14px;\n}\n\n.status-icon {\n    font-size: 20px;\n}\n\n.status-success { color: var(--mj-status-success); }\n.status-failed { color: var(--mj-status-error); }\n.status-progress { color: var(--mj-brand-primary); }\n.status-pending { color: var(--mj-status-warning); }\n\n.restore-info {\n    display: flex;\n    flex-direction: column;\n    gap: 2px;\n}\n\n.restore-label-name {\n    font-size: 15px;\n    font-weight: 600;\n    color: var(--mj-text-primary);\n    display: flex;\n    align-items: center;\n    gap: 8px;\n}\n\n.dry-run-badge {\n    font-size: 10px;\n    font-weight: 700;\n    padding: 2px 8px;\n    background: color-mix(in srgb, var(--mj-status-warning) 10%, transparent);\n    color: var(--mj-status-warning);\n    border-radius: 8px;\n    letter-spacing: 0.5px;\n}\n\n.restore-date {\n    font-size: 13px;\n    color: var(--mj-text-secondary);\n}\n\n.restore-header-right {\n    display: flex;\n    align-items: center;\n    gap: 14px;\n}\n\n.restore-progress-bar {\n    width: 80px;\n    height: 6px;\n    background: var(--mj-bg-surface-sunken);\n    border-radius: 3px;\n    overflow: hidden;\n}\n\n.progress-fill {\n    height: 100%;\n    border-radius: 3px;\n    transition: width 0.3s ease;\n}\n\n.progress-fill.status-success { background: var(--mj-status-success); }\n.progress-fill.status-failed { background: var(--mj-status-error); }\n.progress-fill.status-progress { background: var(--mj-brand-primary); }\n.progress-fill.status-pending { background: var(--mj-status-warning); }\n\n.restore-count {\n    font-size: 13px;\n    color: var(--mj-text-secondary);\n    white-space: nowrap;\n}\n\n.expand-icon {\n    color: var(--mj-text-muted);\n    font-size: 12px;\n}\n\n/* Expanded Details */\n.restore-details {\n    padding: 0 20px 20px;\n    border-top: 1px solid var(--mj-border-default);\n}\n\n.detail-grid {\n    display: grid;\n    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));\n    gap: 16px;\n    padding-top: 16px;\n}\n\n.detail-item {\n    display: flex;\n    flex-direction: column;\n    gap: 4px;\n}\n\n.detail-label {\n    font-size: 12px;\n    font-weight: 600;\n    color: var(--mj-text-secondary);\n    text-transform: uppercase;\n    letter-spacing: 0.5px;\n}\n\n.detail-value {\n    font-size: 15px;\n    color: var(--mj-text-primary);\n    font-weight: 500;\n}\n\n.detail-mono {\n    font-family: 'SF Mono', 'Fira Code', monospace;\n    font-size: 13px;\n}\n\n.text-error {\n    color: var(--mj-status-error);\n}\n\n/* Error Log */\n.error-log {\n    margin-top: 16px;\n    border: 1px solid color-mix(in srgb, var(--mj-status-error) 20%, transparent);\n    border-radius: 8px;\n    overflow: hidden;\n}\n\n.error-log-header {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n    padding: 10px 14px;\n    background: color-mix(in srgb, var(--mj-status-error) 6%, transparent);\n    color: var(--mj-status-error);\n    font-size: 13px;\n    font-weight: 600;\n}\n\n.error-log-content {\n    margin: 0;\n    padding: 12px 14px;\n    font-size: 12px;\n    font-family: 'SF Mono', 'Fira Code', monospace;\n    color: var(--mj-text-primary);\n    background: var(--mj-bg-surface-card);\n    overflow-x: auto;\n    white-space: pre-wrap;\n    word-break: break-word;\n}\n\n/* Empty State */\n.empty-state {\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: center;\n    padding: 60px 20px;\n    text-align: center;\n}\n\n.empty-icon {\n    font-size: 48px;\n    color: var(--mj-text-muted);\n    margin-bottom: 16px;\n}\n\n.empty-state h3 {\n    font-size: 18px;\n    font-weight: 600;\n    color: var(--mj-text-primary);\n    margin: 0 0 8px 0;\n}\n\n.empty-state p {\n    font-size: 14px;\n    color: var(--mj-text-secondary);\n    margin: 0;\n    max-width: 400px;\n}\n\n@media (max-width: 768px) {\n    .kpi-row { grid-template-columns: repeat(2, 1fr); }\n}\n"] }]
    }], () => [{ type: i0.ChangeDetectorRef }], null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(VersionHistoryRestoreResourceComponent, { className: "VersionHistoryRestoreResourceComponent", filePath: "src/VersionHistory/components/restore-resource.component.ts", lineNumber: 20 }); })();
//# sourceMappingURL=restore-resource.component.js.map