import { UserInfo } from '@memberjunction/core';
import { MJConversationEntity } from '@memberjunction/core-entities';
import { PSResourceBase } from './ps-resource-base';
import { type BusinessPredictionCard } from '../business-predictions.view-models';
import { type AtRiskRow } from '../at-risk.view-models';
import * as i0 from "@angular/core";
/**
 * **Predictions** — the business-user home for Predictive Studio (`option-b-refined` mockup). Reframes
 * published ML models as plain-language "predictions" in a catalog, each with a trust badge; opening one
 * goes to a workspace whose trust verdict GATES the actions (a Poor/unmeasured prediction can't be acted
 * on). "+ New prediction" opens the Model Development Agent (the deterministic builder) as a docked
 * co-pilot. Zero ML jargon — the analyst surfaces stay under the other nav items as "Advanced".
 */
export declare class PSPredictionsResourceComponent extends PSResourceBase {
    protected readonly SectionKey = "predictions";
    protected readonly SectionLabel = "Predictions";
    protected readonly SectionIcon = "fa-solid fa-wand-magic-sparkles";
    private readonly cdrLocal;
    /** catalog (the home grid) ↔ workspace (a selected prediction). */
    view: 'catalog' | 'workspace';
    selected: BusinessPredictionCard | null;
    chatOpen: boolean;
    pendingPrompt: string | null;
    private _modelDevAgentId;
    /**
     * Embedded co-pilot conversation state. The chat-area starts in "new conversation" mode; on the first
     * send it creates the conversation and emits `conversationCreated`, at which point we capture the live
     * conversation and flip out of new-mode so subsequent sends append to the same thread. Without this
     * wiring the suppressed empty-state input has no valid conversation to write into and the first send
     * silently no-ops (matches the proven Form Builder co-pilot pattern).
     */
    chatConversation: MJConversationEntity | null;
    chatConversationId: string | null;
    chatIsNewConversation: boolean;
    /** The ranked at-risk rows for the open prediction's latest run (empty until loaded / when no run yet). */
    atRiskRows: AtRiskRow[];
    /** Plain-language "what's driving this" drivers for the open prediction (global feature importance). */
    drivers: string[];
    /** Whether the at-risk list is loading for the open prediction. */
    atRiskLoading: boolean;
    /** The business catalog cards, most-trustworthy first, derived from the engine's published models. */
    get cards(): BusinessPredictionCard[];
    dots(c: BusinessPredictionCard): number;
    evidence(): string;
    open(c: BusinessPredictionCard): void;
    /** Load the open prediction's plain-language drivers + its latest run's ranked at-risk rows. */
    private loadAtRisk;
    backToCatalog(): void;
    /** "Review the call list" — scroll the ranked at-risk list into view. */
    scrollToList(): void;
    /** "Save scores" / "Send to a list" — open the docked co-pilot seeded with the request (the agent does it). */
    askAgentTo(prompt: string): void;
    /** "Share / export" — download the at-risk list as a CSV (dependency-free). */
    exportList(): void;
    newPrediction(): void;
    closeChat(): void;
    /**
     * The chat-area created its backing conversation after the user's first message — capture the live
     * conversation, re-feed the pending message in the same change-detection cycle, and leave new-mode so
     * the thread renders (mirrors the Form Builder co-pilot's atomic state-flip).
     */
    onChatConversationCreated(event: {
        conversation: MJConversationEntity;
        pendingMessage?: string;
    }): void;
    /** The chat-area delivered the seeded prompt — clear the buffer so a re-render doesn't resend it. */
    onChatPendingMessageConsumed(): void;
    get currentUser(): UserInfo | null;
    get chatEnvironmentId(): string;
    get applicationId(): string | null;
    get modelDevAgentId(): string | null;
    get chatAppContext(): Record<string, unknown>;
    private ensureModelDevAgentResolved;
    static ɵfac: i0.ɵɵFactoryDeclaration<PSPredictionsResourceComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<PSPredictionsResourceComponent, "mj-ps-predictions-resource", never, {}, {}, never, never, false, never>;
}
/** Tree-shaking prevention — called from the subpath module so the @RegisterClass survives bundling. */
export declare function LoadPSPredictionsResource(): void;
//# sourceMappingURL=ps-predictions-resource.component.d.ts.map