import { OnInit } from '@angular/core';
import { IMetadataProvider, UserInfo } from '@memberjunction/core';
import { PredictiveStudioModelTargetStatus } from '@memberjunction/core-entities';
import { PredictiveStudioEngine } from '../engine/predictive-studio.engine';
import { PSFeatureBar, PSLifecycleStep } from '../predictive-studio.types';
import { PSMetricDisplay } from '../predictive-studio.view-models';
import * as i0 from "@angular/core";
interface ModelRowVM {
    id: string;
    name: string;
    version: number;
    algorithm: string;
    holdoutAuc: string;
    status: string;
    iconClass: string;
}
/** A pending promote/archive action awaiting user confirmation. */
interface PendingPromotion {
    modelId: string;
    modelName: string;
    targetStatus: PredictiveStudioModelTargetStatus;
    /** When true, the selected model trips the single-feature dominance leakage flag → sign-off required. */
    leakageFlagged: boolean;
}
/**
 * Model Registry panel: master list of trained ML Models + a rich detail pane with a lifecycle stepper
 * (Draft → Validated → Published → Archived), train-vs-holdout metric comparison, feature-importance
 * bars, a leakage sign-off gate, and lifecycle actions. Fully live against `MJ: ML Models`:
 *
 * - **Feature importance** is parsed from `model.FeatureImportance` (sorted by |value|, top 6, bars).
 * - **Performance metrics** come from `model.Metrics` (train) + `model.HoldoutMetrics` (holdout) —
 *   only the metrics actually recorded are shown.
 * - **Promote / Archive** call the {@link PredictiveStudioPromoteModelOperation} Remote Op behind a
 *   confirmation modal. On a leakage-flagged model, the modal surfaces the sign-off requirement and
 *   captures a required reason; on success the engine refreshes and the list re-renders reactively.
 *
 * 100% entity-agnostic — model names derive from the producing pipeline, never any business entity.
 */
export declare class PSRegistryComponent implements OnInit {
    engine: PredictiveStudioEngine;
    /** Provider to route the promote Remote Op + engine refresh through (multi-provider correctness). */
    provider: IMetadataProvider | null;
    /** Acting user for the engine refresh after a mutation. */
    currentUser: UserInfo | null;
    private cdr;
    private notifications;
    models: ModelRowVM[];
    selectedId: string;
    lifecycleSteps: readonly ["Draft", "Validated", "Published", "Archived"];
    readonly dominanceThreshold: string;
    /** Pending confirmation (null when no modal is open). */
    pending: PendingPromotion | null;
    /** Remote Op in flight — drives the modal spinner + disables the buttons. */
    busy: boolean;
    ngOnInit(): void;
    select(id: string): void;
    get selected(): ModelRowVM;
    private get selectedEntity();
    /** Top-6 feature importance bars parsed live from the selected model's `FeatureImportance` JSON. */
    get importance(): PSFeatureBar[];
    get importanceCaption(): string;
    get topFeatureName(): string;
    get topFeatureValue(): string;
    /** True when a single feature's |importance| meets/exceeds the dominance threshold. */
    get leakageFlagged(): boolean;
    /** Holdout AUC hero number, formatted, or '—'. */
    get trainAuc(): string;
    /** Secondary metric tiles (precision/recall/F1/log-loss/…) — only those actually recorded. */
    get secondaryMetrics(): PSMetricDisplay[];
    /** The formatted train–holdout overfit gap, or '' when not computable. */
    get gapText(): string;
    get gapVerdict(): string;
    get targetSuffix(): string;
    statusClass(status: string): string;
    statusBadgeClass(status: string): string;
    /** Stepper state for a lifecycle step relative to the selected model's status. */
    stepState(step: PSLifecycleStep): 'done' | 'curr' | 'todo';
    get canValidate(): boolean;
    get canPublish(): boolean;
    get canArchive(): boolean;
    get actionHint(): string;
    /** Open the confirmation modal for a lifecycle transition. */
    requestPromote(targetStatus: PredictiveStudioModelTargetStatus): void;
    cancelPromote(): void;
    get pendingTitle(): string;
    get pendingIcon(): string;
    get pendingConfirmLabel(): string;
    get pendingVariant(): 'info' | 'warn' | 'danger';
    get pendingMessage(): string;
    /** Run the promote Remote Op, then refresh the engine + close on success. */
    confirmPromote(reason: string): Promise<void>;
    /** Force-refresh the engine's cached models, then rebuild the master list. */
    private refreshAfterMutation;
    private buildModels;
    private toVM;
    private placeholder;
    static ɵfac: i0.ɵɵFactoryDeclaration<PSRegistryComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<PSRegistryComponent, "ps-registry", never, { "engine": { "alias": "engine"; "required": false; }; "provider": { "alias": "provider"; "required": false; }; "currentUser": { "alias": "currentUser"; "required": false; }; }, {}, never, never, true, never>;
}
export {};
//# sourceMappingURL=ps-registry.component.d.ts.map