var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { Component, ChangeDetectionStrategy } from '@angular/core';
import { RegisterClass } from '@memberjunction/global';
import { BaseResourceComponent } from '@memberjunction/ng-shared';
import { RunView } from '@memberjunction/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/forms";
import * as i3 from "@memberjunction/ng-shared-generic";
function CredentialsAuditResourceComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "mj-loading", 1);
} }
function CredentialsAuditResourceComponent_Conditional_2_Conditional_48_For_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 57)(1, "div", 62);
    i0.ɵɵelement(2, "div", 63)(3, "div", 64);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "span", 65);
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const data_r3 = ctx.$implicit;
    const ctx_r1 = i0.ɵɵnextContext(3);
    i0.ɵɵproperty("title", data_r3.hour + ": " + (data_r3.success + data_r3.failed) + " events");
    i0.ɵɵadvance(2);
    i0.ɵɵstyleProp("height", data_r3.success / ctx_r1.getMaxHourlyCount() * 100, "%");
    i0.ɵɵadvance();
    i0.ɵɵstyleProp("height", data_r3.failed / ctx_r1.getMaxHourlyCount() * 100, "%");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(data_r3.hour.split(":")[0]);
} }
function CredentialsAuditResourceComponent_Conditional_2_Conditional_48_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 27)(1, "div", 53)(2, "h3");
    i0.ɵɵelement(3, "i", 54);
    i0.ɵɵtext(4, " Today's Activity ");
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(5, "div", 55)(6, "div", 56);
    i0.ɵɵrepeaterCreate(7, CredentialsAuditResourceComponent_Conditional_2_Conditional_48_For_8_Template, 6, 6, "div", 57, i0.ɵɵrepeaterTrackByIdentity);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(9, "div", 58)(10, "span", 59);
    i0.ɵɵelement(11, "span", 60);
    i0.ɵɵtext(12, " Success ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(13, "span", 59);
    i0.ɵɵelement(14, "span", 61);
    i0.ɵɵtext(15, " Failed ");
    i0.ɵɵelementEnd()()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(7);
    i0.ɵɵrepeater(ctx_r1.hourlyData);
} }
function CredentialsAuditResourceComponent_Conditional_2_Conditional_54_Template(rf, ctx) { if (rf & 1) {
    const _r4 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 66);
    i0.ɵɵlistener("click", function CredentialsAuditResourceComponent_Conditional_2_Conditional_54_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.clearSearch()); });
    i0.ɵɵelement(1, "i", 67);
    i0.ɵɵelementEnd();
} }
function CredentialsAuditResourceComponent_Conditional_2_For_66_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "option", 38);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const op_r5 = ctx.$implicit;
    i0.ɵɵproperty("value", op_r5);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(op_r5);
} }
function CredentialsAuditResourceComponent_Conditional_2_Conditional_84_For_2_For_8_Conditional_15_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 85);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const log_r7 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", log_r7.Description, " ");
} }
function CredentialsAuditResourceComponent_Conditional_2_Conditional_84_For_2_For_8_Conditional_20_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 88);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const log_r7 = i0.ɵɵnextContext().$implicit;
    const ctx_r1 = i0.ɵɵnextContext(4);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", ctx_r1.getSubsystem(log_r7), " ");
} }
function CredentialsAuditResourceComponent_Conditional_2_Conditional_84_For_2_For_8_Conditional_21_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 89);
    i0.ɵɵelement(1, "i", 92);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const log_r7 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", log_r7.parsedDetails == null ? null : log_r7.parsedDetails.credentialType, " ");
} }
function CredentialsAuditResourceComponent_Conditional_2_Conditional_84_For_2_For_8_Conditional_22_Conditional_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 94)(1, "span", 96);
    i0.ɵɵtext(2, "IP Address");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "span", 97);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const log_r7 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate(log_r7.parsedDetails == null ? null : log_r7.parsedDetails.ipAddress);
} }
function CredentialsAuditResourceComponent_Conditional_2_Conditional_84_For_2_For_8_Conditional_22_Conditional_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 94)(1, "span", 96);
    i0.ɵɵtext(2, "Duration");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "span", 97);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const log_r7 = i0.ɵɵnextContext(2).$implicit;
    const ctx_r1 = i0.ɵɵnextContext(4);
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate(ctx_r1.formatDuration(log_r7.parsedDetails == null ? null : log_r7.parsedDetails.duration));
} }
function CredentialsAuditResourceComponent_Conditional_2_Conditional_84_For_2_For_8_Conditional_22_Conditional_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 94)(1, "span", 96);
    i0.ɵɵtext(2, "Credential ID");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "span", 98);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const log_r7 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate(log_r7.parsedDetails == null ? null : log_r7.parsedDetails.credentialId);
} }
function CredentialsAuditResourceComponent_Conditional_2_Conditional_84_For_2_For_8_Conditional_22_Conditional_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 95)(1, "span", 96);
    i0.ɵɵtext(2, "Error Message");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "span", 99);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const log_r7 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate(log_r7.parsedDetails == null ? null : log_r7.parsedDetails.errorMessage);
} }
function CredentialsAuditResourceComponent_Conditional_2_Conditional_84_For_2_For_8_Conditional_22_Conditional_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 95)(1, "span", 96);
    i0.ɵɵtext(2, "User Agent");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "span", 100);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const log_r7 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate(log_r7.parsedDetails == null ? null : log_r7.parsedDetails.userAgent);
} }
function CredentialsAuditResourceComponent_Conditional_2_Conditional_84_For_2_For_8_Conditional_22_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 90)(1, "div", 93);
    i0.ɵɵconditionalCreate(2, CredentialsAuditResourceComponent_Conditional_2_Conditional_84_For_2_For_8_Conditional_22_Conditional_2_Template, 5, 1, "div", 94);
    i0.ɵɵconditionalCreate(3, CredentialsAuditResourceComponent_Conditional_2_Conditional_84_For_2_For_8_Conditional_22_Conditional_3_Template, 5, 1, "div", 94);
    i0.ɵɵconditionalCreate(4, CredentialsAuditResourceComponent_Conditional_2_Conditional_84_For_2_For_8_Conditional_22_Conditional_4_Template, 5, 1, "div", 94);
    i0.ɵɵconditionalCreate(5, CredentialsAuditResourceComponent_Conditional_2_Conditional_84_For_2_For_8_Conditional_22_Conditional_5_Template, 5, 1, "div", 95);
    i0.ɵɵconditionalCreate(6, CredentialsAuditResourceComponent_Conditional_2_Conditional_84_For_2_For_8_Conditional_22_Conditional_6_Template, 5, 1, "div", 95);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const log_r7 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵconditional((log_r7.parsedDetails == null ? null : log_r7.parsedDetails.ipAddress) ? 2 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional((log_r7.parsedDetails == null ? null : log_r7.parsedDetails.duration) ? 3 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional((log_r7.parsedDetails == null ? null : log_r7.parsedDetails.credentialId) ? 4 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional((log_r7.parsedDetails == null ? null : log_r7.parsedDetails.errorMessage) ? 5 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional((log_r7.parsedDetails == null ? null : log_r7.parsedDetails.userAgent) ? 6 : -1);
} }
function CredentialsAuditResourceComponent_Conditional_2_Conditional_84_For_2_For_8_Template(rf, ctx) { if (rf & 1) {
    const _r6 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 74)(1, "div", 75);
    i0.ɵɵelement(2, "div", 76);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "div", 77);
    i0.ɵɵlistener("click", function CredentialsAuditResourceComponent_Conditional_2_Conditional_84_For_2_For_8_Template_div_click_3_listener() { const log_r7 = i0.ɵɵrestoreView(_r6).$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.toggleLogExpand(log_r7.ID)); });
    i0.ɵɵelementStart(4, "div", 78)(5, "div", 79);
    i0.ɵɵelement(6, "i");
    i0.ɵɵelementStart(7, "span", 80);
    i0.ɵɵtext(8);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(9, "div", 81);
    i0.ɵɵtext(10);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(11, "div", 82)(12, "div", 83);
    i0.ɵɵelement(13, "i", 84);
    i0.ɵɵtext(14);
    i0.ɵɵelementEnd();
    i0.ɵɵconditionalCreate(15, CredentialsAuditResourceComponent_Conditional_2_Conditional_84_For_2_For_8_Conditional_15_Template, 2, 1, "div", 85);
    i0.ɵɵelementStart(16, "div", 86)(17, "span", 87);
    i0.ɵɵelement(18, "i");
    i0.ɵɵtext(19);
    i0.ɵɵelementEnd();
    i0.ɵɵconditionalCreate(20, CredentialsAuditResourceComponent_Conditional_2_Conditional_84_For_2_For_8_Conditional_20_Template, 2, 1, "span", 88);
    i0.ɵɵconditionalCreate(21, CredentialsAuditResourceComponent_Conditional_2_Conditional_84_For_2_For_8_Conditional_21_Template, 3, 1, "span", 89);
    i0.ɵɵelementEnd()();
    i0.ɵɵconditionalCreate(22, CredentialsAuditResourceComponent_Conditional_2_Conditional_84_For_2_For_8_Conditional_22_Template, 7, 5, "div", 90);
    i0.ɵɵelementStart(23, "button", 91);
    i0.ɵɵelement(24, "i");
    i0.ɵɵelementEnd()()();
} if (rf & 2) {
    const log_r7 = ctx.$implicit;
    const ctx_r1 = i0.ɵɵnextContext(4);
    i0.ɵɵclassProp("expanded", ctx_r1.expandedLogId === log_r7.ID)("failed", log_r7.Status === "Failed");
    i0.ɵɵadvance(2);
    i0.ɵɵstyleProp("background-color", ctx_r1.getOperationColor(ctx_r1.getOperationType(log_r7)));
    i0.ɵɵadvance(4);
    i0.ɵɵclassMap(ctx_r1.getOperationIcon(ctx_r1.getOperationType(log_r7)));
    i0.ɵɵstyleProp("color", ctx_r1.getOperationColor(ctx_r1.getOperationType(log_r7)));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(ctx_r1.getOperationType(log_r7));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(ctx_r1.formatTime(log_r7.__mj_CreatedAt));
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate1(" ", log_r7.User || "Unknown", " ");
    i0.ɵɵadvance();
    i0.ɵɵconditional(log_r7.Description ? 15 : -1);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngClass", ctx_r1.getStatusClass(log_r7.Status));
    i0.ɵɵadvance();
    i0.ɵɵclassMap(log_r7.Status === "Success" ? "fa-solid fa-check" : "fa-solid fa-times");
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", log_r7.Status, " ");
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r1.getSubsystem(log_r7) ? 20 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional((log_r7.parsedDetails == null ? null : log_r7.parsedDetails.credentialType) ? 21 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r1.expandedLogId === log_r7.ID ? 22 : -1);
    i0.ɵɵadvance(2);
    i0.ɵɵclassMap(ctx_r1.expandedLogId === log_r7.ID ? "fa-solid fa-chevron-up" : "fa-solid fa-chevron-down");
} }
function CredentialsAuditResourceComponent_Conditional_2_Conditional_84_For_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 68)(1, "div", 69)(2, "span", 70);
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "span", 71);
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(6, "div", 72);
    i0.ɵɵrepeaterCreate(7, CredentialsAuditResourceComponent_Conditional_2_Conditional_84_For_2_For_8_Template, 25, 23, "div", 73, i0.ɵɵrepeaterTrackByIdentity);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const group_r8 = ctx.$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(group_r8.displayDate);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1("", group_r8.logs.length, " events");
    i0.ɵɵadvance(2);
    i0.ɵɵrepeater(group_r8.logs);
} }
function CredentialsAuditResourceComponent_Conditional_2_Conditional_84_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 50);
    i0.ɵɵrepeaterCreate(1, CredentialsAuditResourceComponent_Conditional_2_Conditional_84_For_2_Template, 9, 2, "div", 68, i0.ɵɵrepeaterTrackByIdentity);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵrepeater(ctx_r1.timelineGroups);
} }
function CredentialsAuditResourceComponent_Conditional_2_Conditional_85_For_18_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr")(1, "td", 103);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "td", 104);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "td", 105)(6, "span", 106);
    i0.ɵɵelement(7, "i");
    i0.ɵɵtext(8);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(9, "td", 107);
    i0.ɵɵtext(10);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(11, "td", 108);
    i0.ɵɵtext(12);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(13, "td", 109)(14, "span", 87);
    i0.ɵɵelement(15, "i");
    i0.ɵɵtext(16);
    i0.ɵɵelementEnd()()();
} if (rf & 2) {
    const log_r9 = ctx.$implicit;
    const ctx_r1 = i0.ɵɵnextContext(3);
    i0.ɵɵclassProp("failed-row", log_r9.Status === "Failed");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(ctx_r1.formatDate(log_r9.__mj_CreatedAt));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(log_r9.User || "Unknown");
    i0.ɵɵadvance(2);
    i0.ɵɵstyleProp("background-color", ctx_r1.getOperationColor(ctx_r1.getOperationType(log_r9)) + "20")("color", ctx_r1.getOperationColor(ctx_r1.getOperationType(log_r9)));
    i0.ɵɵadvance();
    i0.ɵɵclassMap(ctx_r1.getOperationIcon(ctx_r1.getOperationType(log_r9)));
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", ctx_r1.getOperationType(log_r9), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(log_r9.Description || "-");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(ctx_r1.getSubsystem(log_r9) || "-");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngClass", ctx_r1.getStatusClass(log_r9.Status));
    i0.ɵɵadvance();
    i0.ɵɵclassMap(log_r9.Status === "Success" ? "fa-solid fa-check" : "fa-solid fa-times");
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", log_r9.Status, " ");
} }
function CredentialsAuditResourceComponent_Conditional_2_Conditional_85_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 51)(1, "table", 101)(2, "thead")(3, "tr")(4, "th");
    i0.ɵɵtext(5, "Timestamp");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "th");
    i0.ɵɵtext(7, "User");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(8, "th");
    i0.ɵɵtext(9, "Operation");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(10, "th");
    i0.ɵɵtext(11, "Description");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(12, "th");
    i0.ɵɵtext(13, "Subsystem");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(14, "th");
    i0.ɵɵtext(15, "Status");
    i0.ɵɵelementEnd()()();
    i0.ɵɵelementStart(16, "tbody");
    i0.ɵɵrepeaterCreate(17, CredentialsAuditResourceComponent_Conditional_2_Conditional_85_For_18_Template, 17, 17, "tr", 102, i0.ɵɵrepeaterTrackByIdentity);
    i0.ɵɵelementEnd()()();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(17);
    i0.ɵɵrepeater(ctx_r1.filteredLogs);
} }
function CredentialsAuditResourceComponent_Conditional_2_Conditional_86_Conditional_5_Template(rf, ctx) { if (rf & 1) {
    const _r10 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "p");
    i0.ɵɵtext(1, " No events match your current filters. ");
    i0.ɵɵelementStart(2, "button", 111);
    i0.ɵɵlistener("click", function CredentialsAuditResourceComponent_Conditional_2_Conditional_86_Conditional_5_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(3); ctx_r1.searchText = ""; ctx_r1.selectedStatus = ""; ctx_r1.selectedOperation = ""; return i0.ɵɵresetView(ctx_r1.applyFilters()); });
    i0.ɵɵtext(3, "Clear filters");
    i0.ɵɵelementEnd()();
} }
function CredentialsAuditResourceComponent_Conditional_2_Conditional_86_Conditional_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "p");
    i0.ɵɵtext(1, " No credential access events in the selected time range. ");
    i0.ɵɵelementEnd();
} }
function CredentialsAuditResourceComponent_Conditional_2_Conditional_86_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 52)(1, "div", 110);
    i0.ɵɵelement(2, "i", 14);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "h3");
    i0.ɵɵtext(4, "No Audit Logs");
    i0.ɵɵelementEnd();
    i0.ɵɵconditionalCreate(5, CredentialsAuditResourceComponent_Conditional_2_Conditional_86_Conditional_5_Template, 4, 0, "p");
    i0.ɵɵconditionalCreate(6, CredentialsAuditResourceComponent_Conditional_2_Conditional_86_Conditional_6_Template, 2, 0, "p");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(5);
    i0.ɵɵconditional(ctx_r1.searchText || ctx_r1.selectedStatus || ctx_r1.selectedOperation ? 5 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(!ctx_r1.searchText && !ctx_r1.selectedStatus && !ctx_r1.selectedOperation ? 6 : -1);
} }
function CredentialsAuditResourceComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
    const _r1 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 2)(1, "div", 3)(2, "h2", 4);
    i0.ɵɵtext(3, "Audit Trail");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "p", 5);
    i0.ɵɵtext(5, "Credential access and modification history");
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(6, "div", 6)(7, "button", 7);
    i0.ɵɵlistener("click", function CredentialsAuditResourceComponent_Conditional_2_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.exportToCSV()); });
    i0.ɵɵelement(8, "i", 8);
    i0.ɵɵelementStart(9, "span");
    i0.ɵɵtext(10, "Export");
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(11, "button", 9);
    i0.ɵɵlistener("click", function CredentialsAuditResourceComponent_Conditional_2_Template_button_click_11_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.refresh()); });
    i0.ɵɵelement(12, "i", 10);
    i0.ɵɵelementEnd()()();
    i0.ɵɵelementStart(13, "div", 11)(14, "div", 12)(15, "div", 13);
    i0.ɵɵelement(16, "i", 14);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(17, "div", 15)(18, "div", 16);
    i0.ɵɵtext(19);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(20, "div", 17);
    i0.ɵɵtext(21, "Total Events");
    i0.ɵɵelementEnd()()();
    i0.ɵɵelementStart(22, "div", 12)(23, "div", 18);
    i0.ɵɵelement(24, "i", 19);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(25, "div", 15)(26, "div", 20);
    i0.ɵɵtext(27);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(28, "div", 17);
    i0.ɵɵtext(29, "Successful");
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(30, "div", 21);
    i0.ɵɵtext(31);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(32, "div", 12)(33, "div", 22);
    i0.ɵɵelement(34, "i", 23);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(35, "div", 15)(36, "div", 24);
    i0.ɵɵtext(37);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(38, "div", 17);
    i0.ɵɵtext(39, "Failed");
    i0.ɵɵelementEnd()()();
    i0.ɵɵelementStart(40, "div", 12)(41, "div", 25);
    i0.ɵɵelement(42, "i", 26);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(43, "div", 15)(44, "div", 16);
    i0.ɵɵtext(45);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(46, "div", 17);
    i0.ɵɵtext(47, "Unique Users");
    i0.ɵɵelementEnd()()()();
    i0.ɵɵconditionalCreate(48, CredentialsAuditResourceComponent_Conditional_2_Conditional_48_Template, 16, 0, "div", 27);
    i0.ɵɵelementStart(49, "div", 28)(50, "div", 29)(51, "div", 30);
    i0.ɵɵelement(52, "i", 31);
    i0.ɵɵelementStart(53, "input", 32);
    i0.ɵɵlistener("input", function CredentialsAuditResourceComponent_Conditional_2_Template_input_input_53_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSearchChange($event.target.value)); });
    i0.ɵɵelementEnd();
    i0.ɵɵconditionalCreate(54, CredentialsAuditResourceComponent_Conditional_2_Conditional_54_Template, 2, 0, "button", 33);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(55, "select", 34);
    i0.ɵɵlistener("change", function CredentialsAuditResourceComponent_Conditional_2_Template_select_change_55_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onStatusFilterChange($event.target.value)); });
    i0.ɵɵelementStart(56, "option", 35);
    i0.ɵɵtext(57, "All Statuses");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(58, "option", 36);
    i0.ɵɵtext(59, "Success");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(60, "option", 37);
    i0.ɵɵtext(61, "Failed");
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(62, "select", 34);
    i0.ɵɵlistener("change", function CredentialsAuditResourceComponent_Conditional_2_Template_select_change_62_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onOperationFilterChange($event.target.value)); });
    i0.ɵɵelementStart(63, "option", 35);
    i0.ɵɵtext(64, "All Operations");
    i0.ɵɵelementEnd();
    i0.ɵɵrepeaterCreate(65, CredentialsAuditResourceComponent_Conditional_2_For_66_Template, 2, 2, "option", 38, i0.ɵɵrepeaterTrackByIdentity);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(67, "select", 34);
    i0.ɵɵlistener("change", function CredentialsAuditResourceComponent_Conditional_2_Template_select_change_67_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onDateRangeChange($event.target.value)); });
    i0.ɵɵelementStart(68, "option", 39);
    i0.ɵɵtext(69, "Last 24 hours");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(70, "option", 40);
    i0.ɵɵtext(71, "Last 7 days");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(72, "option", 41);
    i0.ɵɵtext(73, "Last 30 days");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(74, "option", 42);
    i0.ɵɵtext(75, "Last 90 days");
    i0.ɵɵelementEnd()()();
    i0.ɵɵelementStart(76, "div", 43)(77, "div", 44);
    i0.ɵɵtext(78);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(79, "div", 45)(80, "button", 46);
    i0.ɵɵlistener("click", function CredentialsAuditResourceComponent_Conditional_2_Template_button_click_80_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.setViewMode("timeline")); });
    i0.ɵɵelement(81, "i", 47);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(82, "button", 48);
    i0.ɵɵlistener("click", function CredentialsAuditResourceComponent_Conditional_2_Template_button_click_82_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.setViewMode("table")); });
    i0.ɵɵelement(83, "i", 49);
    i0.ɵɵelementEnd()()()();
    i0.ɵɵconditionalCreate(84, CredentialsAuditResourceComponent_Conditional_2_Conditional_84_Template, 3, 0, "div", 50);
    i0.ɵɵconditionalCreate(85, CredentialsAuditResourceComponent_Conditional_2_Conditional_85_Template, 19, 0, "div", 51);
    i0.ɵɵconditionalCreate(86, CredentialsAuditResourceComponent_Conditional_2_Conditional_86_Template, 7, 2, "div", 52);
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(19);
    i0.ɵɵtextInterpolate(ctx_r1.auditLogs.length);
    i0.ɵɵadvance(8);
    i0.ɵɵtextInterpolate(ctx_r1.getSuccessCount());
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate1("", ctx_r1.getSuccessRate(), "%");
    i0.ɵɵadvance(6);
    i0.ɵɵtextInterpolate(ctx_r1.getFailedCount());
    i0.ɵɵadvance(8);
    i0.ɵɵtextInterpolate(ctx_r1.getUniqueUserCount());
    i0.ɵɵadvance(3);
    i0.ɵɵconditional(ctx_r1.hourlyData.length > 0 ? 48 : -1);
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("value", ctx_r1.searchText);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r1.searchText ? 54 : -1);
    i0.ɵɵadvance();
    i0.ɵɵproperty("value", ctx_r1.selectedStatus);
    i0.ɵɵadvance(7);
    i0.ɵɵproperty("value", ctx_r1.selectedOperation);
    i0.ɵɵadvance(3);
    i0.ɵɵrepeater(ctx_r1.getOperationList());
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("value", ctx_r1.dateRange);
    i0.ɵɵadvance(11);
    i0.ɵɵtextInterpolate2(" ", ctx_r1.filteredLogs.length, " of ", ctx_r1.auditLogs.length, " events ");
    i0.ɵɵadvance(2);
    i0.ɵɵclassProp("active", ctx_r1.viewMode === "timeline");
    i0.ɵɵadvance(2);
    i0.ɵɵclassProp("active", ctx_r1.viewMode === "table");
    i0.ɵɵadvance(2);
    i0.ɵɵconditional(ctx_r1.viewMode === "timeline" && ctx_r1.timelineGroups.length > 0 ? 84 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r1.viewMode === "table" && ctx_r1.filteredLogs.length > 0 ? 85 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r1.filteredLogs.length === 0 ? 86 : -1);
} }
// The Credential Access AuditLogType ID from metadata
const CREDENTIAL_ACCESS_AUDIT_LOG_TYPE_ID = 'E8D4D100-E785-42D3-997F-ECFF3B0BCFC0';
let CredentialsAuditResourceComponent = class CredentialsAuditResourceComponent extends BaseResourceComponent {
    cdr;
    isLoading = true;
    auditLogs = [];
    filteredLogs = [];
    timelineGroups = [];
    selectedStatus = '';
    selectedOperation = '';
    dateRange = '7'; // days
    searchText = '';
    viewMode = 'timeline';
    expandedLogId = null;
    // Chart data
    hourlyData = [];
    operationCounts = new Map();
    constructor(cdr) {
        super();
        this.cdr = cdr;
    }
    ngOnInit() {
        this.loadData();
    }
    ngOnDestroy() {
        // Cleanup if needed
    }
    async GetResourceDisplayName(data) {
        return 'Audit Trail';
    }
    async GetResourceIconClass(data) {
        return 'fa-solid fa-clipboard-list';
    }
    async loadData() {
        try {
            this.isLoading = true;
            this.cdr.markForCheck();
            const rv = new RunView();
            // Calculate date filter
            const startDate = new Date();
            startDate.setDate(startDate.getDate() - parseInt(this.dateRange, 10));
            const dateFilter = `AuditLogTypeID = '${CREDENTIAL_ACCESS_AUDIT_LOG_TYPE_ID}' AND __mj_CreatedAt >= '${startDate.toISOString()}'`;
            const result = await rv.RunView({
                EntityName: 'MJ: Audit Logs',
                ExtraFilter: dateFilter,
                OrderBy: '__mj_CreatedAt DESC',
                MaxRows: 500,
                ResultType: 'entity_object'
            });
            if (result.Success) {
                this.auditLogs = result.Results;
                this.parseAllDetails();
                this.applyFilters();
                this.buildChartData();
            }
        }
        catch (error) {
            console.error('Error loading audit logs:', error);
        }
        finally {
            this.isLoading = false;
            this.NotifyLoadComplete();
            this.cdr.markForCheck();
        }
    }
    parseAllDetails() {
        for (const log of this.auditLogs) {
            log.parsedDetails = this.parseDetails(log);
        }
    }
    parseDetails(log) {
        try {
            if (log.Details) {
                return JSON.parse(log.Details);
            }
        }
        catch (e) {
            // Ignore parse errors
        }
        return {};
    }
    onStatusFilterChange(status) {
        this.selectedStatus = status;
        this.applyFilters();
    }
    onOperationFilterChange(operation) {
        this.selectedOperation = operation;
        this.applyFilters();
    }
    onDateRangeChange(days) {
        this.dateRange = days;
        this.loadData();
    }
    onSearchChange(value) {
        this.searchText = value;
        this.applyFilters();
    }
    clearSearch() {
        this.searchText = '';
        this.applyFilters();
    }
    setViewMode(mode) {
        this.viewMode = mode;
        this.cdr.markForCheck();
    }
    toggleLogExpand(logId) {
        this.expandedLogId = this.expandedLogId === logId ? null : logId;
        this.cdr.markForCheck();
    }
    applyFilters() {
        let filtered = [...this.auditLogs];
        if (this.selectedStatus) {
            filtered = filtered.filter(log => log.Status === this.selectedStatus);
        }
        if (this.selectedOperation) {
            filtered = filtered.filter(log => {
                const op = log.parsedDetails?.operation || 'Access';
                return op === this.selectedOperation;
            });
        }
        if (this.searchText) {
            const searchLower = this.searchText.toLowerCase();
            filtered = filtered.filter(log => {
                const user = (log.User || '').toLowerCase();
                const desc = (log.Description || '').toLowerCase();
                const subsystem = (log.parsedDetails?.subsystem || '').toLowerCase();
                const credType = (log.parsedDetails?.credentialType || '').toLowerCase();
                return user.includes(searchLower) ||
                    desc.includes(searchLower) ||
                    subsystem.includes(searchLower) ||
                    credType.includes(searchLower);
            });
        }
        this.filteredLogs = filtered;
        this.buildTimelineGroups();
        this.cdr.markForCheck();
    }
    buildTimelineGroups() {
        const groups = new Map();
        for (const log of this.filteredLogs) {
            const date = new Date(log.__mj_CreatedAt);
            const dateKey = date.toISOString().split('T')[0];
            if (!groups.has(dateKey)) {
                groups.set(dateKey, []);
            }
            groups.get(dateKey).push(log);
        }
        this.timelineGroups = Array.from(groups.entries())
            .sort((a, b) => b[0].localeCompare(a[0]))
            .map(([date, logs]) => ({
            date,
            displayDate: this.formatGroupDate(date),
            logs
        }));
    }
    formatGroupDate(dateString) {
        const date = new Date(dateString);
        const today = new Date();
        const yesterday = new Date(today);
        yesterday.setDate(yesterday.getDate() - 1);
        if (date.toDateString() === today.toDateString()) {
            return 'Today';
        }
        else if (date.toDateString() === yesterday.toDateString()) {
            return 'Yesterday';
        }
        else {
            return date.toLocaleDateString('en-US', {
                weekday: 'long',
                month: 'long',
                day: 'numeric',
                year: date.getFullYear() !== today.getFullYear() ? 'numeric' : undefined
            });
        }
    }
    buildChartData() {
        // Build hourly distribution for today
        const hourCounts = {};
        const today = new Date().toDateString();
        for (let i = 0; i < 24; i++) {
            const hour = i.toString().padStart(2, '0') + ':00';
            hourCounts[hour] = { success: 0, failed: 0 };
        }
        for (const log of this.auditLogs) {
            const date = new Date(log.__mj_CreatedAt);
            if (date.toDateString() === today) {
                const hour = date.getHours().toString().padStart(2, '0') + ':00';
                if (log.Status === 'Success') {
                    hourCounts[hour].success++;
                }
                else {
                    hourCounts[hour].failed++;
                }
            }
        }
        this.hourlyData = Object.entries(hourCounts).map(([hour, counts]) => ({
            hour,
            ...counts
        }));
        // Build operation counts
        this.operationCounts.clear();
        for (const log of this.auditLogs) {
            const op = log.parsedDetails?.operation || 'Access';
            this.operationCounts.set(op, (this.operationCounts.get(op) || 0) + 1);
        }
    }
    getMaxHourlyCount() {
        return Math.max(...this.hourlyData.map(d => d.success + d.failed), 1);
    }
    getOperationList() {
        return Array.from(this.operationCounts.keys());
    }
    getStatusClass(status) {
        switch (status) {
            case 'Success': return 'success';
            case 'Failed': return 'failed';
            default: return 'unknown';
        }
    }
    getOperationType(log) {
        return log.parsedDetails?.operation || 'Access';
    }
    getSubsystem(log) {
        return log.parsedDetails?.subsystem || '';
    }
    getOperationIcon(operation) {
        switch (operation.toLowerCase()) {
            case 'access': return 'fa-solid fa-eye';
            case 'create': return 'fa-solid fa-plus';
            case 'update': return 'fa-solid fa-pen';
            case 'delete': return 'fa-solid fa-trash';
            case 'rotate': return 'fa-solid fa-rotate';
            case 'validate': return 'fa-solid fa-check-circle';
            default: return 'fa-solid fa-circle';
        }
    }
    getOperationColor(operation) {
        switch (operation.toLowerCase()) {
            case 'access': return 'var(--mj-brand-primary)';
            case 'create': return 'var(--mj-status-success)';
            case 'update': return 'var(--mj-status-warning)';
            case 'delete': return 'var(--mj-status-error)';
            case 'rotate': return 'var(--mj-brand-primary)';
            case 'validate': return 'var(--mj-brand-primary)';
            default: return 'var(--mj-text-secondary)';
        }
    }
    formatDate(date) {
        if (!date)
            return '';
        const d = new Date(date);
        return d.toLocaleDateString('en-US', {
            month: 'short',
            day: 'numeric',
            year: 'numeric',
            hour: '2-digit',
            minute: '2-digit',
            second: '2-digit'
        });
    }
    formatTime(date) {
        if (!date)
            return '';
        const d = new Date(date);
        return d.toLocaleTimeString('en-US', {
            hour: '2-digit',
            minute: '2-digit',
            second: '2-digit'
        });
    }
    formatDuration(ms) {
        if (!ms)
            return '-';
        if (ms < 1000)
            return `${ms}ms`;
        return `${(ms / 1000).toFixed(2)}s`;
    }
    refresh() {
        this.loadData();
    }
    getSuccessCount() {
        return this.auditLogs.filter(log => log.Status === 'Success').length;
    }
    getFailedCount() {
        return this.auditLogs.filter(log => log.Status === 'Failed').length;
    }
    getSuccessRate() {
        if (this.auditLogs.length === 0)
            return 0;
        return Math.round((this.getSuccessCount() / this.auditLogs.length) * 100);
    }
    getUniqueUserCount() {
        const users = new Set(this.auditLogs.map(log => log.User).filter(Boolean));
        return users.size;
    }
    exportToCSV() {
        const headers = ['Timestamp', 'User', 'Operation', 'Status', 'Description', 'Subsystem', 'Credential Type'];
        const rows = this.filteredLogs.map(log => [
            this.formatDate(log.__mj_CreatedAt),
            log.User || '',
            this.getOperationType(log),
            log.Status || '',
            log.Description || '',
            this.getSubsystem(log),
            log.parsedDetails?.credentialType || ''
        ]);
        const csvContent = [
            headers.join(','),
            ...rows.map(row => row.map(cell => `"${cell.replace(/"/g, '""')}"`).join(','))
        ].join('\n');
        const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
        const link = document.createElement('a');
        link.href = URL.createObjectURL(blob);
        link.download = `credential-audit-log-${new Date().toISOString().split('T')[0]}.csv`;
        link.click();
    }
    static ɵfac = function CredentialsAuditResourceComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CredentialsAuditResourceComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
    static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CredentialsAuditResourceComponent, selectors: [["mj-credentials-audit-resource"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [[1, "audit-container"], ["text", "Loading audit logs..."], [1, "audit-header"], [1, "header-info"], [1, "audit-title"], [1, "audit-subtitle"], [1, "header-actions"], ["title", "Export to CSV", 1, "btn-secondary", 3, "click"], [1, "fa-solid", "fa-download"], ["title", "Refresh", 1, "btn-icon", 3, "click"], [1, "fa-solid", "fa-refresh"], [1, "stats-grid"], [1, "stat-card"], [1, "stat-icon", "total"], [1, "fa-solid", "fa-clipboard-list"], [1, "stat-content"], [1, "stat-value"], [1, "stat-label"], [1, "stat-icon", "success"], [1, "fa-solid", "fa-check-circle"], [1, "stat-value", "success"], [1, "stat-rate"], [1, "stat-icon", "failed"], [1, "fa-solid", "fa-times-circle"], [1, "stat-value", "failed"], [1, "stat-icon", "users"], [1, "fa-solid", "fa-users"], [1, "activity-chart"], [1, "toolbar"], [1, "toolbar-left"], [1, "search-container"], [1, "fa-solid", "fa-search"], ["type", "text", "placeholder", "Search logs...", 3, "input", "value"], [1, "search-clear"], [1, "filter-select", 3, "change", "value"], ["value", ""], ["value", "Success"], ["value", "Failed"], [3, "value"], ["value", "1"], ["value", "7"], ["value", "30"], ["value", "90"], [1, "toolbar-right"], [1, "results-info"], [1, "view-toggle"], ["title", "Timeline View", 1, "toggle-btn", 3, "click"], [1, "fa-solid", "fa-timeline"], ["title", "Table View", 1, "toggle-btn", 3, "click"], [1, "fa-solid", "fa-table"], [1, "timeline-container"], [1, "audit-table-container"], [1, "empty-state"], [1, "chart-header"], [1, "fa-solid", "fa-chart-bar"], [1, "chart-container"], [1, "chart-bars"], [1, "chart-bar-wrapper", 3, "title"], [1, "chart-legend"], [1, "legend-item"], [1, "legend-color", "success"], [1, "legend-color", "failed"], [1, "chart-bar"], [1, "bar-segment", "success"], [1, "bar-segment", "failed"], [1, "chart-label"], [1, "search-clear", 3, "click"], [1, "fa-solid", "fa-times"], [1, "timeline-group"], [1, "timeline-date"], [1, "date-label"], [1, "date-count"], [1, "timeline-items"], [1, "timeline-item", 3, "expanded", "failed"], [1, "timeline-item"], [1, "timeline-line"], [1, "timeline-dot"], [1, "timeline-content", 3, "click"], [1, "timeline-header"], [1, "timeline-operation"], [1, "operation-name"], [1, "timeline-time"], [1, "timeline-body"], [1, "timeline-user"], [1, "fa-solid", "fa-user"], [1, "timeline-description"], [1, "timeline-badges"], [1, "status-badge", 3, "ngClass"], [1, "subsystem-badge"], [1, "type-badge"], [1, "timeline-details"], [1, "expand-btn"], [1, "fa-solid", "fa-key"], [1, "detail-grid"], [1, "detail-item"], [1, "detail-item", "full-width"], [1, "detail-label"], [1, "detail-value"], [1, "detail-value", "mono"], [1, "detail-value", "error"], [1, "detail-value", "mono", "small"], [1, "audit-table"], [3, "failed-row"], [1, "timestamp"], [1, "user"], [1, "operation"], [1, "operation-badge"], [1, "description"], [1, "subsystem"], [1, "status"], [1, "empty-icon"], [1, "btn-link", 3, "click"]], template: function CredentialsAuditResourceComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0);
            i0.ɵɵconditionalCreate(1, CredentialsAuditResourceComponent_Conditional_1_Template, 1, 0, "mj-loading", 1);
            i0.ɵɵconditionalCreate(2, CredentialsAuditResourceComponent_Conditional_2_Template, 87, 20);
            i0.ɵɵelementEnd();
        } if (rf & 2) {
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.isLoading ? 1 : -1);
            i0.ɵɵadvance();
            i0.ɵɵconditional(!ctx.isLoading ? 2 : -1);
        } }, dependencies: [i1.NgClass, i2.NgSelectOption, i2.ɵNgSelectMultipleOption, i3.LoadingComponent], styles: [".audit-container[_ngcontent-%COMP%] {\n    padding: 24px;\n    height: 100%;\n    overflow-y: auto;\n    background: var(--mj-bg-page);\n}\n\n\n\n.audit-header[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: flex-start;\n    justify-content: space-between;\n    margin-bottom: 24px;\n}\n\n.header-info[_ngcontent-%COMP%] {\n    display: flex;\n    flex-direction: column;\n    gap: 4px;\n}\n\n.audit-title[_ngcontent-%COMP%] {\n    font-size: 24px;\n    font-weight: 700;\n    color: var(--mj-text-primary);\n    margin: 0;\n}\n\n.audit-subtitle[_ngcontent-%COMP%] {\n    font-size: 14px;\n    color: var(--mj-text-secondary);\n    margin: 0;\n}\n\n.header-actions[_ngcontent-%COMP%] {\n    display: flex;\n    gap: 8px;\n}\n\n.btn-secondary[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n    padding: 10px 16px;\n    background: var(--mj-bg-surface);\n    border: 1px solid var(--mj-border-default);\n    border-radius: 8px;\n    font-size: 13px;\n    font-weight: 500;\n    color: var(--mj-text-primary);\n    cursor: pointer;\n    transition: all 0.2s ease;\n}\n\n.btn-secondary[_ngcontent-%COMP%]:hover {\n    background: var(--mj-bg-surface-card);\n    border-color: var(--mj-brand-primary);\n    color: var(--mj-brand-primary);\n}\n\n.btn-icon[_ngcontent-%COMP%] {\n    width: 40px;\n    height: 40px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    background: var(--mj-bg-surface);\n    border: 1px solid var(--mj-border-default);\n    border-radius: 8px;\n    color: var(--mj-text-secondary);\n    cursor: pointer;\n    transition: all 0.2s ease;\n}\n\n.btn-icon[_ngcontent-%COMP%]:hover {\n    background: var(--mj-bg-surface-card);\n    color: var(--mj-brand-primary);\n}\n\n\n\n.stats-grid[_ngcontent-%COMP%] {\n    display: grid;\n    grid-template-columns: repeat(4, 1fr);\n    gap: 16px;\n    margin-bottom: 24px;\n}\n\n.stat-card[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 16px;\n    padding: 20px;\n    background: var(--mj-bg-surface);\n    border-radius: 12px;\n    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);\n    position: relative;\n}\n\n.stat-icon[_ngcontent-%COMP%] {\n    width: 48px;\n    height: 48px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    border-radius: 12px;\n    flex-shrink: 0;\n}\n\n.stat-icon.total[_ngcontent-%COMP%] {\n    background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n    color: var(--mj-brand-primary);\n}\n\n.stat-icon.success[_ngcontent-%COMP%] {\n    background: color-mix(in srgb, var(--mj-status-success) 10%, transparent);\n    color: var(--mj-status-success);\n}\n\n.stat-icon.failed[_ngcontent-%COMP%] {\n    background: color-mix(in srgb, var(--mj-status-error) 10%, transparent);\n    color: var(--mj-status-error);\n}\n\n.stat-icon.users[_ngcontent-%COMP%] {\n    background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n    color: var(--mj-brand-primary);\n}\n\n.stat-icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n    font-size: 20px;\n}\n\n.stat-content[_ngcontent-%COMP%] {\n    flex: 1;\n}\n\n.stat-value[_ngcontent-%COMP%] {\n    font-size: 28px;\n    font-weight: 700;\n    color: var(--mj-text-primary);\n    line-height: 1;\n}\n\n.stat-value.success[_ngcontent-%COMP%] {\n    color: var(--mj-status-success);\n}\n\n.stat-value.failed[_ngcontent-%COMP%] {\n    color: var(--mj-status-error);\n}\n\n.stat-label[_ngcontent-%COMP%] {\n    font-size: 13px;\n    color: var(--mj-text-secondary);\n    margin-top: 4px;\n}\n\n.stat-rate[_ngcontent-%COMP%] {\n    position: absolute;\n    top: 12px;\n    right: 16px;\n    font-size: 12px;\n    font-weight: 600;\n    color: var(--mj-status-success);\n    background: color-mix(in srgb, var(--mj-status-success) 10%, transparent);\n    padding: 4px 8px;\n    border-radius: 8px;\n}\n\n\n\n.activity-chart[_ngcontent-%COMP%] {\n    background: var(--mj-bg-surface);\n    border-radius: 12px;\n    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);\n    padding: 20px;\n    margin-bottom: 20px;\n}\n\n.chart-header[_ngcontent-%COMP%] {\n    margin-bottom: 16px;\n}\n\n.chart-header[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n    font-size: 14px;\n    font-weight: 600;\n    color: var(--mj-text-primary);\n    margin: 0;\n}\n\n.chart-header[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n    color: var(--mj-brand-primary);\n}\n\n.chart-container[_ngcontent-%COMP%] {\n    height: 120px;\n    padding: 0 4px;\n}\n\n.chart-bars[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: flex-end;\n    height: 100%;\n    gap: 2px;\n}\n\n.chart-bar-wrapper[_ngcontent-%COMP%] {\n    flex: 1;\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    height: 100%;\n}\n\n.chart-bar[_ngcontent-%COMP%] {\n    flex: 1;\n    width: 100%;\n    max-width: 24px;\n    display: flex;\n    flex-direction: column-reverse;\n    border-radius: 4px 4px 0 0;\n    overflow: hidden;\n    background: var(--mj-bg-surface-sunken);\n}\n\n.bar-segment[_ngcontent-%COMP%] {\n    width: 100%;\n    transition: height 0.3s ease;\n}\n\n.bar-segment.success[_ngcontent-%COMP%] {\n    background: var(--mj-status-success);\n}\n\n.bar-segment.failed[_ngcontent-%COMP%] {\n    background: var(--mj-status-error);\n}\n\n.chart-label[_ngcontent-%COMP%] {\n    font-size: 10px;\n    color: var(--mj-text-disabled);\n    margin-top: 4px;\n}\n\n.chart-legend[_ngcontent-%COMP%] {\n    display: flex;\n    justify-content: center;\n    gap: 24px;\n    margin-top: 12px;\n    padding-top: 12px;\n    border-top: 1px solid var(--mj-bg-surface-sunken);\n}\n\n.legend-item[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 6px;\n    font-size: 12px;\n    color: var(--mj-text-secondary);\n}\n\n.legend-color[_ngcontent-%COMP%] {\n    width: 12px;\n    height: 12px;\n    border-radius: 3px;\n}\n\n.legend-color.success[_ngcontent-%COMP%] {\n    background: var(--mj-status-success);\n}\n\n.legend-color.failed[_ngcontent-%COMP%] {\n    background: var(--mj-status-error);\n}\n\n\n\n.toolbar[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    padding: 12px 16px;\n    background: var(--mj-bg-surface);\n    border-radius: 12px;\n    margin-bottom: 20px;\n    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);\n    flex-wrap: wrap;\n    gap: 12px;\n}\n\n.toolbar-left[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 12px;\n    flex-wrap: wrap;\n}\n\n.toolbar-right[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 16px;\n}\n\n\n\n.search-container[_ngcontent-%COMP%] {\n    position: relative;\n    min-width: 200px;\n}\n\n.search-container[_ngcontent-%COMP%]   i.fa-search[_ngcontent-%COMP%] {\n    position: absolute;\n    left: 12px;\n    top: 50%;\n    transform: translateY(-50%);\n    color: var(--mj-text-disabled);\n    font-size: 13px;\n}\n\n.search-container[_ngcontent-%COMP%]   input[_ngcontent-%COMP%] {\n    width: 100%;\n    padding: 8px 36px;\n    border: 1px solid var(--mj-border-default);\n    border-radius: 8px;\n    font-size: 13px;\n    background: var(--mj-bg-surface-card);\n    transition: all 0.2s ease;\n}\n\n.search-container[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:focus {\n    outline: none;\n    border-color: var(--mj-brand-primary);\n    background: var(--mj-bg-surface);\n    box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n}\n\n.search-clear[_ngcontent-%COMP%] {\n    position: absolute;\n    right: 8px;\n    top: 50%;\n    transform: translateY(-50%);\n    width: 20px;\n    height: 20px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    border: none;\n    background: var(--mj-border-default);\n    border-radius: 50%;\n    cursor: pointer;\n    color: var(--mj-text-secondary);\n    font-size: 10px;\n}\n\n.search-clear[_ngcontent-%COMP%]:hover {\n    background: var(--mj-text-disabled);\n    color: var(--mj-text-inverse);\n}\n\n.filter-select[_ngcontent-%COMP%] {\n    padding: 8px 12px;\n    border: 1px solid var(--mj-border-default);\n    border-radius: 8px;\n    background: var(--mj-bg-surface-card);\n    font-size: 13px;\n    color: var(--mj-text-primary);\n    cursor: pointer;\n    transition: all 0.2s ease;\n}\n\n.filter-select[_ngcontent-%COMP%]:focus {\n    outline: none;\n    border-color: var(--mj-brand-primary);\n}\n\n.results-info[_ngcontent-%COMP%] {\n    font-size: 13px;\n    color: var(--mj-text-secondary);\n}\n\n\n\n.view-toggle[_ngcontent-%COMP%] {\n    display: flex;\n    background: var(--mj-bg-surface-sunken);\n    border-radius: 8px;\n    padding: 4px;\n}\n\n.toggle-btn[_ngcontent-%COMP%] {\n    width: 32px;\n    height: 32px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    background: transparent;\n    border: none;\n    border-radius: 6px;\n    color: var(--mj-text-secondary);\n    cursor: pointer;\n    transition: all 0.2s ease;\n}\n\n.toggle-btn[_ngcontent-%COMP%]:hover {\n    color: var(--mj-text-primary);\n}\n\n.toggle-btn.active[_ngcontent-%COMP%] {\n    background: var(--mj-bg-surface);\n    color: var(--mj-brand-primary);\n    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n}\n\n\n\n.timeline-container[_ngcontent-%COMP%] {\n    display: flex;\n    flex-direction: column;\n    gap: 24px;\n}\n\n.timeline-group[_ngcontent-%COMP%] {\n    background: var(--mj-bg-surface);\n    border-radius: 12px;\n    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);\n    overflow: hidden;\n}\n\n.timeline-date[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    padding: 16px 20px;\n    background: var(--mj-bg-surface-card);\n    border-bottom: 1px solid var(--mj-bg-surface-sunken);\n}\n\n.date-label[_ngcontent-%COMP%] {\n    font-size: 14px;\n    font-weight: 600;\n    color: var(--mj-text-primary);\n}\n\n.date-count[_ngcontent-%COMP%] {\n    font-size: 12px;\n    color: var(--mj-text-secondary);\n    background: var(--mj-border-default);\n    padding: 4px 10px;\n    border-radius: 12px;\n}\n\n.timeline-items[_ngcontent-%COMP%] {\n    padding: 8px 0;\n}\n\n.timeline-item[_ngcontent-%COMP%] {\n    display: flex;\n    padding: 12px 20px;\n    transition: background 0.2s ease;\n}\n\n.timeline-item[_ngcontent-%COMP%]:hover {\n    background: var(--mj-bg-surface-card);\n}\n\n.timeline-item.failed[_ngcontent-%COMP%] {\n    background: color-mix(in srgb, var(--mj-status-error) 2%, transparent);\n}\n\n.timeline-item.failed[_ngcontent-%COMP%]:hover {\n    background: color-mix(in srgb, var(--mj-status-error) 5%, transparent);\n}\n\n.timeline-line[_ngcontent-%COMP%] {\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    width: 24px;\n    margin-right: 16px;\n    flex-shrink: 0;\n}\n\n.timeline-dot[_ngcontent-%COMP%] {\n    width: 12px;\n    height: 12px;\n    border-radius: 50%;\n    flex-shrink: 0;\n}\n\n.timeline-content[_ngcontent-%COMP%] {\n    flex: 1;\n    min-width: 0;\n    cursor: pointer;\n    position: relative;\n}\n\n.timeline-header[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    margin-bottom: 8px;\n}\n\n.timeline-operation[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n}\n\n.timeline-operation[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n    font-size: 14px;\n}\n\n.operation-name[_ngcontent-%COMP%] {\n    font-size: 14px;\n    font-weight: 600;\n    color: var(--mj-text-primary);\n}\n\n.timeline-time[_ngcontent-%COMP%] {\n    font-size: 12px;\n    font-family: monospace;\n    color: var(--mj-text-secondary);\n}\n\n.timeline-body[_ngcontent-%COMP%] {\n    margin-bottom: 8px;\n}\n\n.timeline-user[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 6px;\n    font-size: 13px;\n    color: var(--mj-text-secondary);\n    margin-bottom: 4px;\n}\n\n.timeline-user[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n    font-size: 11px;\n}\n\n.timeline-description[_ngcontent-%COMP%] {\n    font-size: 13px;\n    color: var(--mj-text-primary);\n    margin-bottom: 8px;\n}\n\n.timeline-badges[_ngcontent-%COMP%] {\n    display: flex;\n    flex-wrap: wrap;\n    gap: 8px;\n}\n\n.status-badge[_ngcontent-%COMP%] {\n    display: inline-flex;\n    align-items: center;\n    gap: 4px;\n    padding: 4px 10px;\n    border-radius: 12px;\n    font-size: 11px;\n    font-weight: 600;\n    text-transform: uppercase;\n}\n\n.status-badge.success[_ngcontent-%COMP%] {\n    background: color-mix(in srgb, var(--mj-status-success) 15%, var(--mj-bg-surface));\n    color: var(--mj-status-success);\n}\n\n.status-badge.failed[_ngcontent-%COMP%] {\n    background: color-mix(in srgb, var(--mj-status-error) 8%, var(--mj-bg-surface));\n    color: var(--mj-status-error);\n}\n\n.status-badge.unknown[_ngcontent-%COMP%] {\n    background: var(--mj-bg-surface-sunken);\n    color: var(--mj-text-secondary);\n}\n\n.status-badge[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n    font-size: 10px;\n}\n\n.subsystem-badge[_ngcontent-%COMP%], \n.type-badge[_ngcontent-%COMP%] {\n    display: inline-flex;\n    align-items: center;\n    gap: 4px;\n    padding: 4px 10px;\n    background: var(--mj-bg-surface-sunken);\n    border-radius: 12px;\n    font-size: 11px;\n    color: var(--mj-text-secondary);\n}\n\n.type-badge[_ngcontent-%COMP%] {\n    background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n    color: var(--mj-brand-primary);\n}\n\n.type-badge[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n    font-size: 10px;\n}\n\n\n\n.timeline-details[_ngcontent-%COMP%] {\n    margin-top: 12px;\n    padding: 16px;\n    background: var(--mj-bg-surface-card);\n    border-radius: 8px;\n    border: 1px solid var(--mj-border-default);\n}\n\n.detail-grid[_ngcontent-%COMP%] {\n    display: grid;\n    grid-template-columns: repeat(2, 1fr);\n    gap: 12px;\n}\n\n.detail-item[_ngcontent-%COMP%] {\n    display: flex;\n    flex-direction: column;\n    gap: 4px;\n}\n\n.detail-item.full-width[_ngcontent-%COMP%] {\n    grid-column: 1 / -1;\n}\n\n.detail-label[_ngcontent-%COMP%] {\n    font-size: 11px;\n    font-weight: 600;\n    text-transform: uppercase;\n    letter-spacing: 0.5px;\n    color: var(--mj-text-secondary);\n}\n\n.detail-value[_ngcontent-%COMP%] {\n    font-size: 13px;\n    color: var(--mj-text-primary);\n}\n\n.detail-value.mono[_ngcontent-%COMP%] {\n    font-family: monospace;\n    font-size: 12px;\n}\n\n.detail-value.small[_ngcontent-%COMP%] {\n    font-size: 11px;\n    word-break: break-all;\n}\n\n.detail-value.error[_ngcontent-%COMP%] {\n    color: var(--mj-status-error);\n}\n\n.expand-btn[_ngcontent-%COMP%] {\n    position: absolute;\n    top: 0;\n    right: 0;\n    width: 24px;\n    height: 24px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    background: transparent;\n    border: none;\n    color: var(--mj-text-disabled);\n    cursor: pointer;\n    transition: all 0.2s ease;\n}\n\n.expand-btn[_ngcontent-%COMP%]:hover {\n    color: var(--mj-brand-primary);\n}\n\n.expand-btn[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n    font-size: 10px;\n}\n\n\n\n.audit-table-container[_ngcontent-%COMP%] {\n    background: var(--mj-bg-surface);\n    border-radius: 12px;\n    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);\n    overflow: hidden;\n}\n\n.audit-table[_ngcontent-%COMP%] {\n    width: 100%;\n    border-collapse: collapse;\n}\n\n.audit-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%] {\n    padding: 14px 16px;\n    text-align: left;\n    font-size: 12px;\n    font-weight: 600;\n    text-transform: uppercase;\n    letter-spacing: 0.5px;\n    color: var(--mj-text-secondary);\n    background: var(--mj-bg-surface-card);\n    border-bottom: 1px solid var(--mj-border-default);\n}\n\n.audit-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%] {\n    padding: 14px 16px;\n    font-size: 13px;\n    color: var(--mj-text-primary);\n    border-bottom: 1px solid var(--mj-bg-surface-sunken);\n}\n\n.audit-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:last-child   td[_ngcontent-%COMP%] {\n    border-bottom: none;\n}\n\n.audit-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:hover   td[_ngcontent-%COMP%] {\n    background: var(--mj-bg-surface-card);\n}\n\n.audit-table[_ngcontent-%COMP%]   tr.failed-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%] {\n    background: color-mix(in srgb, var(--mj-status-error) 2%, transparent);\n}\n\n.audit-table[_ngcontent-%COMP%]   tr.failed-row[_ngcontent-%COMP%]:hover   td[_ngcontent-%COMP%] {\n    background: color-mix(in srgb, var(--mj-status-error) 5%, transparent);\n}\n\n.timestamp[_ngcontent-%COMP%] {\n    font-family: monospace;\n    font-size: 12px;\n    color: var(--mj-text-secondary);\n    white-space: nowrap;\n}\n\n.user[_ngcontent-%COMP%] {\n    font-weight: 500;\n}\n\n.operation-badge[_ngcontent-%COMP%] {\n    display: inline-flex;\n    align-items: center;\n    gap: 6px;\n    padding: 4px 10px;\n    border-radius: 6px;\n    font-size: 11px;\n    font-weight: 600;\n    text-transform: uppercase;\n}\n\n.operation-badge[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n    font-size: 10px;\n}\n\n.description[_ngcontent-%COMP%] {\n    max-width: 300px;\n    white-space: nowrap;\n    overflow: hidden;\n    text-overflow: ellipsis;\n}\n\n.subsystem[_ngcontent-%COMP%] {\n    color: var(--mj-text-secondary);\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: 64px 24px;\n    background: var(--mj-bg-surface);\n    border-radius: 12px;\n    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);\n    text-align: center;\n}\n\n.empty-icon[_ngcontent-%COMP%] {\n    width: 80px;\n    height: 80px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    background: var(--mj-bg-surface-sunken);\n    border-radius: 50%;\n    margin-bottom: 20px;\n}\n\n.empty-icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n    font-size: 32px;\n    color: var(--mj-border-strong);\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}\n\n.btn-link[_ngcontent-%COMP%] {\n    background: none;\n    border: none;\n    color: var(--mj-brand-primary);\n    cursor: pointer;\n    font-size: inherit;\n    padding: 0;\n    text-decoration: underline;\n}\n\n.btn-link[_ngcontent-%COMP%]:hover {\n    color: var(--mj-brand-primary-hover);\n}\n\n\n\n@media (max-width: 1200px) {\n    .stats-grid[_ngcontent-%COMP%] {\n        grid-template-columns: repeat(2, 1fr);\n    }\n}\n\n@media (max-width: 768px) {\n    .audit-container[_ngcontent-%COMP%] {\n        padding: 16px;\n    }\n\n    .audit-header[_ngcontent-%COMP%] {\n        flex-direction: column;\n        align-items: flex-start;\n        gap: 16px;\n    }\n\n    .stats-grid[_ngcontent-%COMP%] {\n        grid-template-columns: 1fr;\n    }\n\n    .toolbar[_ngcontent-%COMP%] {\n        flex-direction: column;\n        align-items: stretch;\n    }\n\n    .toolbar-left[_ngcontent-%COMP%] {\n        flex-direction: column;\n    }\n\n    .search-container[_ngcontent-%COMP%] {\n        width: 100%;\n    }\n\n    .filter-select[_ngcontent-%COMP%] {\n        width: 100%;\n    }\n\n    .toolbar-right[_ngcontent-%COMP%] {\n        justify-content: space-between;\n    }\n\n    .detail-grid[_ngcontent-%COMP%] {\n        grid-template-columns: 1fr;\n    }\n\n    .chart-label[_ngcontent-%COMP%] {\n        display: none;\n    }\n\n    .chart-label[_ngcontent-%COMP%]:nth-child(4n+1) {\n        display: block;\n    }\n}"], changeDetection: 0 });
};
CredentialsAuditResourceComponent = __decorate([
    RegisterClass(BaseResourceComponent, 'CredentialsAuditResource')
], CredentialsAuditResourceComponent);
export { CredentialsAuditResourceComponent };
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CredentialsAuditResourceComponent, [{
        type: Component,
        args: [{ standalone: false, selector: 'mj-credentials-audit-resource', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"audit-container\">\n  @if (isLoading) {\n    <mj-loading text=\"Loading audit logs...\"></mj-loading>\n  }\n\n  @if (!isLoading) {\n    <!-- Header -->\n    <div class=\"audit-header\">\n      <div class=\"header-info\">\n        <h2 class=\"audit-title\">Audit Trail</h2>\n        <p class=\"audit-subtitle\">Credential access and modification history</p>\n      </div>\n      <div class=\"header-actions\">\n        <button class=\"btn-secondary\" (click)=\"exportToCSV()\" title=\"Export to CSV\">\n          <i class=\"fa-solid fa-download\"></i>\n          <span>Export</span>\n        </button>\n        <button class=\"btn-icon\" (click)=\"refresh()\" title=\"Refresh\">\n          <i class=\"fa-solid fa-refresh\"></i>\n        </button>\n      </div>\n    </div>\n    <!-- Stats Cards -->\n    <div class=\"stats-grid\">\n      <div class=\"stat-card\">\n        <div class=\"stat-icon total\">\n          <i class=\"fa-solid fa-clipboard-list\"></i>\n        </div>\n        <div class=\"stat-content\">\n          <div class=\"stat-value\">{{auditLogs.length}}</div>\n          <div class=\"stat-label\">Total Events</div>\n        </div>\n      </div>\n      <div class=\"stat-card\">\n        <div class=\"stat-icon success\">\n          <i class=\"fa-solid fa-check-circle\"></i>\n        </div>\n        <div class=\"stat-content\">\n          <div class=\"stat-value success\">{{getSuccessCount()}}</div>\n          <div class=\"stat-label\">Successful</div>\n        </div>\n        <div class=\"stat-rate\">{{getSuccessRate()}}%</div>\n      </div>\n      <div class=\"stat-card\">\n        <div class=\"stat-icon failed\">\n          <i class=\"fa-solid fa-times-circle\"></i>\n        </div>\n        <div class=\"stat-content\">\n          <div class=\"stat-value failed\">{{getFailedCount()}}</div>\n          <div class=\"stat-label\">Failed</div>\n        </div>\n      </div>\n      <div class=\"stat-card\">\n        <div class=\"stat-icon users\">\n          <i class=\"fa-solid fa-users\"></i>\n        </div>\n        <div class=\"stat-content\">\n          <div class=\"stat-value\">{{getUniqueUserCount()}}</div>\n          <div class=\"stat-label\">Unique Users</div>\n        </div>\n      </div>\n    </div>\n    <!-- Activity Chart -->\n    @if (hourlyData.length > 0) {\n      <div class=\"activity-chart\">\n        <div class=\"chart-header\">\n          <h3>\n            <i class=\"fa-solid fa-chart-bar\"></i>\n            Today's Activity\n          </h3>\n        </div>\n        <div class=\"chart-container\">\n          <div class=\"chart-bars\">\n            @for (data of hourlyData; track data) {\n              <div\n                class=\"chart-bar-wrapper\"\n                [title]=\"data.hour + ': ' + (data.success + data.failed) + ' events'\"\n                >\n                <div class=\"chart-bar\">\n                  <div\n                    class=\"bar-segment success\"\n                    [style.height.%]=\"(data.success / getMaxHourlyCount()) * 100\"\n                  ></div>\n                  <div\n                    class=\"bar-segment failed\"\n                    [style.height.%]=\"(data.failed / getMaxHourlyCount()) * 100\"\n                  ></div>\n                </div>\n                <span class=\"chart-label\">{{data.hour.split(':')[0]}}</span>\n              </div>\n            }\n          </div>\n        </div>\n        <div class=\"chart-legend\">\n          <span class=\"legend-item\">\n            <span class=\"legend-color success\"></span>\n            Success\n          </span>\n          <span class=\"legend-item\">\n            <span class=\"legend-color failed\"></span>\n            Failed\n          </span>\n        </div>\n      </div>\n    }\n    <!-- Toolbar -->\n    <div class=\"toolbar\">\n      <div class=\"toolbar-left\">\n        <div class=\"search-container\">\n          <i class=\"fa-solid fa-search\"></i>\n          <input\n            type=\"text\"\n            placeholder=\"Search logs...\"\n            [value]=\"searchText\"\n            (input)=\"onSearchChange($any($event.target).value)\"\n            />\n          @if (searchText) {\n            <button class=\"search-clear\" (click)=\"clearSearch()\">\n              <i class=\"fa-solid fa-times\"></i>\n            </button>\n          }\n        </div>\n        <select\n          class=\"filter-select\"\n          [value]=\"selectedStatus\"\n          (change)=\"onStatusFilterChange($any($event.target).value)\"\n          >\n          <option value=\"\">All Statuses</option>\n          <option value=\"Success\">Success</option>\n          <option value=\"Failed\">Failed</option>\n        </select>\n        <select\n          class=\"filter-select\"\n          [value]=\"selectedOperation\"\n          (change)=\"onOperationFilterChange($any($event.target).value)\"\n          >\n          <option value=\"\">All Operations</option>\n          @for (op of getOperationList(); track op) {\n            <option [value]=\"op\">{{op}}</option>\n          }\n        </select>\n        <select\n          class=\"filter-select\"\n          [value]=\"dateRange\"\n          (change)=\"onDateRangeChange($any($event.target).value)\"\n          >\n          <option value=\"1\">Last 24 hours</option>\n          <option value=\"7\">Last 7 days</option>\n          <option value=\"30\">Last 30 days</option>\n          <option value=\"90\">Last 90 days</option>\n        </select>\n      </div>\n      <div class=\"toolbar-right\">\n        <div class=\"results-info\">\n          {{filteredLogs.length}} of {{auditLogs.length}} events\n        </div>\n        <div class=\"view-toggle\">\n          <button\n            class=\"toggle-btn\"\n            [class.active]=\"viewMode === 'timeline'\"\n            (click)=\"setViewMode('timeline')\"\n            title=\"Timeline View\"\n            >\n            <i class=\"fa-solid fa-timeline\"></i>\n          </button>\n          <button\n            class=\"toggle-btn\"\n            [class.active]=\"viewMode === 'table'\"\n            (click)=\"setViewMode('table')\"\n            title=\"Table View\"\n            >\n            <i class=\"fa-solid fa-table\"></i>\n          </button>\n        </div>\n      </div>\n    </div>\n    <!-- Timeline View -->\n    @if (viewMode === 'timeline' && timelineGroups.length > 0) {\n      <div class=\"timeline-container\">\n        @for (group of timelineGroups; track group) {\n          <div class=\"timeline-group\">\n            <div class=\"timeline-date\">\n              <span class=\"date-label\">{{group.displayDate}}</span>\n              <span class=\"date-count\">{{group.logs.length}} events</span>\n            </div>\n            <div class=\"timeline-items\">\n              @for (log of group.logs; track log) {\n                <div\n                  class=\"timeline-item\"\n                  [class.expanded]=\"expandedLogId === log.ID\"\n                  [class.failed]=\"log.Status === 'Failed'\"\n                  >\n                  <div class=\"timeline-line\">\n                    <div\n                      class=\"timeline-dot\"\n                      [style.backgroundColor]=\"getOperationColor(getOperationType(log))\"\n                    ></div>\n                  </div>\n                  <div class=\"timeline-content\" (click)=\"toggleLogExpand(log.ID)\">\n                    <div class=\"timeline-header\">\n                      <div class=\"timeline-operation\">\n                        <i [class]=\"getOperationIcon(getOperationType(log))\" [style.color]=\"getOperationColor(getOperationType(log))\"></i>\n                        <span class=\"operation-name\">{{getOperationType(log)}}</span>\n                      </div>\n                      <div class=\"timeline-time\">{{formatTime(log.__mj_CreatedAt)}}</div>\n                    </div>\n                    <div class=\"timeline-body\">\n                      <div class=\"timeline-user\">\n                        <i class=\"fa-solid fa-user\"></i>\n                        {{log.User || 'Unknown'}}\n                      </div>\n                      @if (log.Description) {\n                        <div class=\"timeline-description\">\n                          {{log.Description}}\n                        </div>\n                      }\n                      <div class=\"timeline-badges\">\n                        <span class=\"status-badge\" [ngClass]=\"getStatusClass(log.Status)\">\n                          <i [class]=\"log.Status === 'Success' ? 'fa-solid fa-check' : 'fa-solid fa-times'\"></i>\n                          {{log.Status}}\n                        </span>\n                        @if (getSubsystem(log)) {\n                          <span class=\"subsystem-badge\">\n                            {{getSubsystem(log)}}\n                          </span>\n                        }\n                        @if (log.parsedDetails?.credentialType) {\n                          <span class=\"type-badge\">\n                            <i class=\"fa-solid fa-key\"></i>\n                            {{log.parsedDetails?.credentialType}}\n                          </span>\n                        }\n                      </div>\n                    </div>\n                    @if (expandedLogId === log.ID) {\n                      <div class=\"timeline-details\">\n                        <div class=\"detail-grid\">\n                          @if (log.parsedDetails?.ipAddress) {\n                            <div class=\"detail-item\">\n                              <span class=\"detail-label\">IP Address</span>\n                              <span class=\"detail-value\">{{log.parsedDetails?.ipAddress}}</span>\n                            </div>\n                          }\n                          @if (log.parsedDetails?.duration) {\n                            <div class=\"detail-item\">\n                              <span class=\"detail-label\">Duration</span>\n                              <span class=\"detail-value\">{{formatDuration(log.parsedDetails?.duration)}}</span>\n                            </div>\n                          }\n                          @if (log.parsedDetails?.credentialId) {\n                            <div class=\"detail-item\">\n                              <span class=\"detail-label\">Credential ID</span>\n                              <span class=\"detail-value mono\">{{log.parsedDetails?.credentialId}}</span>\n                            </div>\n                          }\n                          @if (log.parsedDetails?.errorMessage) {\n                            <div class=\"detail-item full-width\">\n                              <span class=\"detail-label\">Error Message</span>\n                              <span class=\"detail-value error\">{{log.parsedDetails?.errorMessage}}</span>\n                            </div>\n                          }\n                          @if (log.parsedDetails?.userAgent) {\n                            <div class=\"detail-item full-width\">\n                              <span class=\"detail-label\">User Agent</span>\n                              <span class=\"detail-value mono small\">{{log.parsedDetails?.userAgent}}</span>\n                            </div>\n                          }\n                        </div>\n                      </div>\n                    }\n                    <button class=\"expand-btn\">\n                      <i [class]=\"expandedLogId === log.ID ? 'fa-solid fa-chevron-up' : 'fa-solid fa-chevron-down'\"></i>\n                    </button>\n                  </div>\n                </div>\n              }\n            </div>\n          </div>\n        }\n      </div>\n    }\n    <!-- Table View -->\n    @if (viewMode === 'table' && filteredLogs.length > 0) {\n      <div class=\"audit-table-container\">\n        <table class=\"audit-table\">\n          <thead>\n            <tr>\n              <th>Timestamp</th>\n              <th>User</th>\n              <th>Operation</th>\n              <th>Description</th>\n              <th>Subsystem</th>\n              <th>Status</th>\n            </tr>\n          </thead>\n          <tbody>\n            @for (log of filteredLogs; track log) {\n              <tr [class.failed-row]=\"log.Status === 'Failed'\">\n                <td class=\"timestamp\">{{formatDate(log.__mj_CreatedAt)}}</td>\n                <td class=\"user\">{{log.User || 'Unknown'}}</td>\n                <td class=\"operation\">\n                  <span class=\"operation-badge\" [style.backgroundColor]=\"getOperationColor(getOperationType(log)) + '20'\" [style.color]=\"getOperationColor(getOperationType(log))\">\n                    <i [class]=\"getOperationIcon(getOperationType(log))\"></i>\n                    {{getOperationType(log)}}\n                  </span>\n                </td>\n                <td class=\"description\">{{log.Description || '-'}}</td>\n                <td class=\"subsystem\">{{getSubsystem(log) || '-'}}</td>\n                <td class=\"status\">\n                  <span class=\"status-badge\" [ngClass]=\"getStatusClass(log.Status)\">\n                    <i [class]=\"log.Status === 'Success' ? 'fa-solid fa-check' : 'fa-solid fa-times'\"></i>\n                    {{log.Status}}\n                  </span>\n                </td>\n              </tr>\n            }\n          </tbody>\n        </table>\n      </div>\n    }\n    <!-- Empty State -->\n    @if (filteredLogs.length === 0) {\n      <div class=\"empty-state\">\n        <div class=\"empty-icon\">\n          <i class=\"fa-solid fa-clipboard-list\"></i>\n        </div>\n        <h3>No Audit Logs</h3>\n        @if (searchText || selectedStatus || selectedOperation) {\n          <p>\n            No events match your current filters.\n            <button class=\"btn-link\" (click)=\"searchText = ''; selectedStatus = ''; selectedOperation = ''; applyFilters()\">Clear filters</button>\n          </p>\n        }\n        @if (!searchText && !selectedStatus && !selectedOperation) {\n          <p>\n            No credential access events in the selected time range.\n          </p>\n        }\n      </div>\n    }\n  }\n</div>\n", styles: [".audit-container {\n    padding: 24px;\n    height: 100%;\n    overflow-y: auto;\n    background: var(--mj-bg-page);\n}\n\n/* Header */\n.audit-header {\n    display: flex;\n    align-items: flex-start;\n    justify-content: space-between;\n    margin-bottom: 24px;\n}\n\n.header-info {\n    display: flex;\n    flex-direction: column;\n    gap: 4px;\n}\n\n.audit-title {\n    font-size: 24px;\n    font-weight: 700;\n    color: var(--mj-text-primary);\n    margin: 0;\n}\n\n.audit-subtitle {\n    font-size: 14px;\n    color: var(--mj-text-secondary);\n    margin: 0;\n}\n\n.header-actions {\n    display: flex;\n    gap: 8px;\n}\n\n.btn-secondary {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n    padding: 10px 16px;\n    background: var(--mj-bg-surface);\n    border: 1px solid var(--mj-border-default);\n    border-radius: 8px;\n    font-size: 13px;\n    font-weight: 500;\n    color: var(--mj-text-primary);\n    cursor: pointer;\n    transition: all 0.2s ease;\n}\n\n.btn-secondary:hover {\n    background: var(--mj-bg-surface-card);\n    border-color: var(--mj-brand-primary);\n    color: var(--mj-brand-primary);\n}\n\n.btn-icon {\n    width: 40px;\n    height: 40px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    background: var(--mj-bg-surface);\n    border: 1px solid var(--mj-border-default);\n    border-radius: 8px;\n    color: var(--mj-text-secondary);\n    cursor: pointer;\n    transition: all 0.2s ease;\n}\n\n.btn-icon:hover {\n    background: var(--mj-bg-surface-card);\n    color: var(--mj-brand-primary);\n}\n\n/* Stats Grid */\n.stats-grid {\n    display: grid;\n    grid-template-columns: repeat(4, 1fr);\n    gap: 16px;\n    margin-bottom: 24px;\n}\n\n.stat-card {\n    display: flex;\n    align-items: center;\n    gap: 16px;\n    padding: 20px;\n    background: var(--mj-bg-surface);\n    border-radius: 12px;\n    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);\n    position: relative;\n}\n\n.stat-icon {\n    width: 48px;\n    height: 48px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    border-radius: 12px;\n    flex-shrink: 0;\n}\n\n.stat-icon.total {\n    background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n    color: var(--mj-brand-primary);\n}\n\n.stat-icon.success {\n    background: color-mix(in srgb, var(--mj-status-success) 10%, transparent);\n    color: var(--mj-status-success);\n}\n\n.stat-icon.failed {\n    background: color-mix(in srgb, var(--mj-status-error) 10%, transparent);\n    color: var(--mj-status-error);\n}\n\n.stat-icon.users {\n    background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n    color: var(--mj-brand-primary);\n}\n\n.stat-icon i {\n    font-size: 20px;\n}\n\n.stat-content {\n    flex: 1;\n}\n\n.stat-value {\n    font-size: 28px;\n    font-weight: 700;\n    color: var(--mj-text-primary);\n    line-height: 1;\n}\n\n.stat-value.success {\n    color: var(--mj-status-success);\n}\n\n.stat-value.failed {\n    color: var(--mj-status-error);\n}\n\n.stat-label {\n    font-size: 13px;\n    color: var(--mj-text-secondary);\n    margin-top: 4px;\n}\n\n.stat-rate {\n    position: absolute;\n    top: 12px;\n    right: 16px;\n    font-size: 12px;\n    font-weight: 600;\n    color: var(--mj-status-success);\n    background: color-mix(in srgb, var(--mj-status-success) 10%, transparent);\n    padding: 4px 8px;\n    border-radius: 8px;\n}\n\n/* Activity Chart */\n.activity-chart {\n    background: var(--mj-bg-surface);\n    border-radius: 12px;\n    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);\n    padding: 20px;\n    margin-bottom: 20px;\n}\n\n.chart-header {\n    margin-bottom: 16px;\n}\n\n.chart-header h3 {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n    font-size: 14px;\n    font-weight: 600;\n    color: var(--mj-text-primary);\n    margin: 0;\n}\n\n.chart-header h3 i {\n    color: var(--mj-brand-primary);\n}\n\n.chart-container {\n    height: 120px;\n    padding: 0 4px;\n}\n\n.chart-bars {\n    display: flex;\n    align-items: flex-end;\n    height: 100%;\n    gap: 2px;\n}\n\n.chart-bar-wrapper {\n    flex: 1;\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    height: 100%;\n}\n\n.chart-bar {\n    flex: 1;\n    width: 100%;\n    max-width: 24px;\n    display: flex;\n    flex-direction: column-reverse;\n    border-radius: 4px 4px 0 0;\n    overflow: hidden;\n    background: var(--mj-bg-surface-sunken);\n}\n\n.bar-segment {\n    width: 100%;\n    transition: height 0.3s ease;\n}\n\n.bar-segment.success {\n    background: var(--mj-status-success);\n}\n\n.bar-segment.failed {\n    background: var(--mj-status-error);\n}\n\n.chart-label {\n    font-size: 10px;\n    color: var(--mj-text-disabled);\n    margin-top: 4px;\n}\n\n.chart-legend {\n    display: flex;\n    justify-content: center;\n    gap: 24px;\n    margin-top: 12px;\n    padding-top: 12px;\n    border-top: 1px solid var(--mj-bg-surface-sunken);\n}\n\n.legend-item {\n    display: flex;\n    align-items: center;\n    gap: 6px;\n    font-size: 12px;\n    color: var(--mj-text-secondary);\n}\n\n.legend-color {\n    width: 12px;\n    height: 12px;\n    border-radius: 3px;\n}\n\n.legend-color.success {\n    background: var(--mj-status-success);\n}\n\n.legend-color.failed {\n    background: var(--mj-status-error);\n}\n\n/* Toolbar */\n.toolbar {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    padding: 12px 16px;\n    background: var(--mj-bg-surface);\n    border-radius: 12px;\n    margin-bottom: 20px;\n    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);\n    flex-wrap: wrap;\n    gap: 12px;\n}\n\n.toolbar-left {\n    display: flex;\n    align-items: center;\n    gap: 12px;\n    flex-wrap: wrap;\n}\n\n.toolbar-right {\n    display: flex;\n    align-items: center;\n    gap: 16px;\n}\n\n/* Search */\n.search-container {\n    position: relative;\n    min-width: 200px;\n}\n\n.search-container i.fa-search {\n    position: absolute;\n    left: 12px;\n    top: 50%;\n    transform: translateY(-50%);\n    color: var(--mj-text-disabled);\n    font-size: 13px;\n}\n\n.search-container input {\n    width: 100%;\n    padding: 8px 36px;\n    border: 1px solid var(--mj-border-default);\n    border-radius: 8px;\n    font-size: 13px;\n    background: var(--mj-bg-surface-card);\n    transition: all 0.2s ease;\n}\n\n.search-container input:focus {\n    outline: none;\n    border-color: var(--mj-brand-primary);\n    background: var(--mj-bg-surface);\n    box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n}\n\n.search-clear {\n    position: absolute;\n    right: 8px;\n    top: 50%;\n    transform: translateY(-50%);\n    width: 20px;\n    height: 20px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    border: none;\n    background: var(--mj-border-default);\n    border-radius: 50%;\n    cursor: pointer;\n    color: var(--mj-text-secondary);\n    font-size: 10px;\n}\n\n.search-clear:hover {\n    background: var(--mj-text-disabled);\n    color: var(--mj-text-inverse);\n}\n\n.filter-select {\n    padding: 8px 12px;\n    border: 1px solid var(--mj-border-default);\n    border-radius: 8px;\n    background: var(--mj-bg-surface-card);\n    font-size: 13px;\n    color: var(--mj-text-primary);\n    cursor: pointer;\n    transition: all 0.2s ease;\n}\n\n.filter-select:focus {\n    outline: none;\n    border-color: var(--mj-brand-primary);\n}\n\n.results-info {\n    font-size: 13px;\n    color: var(--mj-text-secondary);\n}\n\n/* View Toggle */\n.view-toggle {\n    display: flex;\n    background: var(--mj-bg-surface-sunken);\n    border-radius: 8px;\n    padding: 4px;\n}\n\n.toggle-btn {\n    width: 32px;\n    height: 32px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    background: transparent;\n    border: none;\n    border-radius: 6px;\n    color: var(--mj-text-secondary);\n    cursor: pointer;\n    transition: all 0.2s ease;\n}\n\n.toggle-btn:hover {\n    color: var(--mj-text-primary);\n}\n\n.toggle-btn.active {\n    background: var(--mj-bg-surface);\n    color: var(--mj-brand-primary);\n    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n}\n\n/* Timeline View */\n.timeline-container {\n    display: flex;\n    flex-direction: column;\n    gap: 24px;\n}\n\n.timeline-group {\n    background: var(--mj-bg-surface);\n    border-radius: 12px;\n    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);\n    overflow: hidden;\n}\n\n.timeline-date {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    padding: 16px 20px;\n    background: var(--mj-bg-surface-card);\n    border-bottom: 1px solid var(--mj-bg-surface-sunken);\n}\n\n.date-label {\n    font-size: 14px;\n    font-weight: 600;\n    color: var(--mj-text-primary);\n}\n\n.date-count {\n    font-size: 12px;\n    color: var(--mj-text-secondary);\n    background: var(--mj-border-default);\n    padding: 4px 10px;\n    border-radius: 12px;\n}\n\n.timeline-items {\n    padding: 8px 0;\n}\n\n.timeline-item {\n    display: flex;\n    padding: 12px 20px;\n    transition: background 0.2s ease;\n}\n\n.timeline-item:hover {\n    background: var(--mj-bg-surface-card);\n}\n\n.timeline-item.failed {\n    background: color-mix(in srgb, var(--mj-status-error) 2%, transparent);\n}\n\n.timeline-item.failed:hover {\n    background: color-mix(in srgb, var(--mj-status-error) 5%, transparent);\n}\n\n.timeline-line {\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    width: 24px;\n    margin-right: 16px;\n    flex-shrink: 0;\n}\n\n.timeline-dot {\n    width: 12px;\n    height: 12px;\n    border-radius: 50%;\n    flex-shrink: 0;\n}\n\n.timeline-content {\n    flex: 1;\n    min-width: 0;\n    cursor: pointer;\n    position: relative;\n}\n\n.timeline-header {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    margin-bottom: 8px;\n}\n\n.timeline-operation {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n}\n\n.timeline-operation i {\n    font-size: 14px;\n}\n\n.operation-name {\n    font-size: 14px;\n    font-weight: 600;\n    color: var(--mj-text-primary);\n}\n\n.timeline-time {\n    font-size: 12px;\n    font-family: monospace;\n    color: var(--mj-text-secondary);\n}\n\n.timeline-body {\n    margin-bottom: 8px;\n}\n\n.timeline-user {\n    display: flex;\n    align-items: center;\n    gap: 6px;\n    font-size: 13px;\n    color: var(--mj-text-secondary);\n    margin-bottom: 4px;\n}\n\n.timeline-user i {\n    font-size: 11px;\n}\n\n.timeline-description {\n    font-size: 13px;\n    color: var(--mj-text-primary);\n    margin-bottom: 8px;\n}\n\n.timeline-badges {\n    display: flex;\n    flex-wrap: wrap;\n    gap: 8px;\n}\n\n.status-badge {\n    display: inline-flex;\n    align-items: center;\n    gap: 4px;\n    padding: 4px 10px;\n    border-radius: 12px;\n    font-size: 11px;\n    font-weight: 600;\n    text-transform: uppercase;\n}\n\n.status-badge.success {\n    background: color-mix(in srgb, var(--mj-status-success) 15%, var(--mj-bg-surface));\n    color: var(--mj-status-success);\n}\n\n.status-badge.failed {\n    background: color-mix(in srgb, var(--mj-status-error) 8%, var(--mj-bg-surface));\n    color: var(--mj-status-error);\n}\n\n.status-badge.unknown {\n    background: var(--mj-bg-surface-sunken);\n    color: var(--mj-text-secondary);\n}\n\n.status-badge i {\n    font-size: 10px;\n}\n\n.subsystem-badge,\n.type-badge {\n    display: inline-flex;\n    align-items: center;\n    gap: 4px;\n    padding: 4px 10px;\n    background: var(--mj-bg-surface-sunken);\n    border-radius: 12px;\n    font-size: 11px;\n    color: var(--mj-text-secondary);\n}\n\n.type-badge {\n    background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n    color: var(--mj-brand-primary);\n}\n\n.type-badge i {\n    font-size: 10px;\n}\n\n/* Timeline Details */\n.timeline-details {\n    margin-top: 12px;\n    padding: 16px;\n    background: var(--mj-bg-surface-card);\n    border-radius: 8px;\n    border: 1px solid var(--mj-border-default);\n}\n\n.detail-grid {\n    display: grid;\n    grid-template-columns: repeat(2, 1fr);\n    gap: 12px;\n}\n\n.detail-item {\n    display: flex;\n    flex-direction: column;\n    gap: 4px;\n}\n\n.detail-item.full-width {\n    grid-column: 1 / -1;\n}\n\n.detail-label {\n    font-size: 11px;\n    font-weight: 600;\n    text-transform: uppercase;\n    letter-spacing: 0.5px;\n    color: var(--mj-text-secondary);\n}\n\n.detail-value {\n    font-size: 13px;\n    color: var(--mj-text-primary);\n}\n\n.detail-value.mono {\n    font-family: monospace;\n    font-size: 12px;\n}\n\n.detail-value.small {\n    font-size: 11px;\n    word-break: break-all;\n}\n\n.detail-value.error {\n    color: var(--mj-status-error);\n}\n\n.expand-btn {\n    position: absolute;\n    top: 0;\n    right: 0;\n    width: 24px;\n    height: 24px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    background: transparent;\n    border: none;\n    color: var(--mj-text-disabled);\n    cursor: pointer;\n    transition: all 0.2s ease;\n}\n\n.expand-btn:hover {\n    color: var(--mj-brand-primary);\n}\n\n.expand-btn i {\n    font-size: 10px;\n}\n\n/* Table View */\n.audit-table-container {\n    background: var(--mj-bg-surface);\n    border-radius: 12px;\n    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);\n    overflow: hidden;\n}\n\n.audit-table {\n    width: 100%;\n    border-collapse: collapse;\n}\n\n.audit-table th {\n    padding: 14px 16px;\n    text-align: left;\n    font-size: 12px;\n    font-weight: 600;\n    text-transform: uppercase;\n    letter-spacing: 0.5px;\n    color: var(--mj-text-secondary);\n    background: var(--mj-bg-surface-card);\n    border-bottom: 1px solid var(--mj-border-default);\n}\n\n.audit-table td {\n    padding: 14px 16px;\n    font-size: 13px;\n    color: var(--mj-text-primary);\n    border-bottom: 1px solid var(--mj-bg-surface-sunken);\n}\n\n.audit-table tr:last-child td {\n    border-bottom: none;\n}\n\n.audit-table tr:hover td {\n    background: var(--mj-bg-surface-card);\n}\n\n.audit-table tr.failed-row td {\n    background: color-mix(in srgb, var(--mj-status-error) 2%, transparent);\n}\n\n.audit-table tr.failed-row:hover td {\n    background: color-mix(in srgb, var(--mj-status-error) 5%, transparent);\n}\n\n.timestamp {\n    font-family: monospace;\n    font-size: 12px;\n    color: var(--mj-text-secondary);\n    white-space: nowrap;\n}\n\n.user {\n    font-weight: 500;\n}\n\n.operation-badge {\n    display: inline-flex;\n    align-items: center;\n    gap: 6px;\n    padding: 4px 10px;\n    border-radius: 6px;\n    font-size: 11px;\n    font-weight: 600;\n    text-transform: uppercase;\n}\n\n.operation-badge i {\n    font-size: 10px;\n}\n\n.description {\n    max-width: 300px;\n    white-space: nowrap;\n    overflow: hidden;\n    text-overflow: ellipsis;\n}\n\n.subsystem {\n    color: var(--mj-text-secondary);\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: 64px 24px;\n    background: var(--mj-bg-surface);\n    border-radius: 12px;\n    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);\n    text-align: center;\n}\n\n.empty-icon {\n    width: 80px;\n    height: 80px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    background: var(--mj-bg-surface-sunken);\n    border-radius: 50%;\n    margin-bottom: 20px;\n}\n\n.empty-icon i {\n    font-size: 32px;\n    color: var(--mj-border-strong);\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}\n\n.btn-link {\n    background: none;\n    border: none;\n    color: var(--mj-brand-primary);\n    cursor: pointer;\n    font-size: inherit;\n    padding: 0;\n    text-decoration: underline;\n}\n\n.btn-link:hover {\n    color: var(--mj-brand-primary-hover);\n}\n\n/* Responsive */\n@media (max-width: 1200px) {\n    .stats-grid {\n        grid-template-columns: repeat(2, 1fr);\n    }\n}\n\n@media (max-width: 768px) {\n    .audit-container {\n        padding: 16px;\n    }\n\n    .audit-header {\n        flex-direction: column;\n        align-items: flex-start;\n        gap: 16px;\n    }\n\n    .stats-grid {\n        grid-template-columns: 1fr;\n    }\n\n    .toolbar {\n        flex-direction: column;\n        align-items: stretch;\n    }\n\n    .toolbar-left {\n        flex-direction: column;\n    }\n\n    .search-container {\n        width: 100%;\n    }\n\n    .filter-select {\n        width: 100%;\n    }\n\n    .toolbar-right {\n        justify-content: space-between;\n    }\n\n    .detail-grid {\n        grid-template-columns: 1fr;\n    }\n\n    .chart-label {\n        display: none;\n    }\n\n    .chart-label:nth-child(4n+1) {\n        display: block;\n    }\n}\n"] }]
    }], () => [{ type: i0.ChangeDetectorRef }], null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CredentialsAuditResourceComponent, { className: "CredentialsAuditResourceComponent", filePath: "src/Credentials/components/credentials-audit-resource.component.ts", lineNumber: 38 }); })();
//# sourceMappingURL=credentials-audit-resource.component.js.map