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;
};
/**
 * @fileoverview Agent Requests Resource Component
 *
 * Dashboard resource for the AI application's "Requests" tab.
 * Displays all agent feedback requests with filtering by status, priority,
 * request type, and agent. Opens the generic agent-request-panel for
 * viewing details and responding.
 */
import { Component } from '@angular/core';
import { Subject } from 'rxjs';
import { debounceTime, takeUntil } from 'rxjs/operators';
import { RunView } from '@memberjunction/core';
import { UserInfoEngine } from '@memberjunction/core-entities';
import { RegisterClass, UUIDsEqual } from '@memberjunction/global';
import { BaseResourceComponent } from '@memberjunction/ng-shared';
import * as i0 from "@angular/core";
import * as i1 from "@angular/forms";
import * as i2 from "@memberjunction/ng-shared-generic";
import * as i3 from "@memberjunction/ng-agent-requests";
import * as i4 from "@angular/common";
const _forTrack0 = ($index, $item) => $item.ID;
const _forTrack1 = ($index, $item) => $item.Value;
function AgentRequestsResourceComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 5);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(ctx_r0.PendingCount);
} }
function AgentRequestsResourceComponent_For_17_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "option", 14);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const status_r2 = ctx.$implicit;
    i0.ɵɵproperty("value", status_r2);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(status_r2);
} }
function AgentRequestsResourceComponent_For_22_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "option", 14);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const type_r3 = ctx.$implicit;
    i0.ɵɵproperty("value", type_r3.ID);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(type_r3.Name);
} }
function AgentRequestsResourceComponent_For_27_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "option", 14);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const opt_r4 = ctx.$implicit;
    i0.ɵɵproperty("value", opt_r4.Value);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(opt_r4.Label);
} }
function AgentRequestsResourceComponent_Conditional_28_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 20);
    i0.ɵɵlistener("click", function AgentRequestsResourceComponent_Conditional_28_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.ClearFilters()); });
    i0.ɵɵelement(1, "i", 21);
    i0.ɵɵtext(2, " Clear Filters ");
    i0.ɵɵelementEnd();
} }
function AgentRequestsResourceComponent_Conditional_29_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 16);
    i0.ɵɵelement(1, "mj-loading", 22);
    i0.ɵɵelementEnd();
} }
function AgentRequestsResourceComponent_Conditional_30_Conditional_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "p", 24);
    i0.ɵɵtext(1, "No agent requests yet");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(2, "p", 25);
    i0.ɵɵtext(3, "When agents need human input, their requests will appear here.");
    i0.ɵɵelementEnd();
} }
function AgentRequestsResourceComponent_Conditional_30_Conditional_3_Template(rf, ctx) { if (rf & 1) {
    const _r6 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "p", 24);
    i0.ɵɵtext(1, "No requests match your filters");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(2, "button", 20);
    i0.ɵɵlistener("click", function AgentRequestsResourceComponent_Conditional_30_Conditional_3_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.ClearFilters()); });
    i0.ɵɵtext(3, "Clear Filters");
    i0.ɵɵelementEnd();
} }
function AgentRequestsResourceComponent_Conditional_30_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 17);
    i0.ɵɵelement(1, "i", 23);
    i0.ɵɵconditionalCreate(2, AgentRequestsResourceComponent_Conditional_30_Conditional_2_Template, 4, 0)(3, AgentRequestsResourceComponent_Conditional_30_Conditional_3_Template, 4, 0);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵconditional(ctx_r0.Requests.length === 0 ? 2 : 3);
} }
function AgentRequestsResourceComponent_Conditional_31_For_2_Conditional_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 32);
    i0.ɵɵtext(1, "Expired");
    i0.ɵɵelementEnd();
} }
function AgentRequestsResourceComponent_Conditional_31_For_2_Conditional_15_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 35);
    i0.ɵɵelement(1, "i", 39);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const request_r8 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", request_r8.Agent, " ");
} }
function AgentRequestsResourceComponent_Conditional_31_For_2_Conditional_16_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 35);
    i0.ɵɵelement(1, "i", 40);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "date");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const request_r8 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(3, 1, request_r8.__mj_CreatedAt, "short"), " ");
} }
function AgentRequestsResourceComponent_Conditional_31_For_2_Conditional_17_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 35);
    i0.ɵɵelement(1, "i", 41);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "date");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const request_r8 = i0.ɵɵnextContext().$implicit;
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵclassProp("expired", ctx_r0.IsExpired(request_r8));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" Expires ", i0.ɵɵpipeBind2(3, 3, request_r8.ExpiresAt, "short"), " ");
} }
function AgentRequestsResourceComponent_Conditional_31_For_2_Template(rf, ctx) { if (rf & 1) {
    const _r7 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 27);
    i0.ɵɵlistener("click", function AgentRequestsResourceComponent_Conditional_31_For_2_Template_div_click_0_listener() { const request_r8 = i0.ɵɵrestoreView(_r7).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.OnRequestClick(request_r8)); });
    i0.ɵɵelementStart(1, "div", 28);
    i0.ɵɵelement(2, "i");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "div", 29)(4, "div", 30)(5, "span", 31);
    i0.ɵɵtext(6);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(7, "span");
    i0.ɵɵtext(8);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(9, "span");
    i0.ɵɵtext(10);
    i0.ɵɵelementEnd();
    i0.ɵɵconditionalCreate(11, AgentRequestsResourceComponent_Conditional_31_For_2_Conditional_11_Template, 2, 0, "span", 32);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(12, "p", 33);
    i0.ɵɵtext(13);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(14, "div", 34);
    i0.ɵɵconditionalCreate(15, AgentRequestsResourceComponent_Conditional_31_For_2_Conditional_15_Template, 3, 1, "span", 35);
    i0.ɵɵconditionalCreate(16, AgentRequestsResourceComponent_Conditional_31_For_2_Conditional_16_Template, 4, 4, "span", 35);
    i0.ɵɵconditionalCreate(17, AgentRequestsResourceComponent_Conditional_31_For_2_Conditional_17_Template, 4, 6, "span", 36);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(18, "div", 37);
    i0.ɵɵelement(19, "i", 38);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const request_r8 = ctx.$implicit;
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵclassProp("actionable", request_r8.Status === "Requested")("expired", ctx_r0.IsExpired(request_r8));
    i0.ɵɵadvance(2);
    i0.ɵɵclassMap(i0.ɵɵinterpolate1("", ctx_r0.GetRequestTypeIcon(request_r8.RequestTypeID), " type-icon"));
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate(ctx_r0.GetRequestTypeName(request_r8.RequestTypeID));
    i0.ɵɵadvance();
    i0.ɵɵclassMap(i0.ɵɵinterpolate1("priority-badge ", ctx_r0.GetPriorityClass(request_r8.Priority)));
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", ctx_r0.GetPriorityLabel(request_r8.Priority), " ");
    i0.ɵɵadvance();
    i0.ɵɵclassMap(i0.ɵɵinterpolate1("status-badge status-", request_r8.Status.toLowerCase()));
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", request_r8.Status, " ");
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r0.IsExpired(request_r8) && request_r8.Status === "Requested" ? 11 : -1);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(request_r8.Request);
    i0.ɵɵadvance(2);
    i0.ɵɵconditional(request_r8.Agent ? 15 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(request_r8.__mj_CreatedAt ? 16 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(request_r8.ExpiresAt ? 17 : -1);
} }
function AgentRequestsResourceComponent_Conditional_31_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 18);
    i0.ɵɵrepeaterCreate(1, AgentRequestsResourceComponent_Conditional_31_For_2_Template, 20, 21, "div", 26, _forTrack0);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵrepeater(ctx_r0.FilteredRequests);
} }
function AgentRequestsResourceComponent_Conditional_32_Template(rf, ctx) { if (rf & 1) {
    const _r9 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "mj-agent-request-dialog", 42);
    i0.ɵɵlistener("Close", function AgentRequestsResourceComponent_Conditional_32_Template_mj_agent_request_dialog_Close_0_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnPanelClose($event)); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("Visible", ctx_r0.ShowRequestPanel)("Request", ctx_r0.SelectedRequest);
} }
let AgentRequestsResourceComponent = class AgentRequestsResourceComponent extends BaseResourceComponent {
    cdr;
    USER_SETTINGS_KEY = 'AI.AgentRequests.UserPreferences';
    settingsPersistSubject = new Subject();
    destroy$ = new Subject();
    settingsLoaded = false;
    IsLoading = false;
    Requests = [];
    FilteredRequests = [];
    RequestTypes = [];
    // Panel state
    SelectedRequest = null;
    ShowRequestPanel = false;
    // Filter state
    Filters = {
        SearchTerm: '',
        Status: '',
        RequestType: '',
        Priority: ''
    };
    // Available filter options
    StatusOptions = ['Requested', 'Approved', 'Rejected', 'Responded', 'Canceled', 'Expired'];
    PriorityOptions = [
        { Label: 'Critical (76-100)', Value: 'critical' },
        { Label: 'High (51-75)', Value: 'high' },
        { Label: 'Normal (26-50)', Value: 'normal' },
        { Label: 'Low (1-25)', Value: 'low' }
    ];
    searchSubject = new Subject();
    constructor(cdr) {
        super();
        this.cdr = cdr;
    }
    async ngAfterViewInit() {
        this.setupSearchDebounce();
        await this.loadUserSettings();
        await this.loadData();
        this.autoOpenRequestFromQueryParams();
        this.NotifyLoadComplete();
    }
    ngOnDestroy() {
        this.destroy$.next();
        this.destroy$.complete();
    }
    async GetResourceDisplayName(data) {
        return 'Agent Requests';
    }
    async GetResourceIconClass(data) {
        return 'fa-solid fa-inbox';
    }
    /** Count of pending (Requested) items */
    get PendingCount() {
        return this.Requests.filter(r => r.Status === 'Requested').length;
    }
    /** Open the detail panel for a request */
    OnRequestClick(request) {
        this.SelectedRequest = request;
        this.ShowRequestPanel = true;
        this.cdr.detectChanges();
    }
    /** Handle panel close */
    OnPanelClose(result) {
        this.ShowRequestPanel = false;
        this.SelectedRequest = null;
        if (result.Success) {
            // Refresh the list to reflect the status change
            this.loadData();
        }
        this.cdr.detectChanges();
    }
    /** Handle search input */
    OnSearchChange(term) {
        this.searchSubject.next(term);
    }
    /** Handle filter changes */
    OnFilterChange() {
        this.applyFilters();
        this.saveUserSettings();
    }
    /** Clear all filters */
    ClearFilters() {
        this.Filters = { SearchTerm: '', Status: '', RequestType: '', Priority: '' };
        this.applyFilters();
        this.saveUserSettings();
    }
    /** Get the request type name by ID */
    GetRequestTypeName(typeId) {
        if (!typeId)
            return '';
        const type = this.RequestTypes.find(t => UUIDsEqual(t.ID, typeId));
        return type?.Name ?? '';
    }
    /** Get the request type icon by ID */
    GetRequestTypeIcon(typeId) {
        if (!typeId)
            return 'fa-solid fa-question-circle';
        const type = this.RequestTypes.find(t => UUIDsEqual(t.ID, typeId));
        return type?.Icon ?? 'fa-solid fa-question-circle';
    }
    /** Get priority label from numeric value */
    GetPriorityLabel(priority) {
        if (priority <= 25)
            return 'Low';
        if (priority <= 50)
            return 'Normal';
        if (priority <= 75)
            return 'High';
        return 'Critical';
    }
    /** Get priority CSS class from numeric value */
    GetPriorityClass(priority) {
        if (priority <= 25)
            return 'priority-low';
        if (priority <= 50)
            return 'priority-normal';
        if (priority <= 75)
            return 'priority-high';
        return 'priority-critical';
    }
    /** Whether a request is expired */
    IsExpired(request) {
        if (!request.ExpiresAt)
            return false;
        return new Date(request.ExpiresAt) < new Date();
    }
    // ---- Private Methods ----
    /**
     * If a requestId was passed via configuration (e.g. from a notification click),
     * auto-open that request in the detail panel.
     */
    autoOpenRequestFromQueryParams() {
        const requestId = this.Data?.Configuration?.requestId
            || this.Data?.Configuration?.queryParams?.requestId;
        if (!requestId)
            return;
        const match = this.Requests.find(r => UUIDsEqual(r.ID, requestId));
        if (match) {
            this.OnRequestClick(match);
        }
    }
    async loadData() {
        this.IsLoading = true;
        this.cdr.detectChanges();
        try {
            const rv = new RunView();
            const [requestsResult, typesResult] = await rv.RunViews([
                {
                    EntityName: 'MJ: AI Agent Requests',
                    OrderBy: 'Priority DESC, __mj_CreatedAt DESC',
                    ResultType: 'entity_object'
                },
                {
                    EntityName: 'MJ: AI Agent Request Types',
                    OrderBy: 'Name',
                    ResultType: 'entity_object'
                }
            ]);
            if (requestsResult.Success) {
                this.Requests = requestsResult.Results;
            }
            if (typesResult.Success) {
                this.RequestTypes = typesResult.Results;
            }
            this.applyFilters();
        }
        catch (error) {
            console.error('Error loading agent requests:', error);
        }
        finally {
            this.IsLoading = false;
            this.cdr.detectChanges();
        }
    }
    applyFilters() {
        let filtered = [...this.Requests];
        // Status filter
        if (this.Filters.Status) {
            filtered = filtered.filter(r => r.Status === this.Filters.Status);
        }
        // Request type filter
        if (this.Filters.RequestType) {
            filtered = filtered.filter(r => r.RequestTypeID && UUIDsEqual(r.RequestTypeID, this.Filters.RequestType));
        }
        // Priority filter
        if (this.Filters.Priority) {
            filtered = filtered.filter(r => {
                const p = r.Priority;
                switch (this.Filters.Priority) {
                    case 'low': return p <= 25;
                    case 'normal': return p > 25 && p <= 50;
                    case 'high': return p > 50 && p <= 75;
                    case 'critical': return p > 75;
                    default: return true;
                }
            });
        }
        // Search term filter
        if (this.Filters.SearchTerm) {
            const term = this.Filters.SearchTerm.toLowerCase();
            filtered = filtered.filter(r => (r.Request && r.Request.toLowerCase().includes(term)) ||
                (r.Agent && r.Agent.toLowerCase().includes(term)) ||
                (r.Response && r.Response.toLowerCase().includes(term)));
        }
        this.FilteredRequests = filtered;
        this.cdr.detectChanges();
    }
    setupSearchDebounce() {
        this.searchSubject.pipe(debounceTime(300), takeUntil(this.destroy$)).subscribe(term => {
            this.Filters.SearchTerm = term;
            this.applyFilters();
            this.saveUserSettings();
        });
        this.settingsPersistSubject.pipe(debounceTime(500), takeUntil(this.destroy$)).subscribe(() => this.persistUserSettings());
    }
    async loadUserSettings() {
        try {
            const prefs = UserInfoEngine.Instance.GetSetting(this.USER_SETTINGS_KEY);
            if (prefs) {
                const parsed = JSON.parse(prefs);
                if (parsed.Filters) {
                    this.Filters = { ...this.Filters, ...parsed.Filters };
                }
            }
        }
        catch {
            // Use defaults
        }
        this.settingsLoaded = true;
    }
    saveUserSettings() {
        if (this.settingsLoaded) {
            this.settingsPersistSubject.next();
        }
    }
    async persistUserSettings() {
        try {
            const prefs = {
                Filters: this.Filters,
                SortColumn: 'Priority',
                SortDirection: 'desc'
            };
            await UserInfoEngine.Instance.SetSetting(this.USER_SETTINGS_KEY, JSON.stringify(prefs));
        }
        catch {
            // Silent failure for settings persistence
        }
    }
    static ɵfac = function AgentRequestsResourceComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AgentRequestsResourceComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
    static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AgentRequestsResourceComponent, selectors: [["app-agent-requests-resource"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 33, vars: 8, consts: [[1, "agent-requests-container"], [1, "requests-header"], [1, "header-left"], [1, "page-title"], [1, "fa-solid", "fa-inbox"], [1, "pending-badge"], [1, "header-right"], [1, "search-box"], [1, "fa-solid", "fa-search", "search-icon"], ["type", "text", "placeholder", "Search requests...", 1, "search-input", 3, "ngModelChange", "ngModel"], [1, "filter-bar"], [1, "filter-group"], [1, "filter-select", 3, "ngModelChange", "ngModel"], ["value", ""], [3, "value"], [1, "clear-filters-btn"], [1, "loading-container"], [1, "empty-state"], [1, "requests-list"], [3, "Visible", "Request"], [1, "clear-filters-btn", 3, "click"], [1, "fa-solid", "fa-times"], ["text", "Loading agent requests..."], [1, "fa-solid", "fa-inbox", "empty-icon"], [1, "empty-text"], [1, "empty-subtext"], [1, "request-card", 3, "actionable", "expired"], [1, "request-card", 3, "click"], [1, "card-left"], [1, "card-content"], [1, "card-top-row"], [1, "request-type-name"], [1, "expired-tag"], [1, "request-text"], [1, "card-meta"], [1, "meta-item"], [1, "meta-item", 3, "expired"], [1, "card-right"], [1, "fa-solid", "fa-chevron-right"], [1, "fa-solid", "fa-robot"], [1, "fa-regular", "fa-clock"], [1, "fa-solid", "fa-hourglass-end"], [3, "Close", "Visible", "Request"]], template: function AgentRequestsResourceComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "h2", 3);
            i0.ɵɵelement(4, "i", 4);
            i0.ɵɵtext(5, " Agent Requests ");
            i0.ɵɵconditionalCreate(6, AgentRequestsResourceComponent_Conditional_6_Template, 2, 1, "span", 5);
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(7, "div", 6)(8, "div", 7);
            i0.ɵɵelement(9, "i", 8);
            i0.ɵɵelementStart(10, "input", 9);
            i0.ɵɵlistener("ngModelChange", function AgentRequestsResourceComponent_Template_input_ngModelChange_10_listener($event) { return ctx.OnSearchChange($event); });
            i0.ɵɵelementEnd()()()();
            i0.ɵɵelementStart(11, "div", 10)(12, "div", 11)(13, "select", 12);
            i0.ɵɵtwoWayListener("ngModelChange", function AgentRequestsResourceComponent_Template_select_ngModelChange_13_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.Filters.Status, $event) || (ctx.Filters.Status = $event); return $event; });
            i0.ɵɵlistener("ngModelChange", function AgentRequestsResourceComponent_Template_select_ngModelChange_13_listener() { return ctx.OnFilterChange(); });
            i0.ɵɵelementStart(14, "option", 13);
            i0.ɵɵtext(15, "All Statuses");
            i0.ɵɵelementEnd();
            i0.ɵɵrepeaterCreate(16, AgentRequestsResourceComponent_For_17_Template, 2, 2, "option", 14, i0.ɵɵrepeaterTrackByIdentity);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(18, "select", 12);
            i0.ɵɵtwoWayListener("ngModelChange", function AgentRequestsResourceComponent_Template_select_ngModelChange_18_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.Filters.RequestType, $event) || (ctx.Filters.RequestType = $event); return $event; });
            i0.ɵɵlistener("ngModelChange", function AgentRequestsResourceComponent_Template_select_ngModelChange_18_listener() { return ctx.OnFilterChange(); });
            i0.ɵɵelementStart(19, "option", 13);
            i0.ɵɵtext(20, "All Types");
            i0.ɵɵelementEnd();
            i0.ɵɵrepeaterCreate(21, AgentRequestsResourceComponent_For_22_Template, 2, 2, "option", 14, _forTrack0);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(23, "select", 12);
            i0.ɵɵtwoWayListener("ngModelChange", function AgentRequestsResourceComponent_Template_select_ngModelChange_23_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.Filters.Priority, $event) || (ctx.Filters.Priority = $event); return $event; });
            i0.ɵɵlistener("ngModelChange", function AgentRequestsResourceComponent_Template_select_ngModelChange_23_listener() { return ctx.OnFilterChange(); });
            i0.ɵɵelementStart(24, "option", 13);
            i0.ɵɵtext(25, "All Priorities");
            i0.ɵɵelementEnd();
            i0.ɵɵrepeaterCreate(26, AgentRequestsResourceComponent_For_27_Template, 2, 2, "option", 14, _forTrack1);
            i0.ɵɵelementEnd()();
            i0.ɵɵconditionalCreate(28, AgentRequestsResourceComponent_Conditional_28_Template, 3, 0, "button", 15);
            i0.ɵɵelementEnd();
            i0.ɵɵconditionalCreate(29, AgentRequestsResourceComponent_Conditional_29_Template, 2, 0, "div", 16)(30, AgentRequestsResourceComponent_Conditional_30_Template, 4, 1, "div", 17)(31, AgentRequestsResourceComponent_Conditional_31_Template, 3, 0, "div", 18);
            i0.ɵɵelementEnd();
            i0.ɵɵconditionalCreate(32, AgentRequestsResourceComponent_Conditional_32_Template, 1, 2, "mj-agent-request-dialog", 19);
        } if (rf & 2) {
            i0.ɵɵadvance(6);
            i0.ɵɵconditional(ctx.PendingCount > 0 ? 6 : -1);
            i0.ɵɵadvance(4);
            i0.ɵɵproperty("ngModel", ctx.Filters.SearchTerm);
            i0.ɵɵadvance(3);
            i0.ɵɵtwoWayProperty("ngModel", ctx.Filters.Status);
            i0.ɵɵadvance(3);
            i0.ɵɵrepeater(ctx.StatusOptions);
            i0.ɵɵadvance(2);
            i0.ɵɵtwoWayProperty("ngModel", ctx.Filters.RequestType);
            i0.ɵɵadvance(3);
            i0.ɵɵrepeater(ctx.RequestTypes);
            i0.ɵɵadvance(2);
            i0.ɵɵtwoWayProperty("ngModel", ctx.Filters.Priority);
            i0.ɵɵadvance(3);
            i0.ɵɵrepeater(ctx.PriorityOptions);
            i0.ɵɵadvance(2);
            i0.ɵɵconditional(ctx.Filters.Status || ctx.Filters.RequestType || ctx.Filters.Priority || ctx.Filters.SearchTerm ? 28 : -1);
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.IsLoading ? 29 : ctx.FilteredRequests.length === 0 ? 30 : 31);
            i0.ɵɵadvance(3);
            i0.ɵɵconditional(ctx.ShowRequestPanel && ctx.SelectedRequest ? 32 : -1);
        } }, dependencies: [i1.NgSelectOption, i1.ɵNgSelectMultipleOption, i1.DefaultValueAccessor, i1.SelectControlValueAccessor, i1.NgControlStatus, i1.NgModel, i2.LoadingComponent, i3.AgentRequestDialogComponent, i4.DatePipe], styles: [".agent-requests-container[_ngcontent-%COMP%] {\n    display: flex;\n    flex-direction: column;\n    height: 100%;\n    padding: 20px;\n    background: var(--mj-bg-page);\n}\n\n\n\n.requests-header[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    margin-bottom: 16px;\n    flex-wrap: wrap;\n    gap: 12px;\n}\n\n.page-title[_ngcontent-%COMP%] {\n    margin: 0;\n    font-size: 20px;\n    font-weight: 600;\n    color: var(--mj-text-primary);\n    display: flex;\n    align-items: center;\n    gap: 10px;\n}\n\n.page-title[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n    color: var(--mj-brand-primary);\n}\n\n.pending-badge[_ngcontent-%COMP%] {\n    display: inline-flex;\n    align-items: center;\n    justify-content: center;\n    min-width: 22px;\n    height: 22px;\n    padding: 0 6px;\n    border-radius: 11px;\n    font-size: 12px;\n    font-weight: 700;\n    background: var(--mj-status-warning);\n    color: var(--mj-text-inverse);\n}\n\n\n\n.search-box[_ngcontent-%COMP%] {\n    position: relative;\n    width: 280px;\n}\n\n.search-icon[_ngcontent-%COMP%] {\n    position: absolute;\n    left: 10px;\n    top: 50%;\n    transform: translateY(-50%);\n    color: var(--mj-text-muted);\n    font-size: 13px;\n}\n\n.search-input[_ngcontent-%COMP%] {\n    width: 100%;\n    padding: 8px 12px 8px 32px;\n    border: 1px solid var(--mj-border-default);\n    border-radius: 6px;\n    font-size: 13px;\n    background: var(--mj-bg-surface);\n    color: var(--mj-text-primary);\n    box-sizing: border-box;\n}\n\n.search-input[_ngcontent-%COMP%]:focus {\n    outline: none;\n    border-color: var(--mj-border-focus);\n    box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 15%, transparent);\n}\n\n\n\n.filter-bar[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n    margin-bottom: 16px;\n    flex-wrap: wrap;\n}\n\n.filter-group[_ngcontent-%COMP%] {\n    display: flex;\n    gap: 8px;\n}\n\n.filter-select[_ngcontent-%COMP%] {\n    padding: 6px 10px;\n    border: 1px solid var(--mj-border-default);\n    border-radius: 6px;\n    font-size: 13px;\n    background: var(--mj-bg-surface);\n    color: var(--mj-text-primary);\n}\n\n.clear-filters-btn[_ngcontent-%COMP%] {\n    padding: 6px 12px;\n    border: none;\n    border-radius: 6px;\n    font-size: 12px;\n    background: var(--mj-bg-surface-hover);\n    color: var(--mj-text-secondary);\n    cursor: pointer;\n    display: flex;\n    align-items: center;\n    gap: 4px;\n}\n\n.clear-filters-btn[_ngcontent-%COMP%]:hover {\n    background: var(--mj-bg-surface-active);\n    color: var(--mj-text-primary);\n}\n\n\n\n.loading-container[_ngcontent-%COMP%] {\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    padding: 60px 0;\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: 80px 20px;\n    text-align: center;\n}\n\n.empty-icon[_ngcontent-%COMP%] {\n    font-size: 48px;\n    color: var(--mj-text-disabled);\n    margin-bottom: 16px;\n}\n\n.empty-text[_ngcontent-%COMP%] {\n    margin: 0 0 8px 0;\n    font-size: 16px;\n    color: var(--mj-text-secondary);\n}\n\n.empty-subtext[_ngcontent-%COMP%] {\n    margin: 0;\n    font-size: 13px;\n    color: var(--mj-text-muted);\n}\n\n\n\n.requests-list[_ngcontent-%COMP%] {\n    display: flex;\n    flex-direction: column;\n    gap: 8px;\n    flex: 1;\n    overflow-y: auto;\n}\n\n.request-card[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: flex-start;\n    gap: 14px;\n    padding: 14px 16px;\n    background: var(--mj-bg-surface);\n    border: 1px solid var(--mj-border-default);\n    border-radius: 8px;\n    cursor: pointer;\n    transition: border-color 0.15s, box-shadow 0.15s;\n}\n\n.request-card[_ngcontent-%COMP%]:hover {\n    border-color: var(--mj-brand-primary);\n    box-shadow: 0 2px 8px color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n}\n\n.request-card.actionable[_ngcontent-%COMP%] {\n    border-left: 3px solid var(--mj-status-warning);\n}\n\n.request-card.expired[_ngcontent-%COMP%] {\n    opacity: 0.7;\n}\n\n.card-left[_ngcontent-%COMP%] {\n    flex-shrink: 0;\n    padding-top: 2px;\n}\n\n.type-icon[_ngcontent-%COMP%] {\n    font-size: 18px;\n    color: var(--mj-brand-primary);\n}\n\n.card-content[_ngcontent-%COMP%] {\n    flex: 1;\n    min-width: 0;\n}\n\n.card-top-row[_ngcontent-%COMP%] {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n    flex-wrap: wrap;\n    margin-bottom: 6px;\n}\n\n.request-type-name[_ngcontent-%COMP%] {\n    font-size: 13px;\n    font-weight: 600;\n    color: var(--mj-text-primary);\n}\n\n.request-text[_ngcontent-%COMP%] {\n    margin: 0 0 8px 0;\n    font-size: 13px;\n    color: var(--mj-text-secondary);\n    line-height: 1.5;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    display: -webkit-box;\n    -webkit-line-clamp: 2;\n    -webkit-box-orient: vertical;\n}\n\n.card-meta[_ngcontent-%COMP%] {\n    display: flex;\n    gap: 14px;\n    flex-wrap: wrap;\n}\n\n.meta-item[_ngcontent-%COMP%] {\n    font-size: 11px;\n    color: var(--mj-text-muted);\n    display: flex;\n    align-items: center;\n    gap: 4px;\n}\n\n.meta-item.expired[_ngcontent-%COMP%] {\n    color: var(--mj-status-error-text);\n}\n\n.card-right[_ngcontent-%COMP%] {\n    flex-shrink: 0;\n    color: var(--mj-text-disabled);\n    font-size: 12px;\n    padding-top: 4px;\n}\n\n\n\n.status-badge[_ngcontent-%COMP%] {\n    display: inline-block;\n    padding: 2px 8px;\n    border-radius: 12px;\n    font-size: 10px;\n    font-weight: 600;\n    text-transform: uppercase;\n    letter-spacing: 0.5px;\n}\n\n.status-requested[_ngcontent-%COMP%] {\n    background: var(--mj-status-info-bg);\n    color: var(--mj-status-info-text);\n    border: 1px solid var(--mj-status-info-border);\n}\n\n.status-approved[_ngcontent-%COMP%], \n.status-responded[_ngcontent-%COMP%] {\n    background: var(--mj-status-success-bg);\n    color: var(--mj-status-success-text);\n    border: 1px solid var(--mj-status-success-border);\n}\n\n.status-rejected[_ngcontent-%COMP%], \n.status-canceled[_ngcontent-%COMP%] {\n    background: var(--mj-status-error-bg);\n    color: var(--mj-status-error-text);\n    border: 1px solid var(--mj-status-error-border);\n}\n\n.status-expired[_ngcontent-%COMP%] {\n    background: var(--mj-status-warning-bg);\n    color: var(--mj-status-warning-text);\n    border: 1px solid var(--mj-status-warning-border);\n}\n\n.priority-badge[_ngcontent-%COMP%] {\n    display: inline-block;\n    padding: 2px 8px;\n    border-radius: 12px;\n    font-size: 10px;\n    font-weight: 600;\n}\n\n.priority-low[_ngcontent-%COMP%] {\n    background: var(--mj-bg-surface-sunken);\n    color: var(--mj-text-muted);\n}\n\n.priority-normal[_ngcontent-%COMP%] {\n    background: var(--mj-status-info-bg);\n    color: var(--mj-status-info-text);\n}\n\n.priority-high[_ngcontent-%COMP%] {\n    background: var(--mj-status-warning-bg);\n    color: var(--mj-status-warning-text);\n}\n\n.priority-critical[_ngcontent-%COMP%] {\n    background: var(--mj-status-error-bg);\n    color: var(--mj-status-error-text);\n}\n\n.expired-tag[_ngcontent-%COMP%] {\n    display: inline-block;\n    padding: 2px 6px;\n    border-radius: 8px;\n    font-size: 10px;\n    font-weight: 600;\n    background: var(--mj-status-warning-bg);\n    color: var(--mj-status-warning-text);\n}"] });
};
AgentRequestsResourceComponent = __decorate([
    RegisterClass(BaseResourceComponent, 'AIAgentRequestsResource')
], AgentRequestsResourceComponent);
export { AgentRequestsResourceComponent };
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AgentRequestsResourceComponent, [{
        type: Component,
        args: [{ standalone: false, selector: 'app-agent-requests-resource', template: "<div class=\"agent-requests-container\">\n    <!-- Header -->\n    <div class=\"requests-header\">\n        <div class=\"header-left\">\n            <h2 class=\"page-title\">\n                <i class=\"fa-solid fa-inbox\"></i> Agent Requests\n                @if (PendingCount > 0) {\n                    <span class=\"pending-badge\">{{ PendingCount }}</span>\n                }\n            </h2>\n        </div>\n        <div class=\"header-right\">\n            <div class=\"search-box\">\n                <i class=\"fa-solid fa-search search-icon\"></i>\n                <input\n                    type=\"text\"\n                    class=\"search-input\"\n                    placeholder=\"Search requests...\"\n                    [ngModel]=\"Filters.SearchTerm\"\n                    (ngModelChange)=\"OnSearchChange($event)\">\n            </div>\n        </div>\n    </div>\n\n    <!-- Filters -->\n    <div class=\"filter-bar\">\n        <div class=\"filter-group\">\n            <select class=\"filter-select\" [(ngModel)]=\"Filters.Status\" (ngModelChange)=\"OnFilterChange()\">\n                <option value=\"\">All Statuses</option>\n                @for (status of StatusOptions; track status) {\n                    <option [value]=\"status\">{{ status }}</option>\n                }\n            </select>\n\n            <select class=\"filter-select\" [(ngModel)]=\"Filters.RequestType\" (ngModelChange)=\"OnFilterChange()\">\n                <option value=\"\">All Types</option>\n                @for (type of RequestTypes; track type.ID) {\n                    <option [value]=\"type.ID\">{{ type.Name }}</option>\n                }\n            </select>\n\n            <select class=\"filter-select\" [(ngModel)]=\"Filters.Priority\" (ngModelChange)=\"OnFilterChange()\">\n                <option value=\"\">All Priorities</option>\n                @for (opt of PriorityOptions; track opt.Value) {\n                    <option [value]=\"opt.Value\">{{ opt.Label }}</option>\n                }\n            </select>\n        </div>\n\n        @if (Filters.Status || Filters.RequestType || Filters.Priority || Filters.SearchTerm) {\n            <button class=\"clear-filters-btn\" (click)=\"ClearFilters()\">\n                <i class=\"fa-solid fa-times\"></i> Clear Filters\n            </button>\n        }\n    </div>\n\n    <!-- Content -->\n    @if (IsLoading) {\n        <div class=\"loading-container\">\n            <mj-loading text=\"Loading agent requests...\"></mj-loading>\n        </div>\n    } @else if (FilteredRequests.length === 0) {\n        <div class=\"empty-state\">\n            <i class=\"fa-solid fa-inbox empty-icon\"></i>\n            @if (Requests.length === 0) {\n                <p class=\"empty-text\">No agent requests yet</p>\n                <p class=\"empty-subtext\">When agents need human input, their requests will appear here.</p>\n            } @else {\n                <p class=\"empty-text\">No requests match your filters</p>\n                <button class=\"clear-filters-btn\" (click)=\"ClearFilters()\">Clear Filters</button>\n            }\n        </div>\n    } @else {\n        <div class=\"requests-list\">\n            @for (request of FilteredRequests; track request.ID) {\n                <div\n                    class=\"request-card\"\n                    [class.actionable]=\"request.Status === 'Requested'\"\n                    [class.expired]=\"IsExpired(request)\"\n                    (click)=\"OnRequestClick(request)\">\n                    <div class=\"card-left\">\n                        <i class=\"{{ GetRequestTypeIcon(request.RequestTypeID) }} type-icon\"></i>\n                    </div>\n                    <div class=\"card-content\">\n                        <div class=\"card-top-row\">\n                            <span class=\"request-type-name\">{{ GetRequestTypeName(request.RequestTypeID) }}</span>\n                            <span class=\"priority-badge {{ GetPriorityClass(request.Priority) }}\">\n                                {{ GetPriorityLabel(request.Priority) }}\n                            </span>\n                            <span class=\"status-badge status-{{ request.Status.toLowerCase() }}\">\n                                {{ request.Status }}\n                            </span>\n                            @if (IsExpired(request) && request.Status === 'Requested') {\n                                <span class=\"expired-tag\">Expired</span>\n                            }\n                        </div>\n                        <p class=\"request-text\">{{ request.Request }}</p>\n                        <div class=\"card-meta\">\n                            @if (request.Agent) {\n                                <span class=\"meta-item\">\n                                    <i class=\"fa-solid fa-robot\"></i> {{ request.Agent }}\n                                </span>\n                            }\n                            @if (request.__mj_CreatedAt) {\n                                <span class=\"meta-item\">\n                                    <i class=\"fa-regular fa-clock\"></i> {{ request.__mj_CreatedAt | date:'short' }}\n                                </span>\n                            }\n                            @if (request.ExpiresAt) {\n                                <span class=\"meta-item\" [class.expired]=\"IsExpired(request)\">\n                                    <i class=\"fa-solid fa-hourglass-end\"></i> Expires {{ request.ExpiresAt | date:'short' }}\n                                </span>\n                            }\n                        </div>\n                    </div>\n                    <div class=\"card-right\">\n                        <i class=\"fa-solid fa-chevron-right\"></i>\n                    </div>\n                </div>\n            }\n        </div>\n    }\n</div>\n\n<!-- Agent Request Detail Panel -->\n@if (ShowRequestPanel && SelectedRequest) {\n    <mj-agent-request-dialog\n        [Visible]=\"ShowRequestPanel\"\n        [Request]=\"SelectedRequest\"\n        (Close)=\"OnPanelClose($event)\">\n    </mj-agent-request-dialog>\n}\n", styles: [".agent-requests-container {\n    display: flex;\n    flex-direction: column;\n    height: 100%;\n    padding: 20px;\n    background: var(--mj-bg-page);\n}\n\n/* Header */\n.requests-header {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    margin-bottom: 16px;\n    flex-wrap: wrap;\n    gap: 12px;\n}\n\n.page-title {\n    margin: 0;\n    font-size: 20px;\n    font-weight: 600;\n    color: var(--mj-text-primary);\n    display: flex;\n    align-items: center;\n    gap: 10px;\n}\n\n.page-title i {\n    color: var(--mj-brand-primary);\n}\n\n.pending-badge {\n    display: inline-flex;\n    align-items: center;\n    justify-content: center;\n    min-width: 22px;\n    height: 22px;\n    padding: 0 6px;\n    border-radius: 11px;\n    font-size: 12px;\n    font-weight: 700;\n    background: var(--mj-status-warning);\n    color: var(--mj-text-inverse);\n}\n\n/* Search */\n.search-box {\n    position: relative;\n    width: 280px;\n}\n\n.search-icon {\n    position: absolute;\n    left: 10px;\n    top: 50%;\n    transform: translateY(-50%);\n    color: var(--mj-text-muted);\n    font-size: 13px;\n}\n\n.search-input {\n    width: 100%;\n    padding: 8px 12px 8px 32px;\n    border: 1px solid var(--mj-border-default);\n    border-radius: 6px;\n    font-size: 13px;\n    background: var(--mj-bg-surface);\n    color: var(--mj-text-primary);\n    box-sizing: border-box;\n}\n\n.search-input:focus {\n    outline: none;\n    border-color: var(--mj-border-focus);\n    box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 15%, transparent);\n}\n\n/* Filters */\n.filter-bar {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n    margin-bottom: 16px;\n    flex-wrap: wrap;\n}\n\n.filter-group {\n    display: flex;\n    gap: 8px;\n}\n\n.filter-select {\n    padding: 6px 10px;\n    border: 1px solid var(--mj-border-default);\n    border-radius: 6px;\n    font-size: 13px;\n    background: var(--mj-bg-surface);\n    color: var(--mj-text-primary);\n}\n\n.clear-filters-btn {\n    padding: 6px 12px;\n    border: none;\n    border-radius: 6px;\n    font-size: 12px;\n    background: var(--mj-bg-surface-hover);\n    color: var(--mj-text-secondary);\n    cursor: pointer;\n    display: flex;\n    align-items: center;\n    gap: 4px;\n}\n\n.clear-filters-btn:hover {\n    background: var(--mj-bg-surface-active);\n    color: var(--mj-text-primary);\n}\n\n/* Loading */\n.loading-container {\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    padding: 60px 0;\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: 80px 20px;\n    text-align: center;\n}\n\n.empty-icon {\n    font-size: 48px;\n    color: var(--mj-text-disabled);\n    margin-bottom: 16px;\n}\n\n.empty-text {\n    margin: 0 0 8px 0;\n    font-size: 16px;\n    color: var(--mj-text-secondary);\n}\n\n.empty-subtext {\n    margin: 0;\n    font-size: 13px;\n    color: var(--mj-text-muted);\n}\n\n/* Request Cards */\n.requests-list {\n    display: flex;\n    flex-direction: column;\n    gap: 8px;\n    flex: 1;\n    overflow-y: auto;\n}\n\n.request-card {\n    display: flex;\n    align-items: flex-start;\n    gap: 14px;\n    padding: 14px 16px;\n    background: var(--mj-bg-surface);\n    border: 1px solid var(--mj-border-default);\n    border-radius: 8px;\n    cursor: pointer;\n    transition: border-color 0.15s, box-shadow 0.15s;\n}\n\n.request-card:hover {\n    border-color: var(--mj-brand-primary);\n    box-shadow: 0 2px 8px color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n}\n\n.request-card.actionable {\n    border-left: 3px solid var(--mj-status-warning);\n}\n\n.request-card.expired {\n    opacity: 0.7;\n}\n\n.card-left {\n    flex-shrink: 0;\n    padding-top: 2px;\n}\n\n.type-icon {\n    font-size: 18px;\n    color: var(--mj-brand-primary);\n}\n\n.card-content {\n    flex: 1;\n    min-width: 0;\n}\n\n.card-top-row {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n    flex-wrap: wrap;\n    margin-bottom: 6px;\n}\n\n.request-type-name {\n    font-size: 13px;\n    font-weight: 600;\n    color: var(--mj-text-primary);\n}\n\n.request-text {\n    margin: 0 0 8px 0;\n    font-size: 13px;\n    color: var(--mj-text-secondary);\n    line-height: 1.5;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    display: -webkit-box;\n    -webkit-line-clamp: 2;\n    -webkit-box-orient: vertical;\n}\n\n.card-meta {\n    display: flex;\n    gap: 14px;\n    flex-wrap: wrap;\n}\n\n.meta-item {\n    font-size: 11px;\n    color: var(--mj-text-muted);\n    display: flex;\n    align-items: center;\n    gap: 4px;\n}\n\n.meta-item.expired {\n    color: var(--mj-status-error-text);\n}\n\n.card-right {\n    flex-shrink: 0;\n    color: var(--mj-text-disabled);\n    font-size: 12px;\n    padding-top: 4px;\n}\n\n/* Badges */\n.status-badge {\n    display: inline-block;\n    padding: 2px 8px;\n    border-radius: 12px;\n    font-size: 10px;\n    font-weight: 600;\n    text-transform: uppercase;\n    letter-spacing: 0.5px;\n}\n\n.status-requested {\n    background: var(--mj-status-info-bg);\n    color: var(--mj-status-info-text);\n    border: 1px solid var(--mj-status-info-border);\n}\n\n.status-approved,\n.status-responded {\n    background: var(--mj-status-success-bg);\n    color: var(--mj-status-success-text);\n    border: 1px solid var(--mj-status-success-border);\n}\n\n.status-rejected,\n.status-canceled {\n    background: var(--mj-status-error-bg);\n    color: var(--mj-status-error-text);\n    border: 1px solid var(--mj-status-error-border);\n}\n\n.status-expired {\n    background: var(--mj-status-warning-bg);\n    color: var(--mj-status-warning-text);\n    border: 1px solid var(--mj-status-warning-border);\n}\n\n.priority-badge {\n    display: inline-block;\n    padding: 2px 8px;\n    border-radius: 12px;\n    font-size: 10px;\n    font-weight: 600;\n}\n\n.priority-low {\n    background: var(--mj-bg-surface-sunken);\n    color: var(--mj-text-muted);\n}\n\n.priority-normal {\n    background: var(--mj-status-info-bg);\n    color: var(--mj-status-info-text);\n}\n\n.priority-high {\n    background: var(--mj-status-warning-bg);\n    color: var(--mj-status-warning-text);\n}\n\n.priority-critical {\n    background: var(--mj-status-error-bg);\n    color: var(--mj-status-error-text);\n}\n\n.expired-tag {\n    display: inline-block;\n    padding: 2px 6px;\n    border-radius: 8px;\n    font-size: 10px;\n    font-weight: 600;\n    background: var(--mj-status-warning-bg);\n    color: var(--mj-status-warning-text);\n}\n"] }]
    }], () => [{ type: i0.ChangeDetectorRef }], null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AgentRequestsResourceComponent, { className: "AgentRequestsResourceComponent", filePath: "src/AI/components/requests/agent-requests-resource.component.ts", lineNumber: 43 }); })();
export function LoadAgentRequestsResource() {
    // Prevents tree-shaking
}
//# sourceMappingURL=agent-requests-resource.component.js.map