/**
 * @module PredictiveStudio/components/ps-operate-dialog.mapping
 *
 * Pure, framework-free mapping from the "Operate this model" dialog's knob state to the
 * {@link PredictiveStudioCreateScoringProcessOperation} input. Extracted from the Angular
 * component so the submit→input contract (scope mode → `scope` object; output mode →
 * `outputField` present/absent) is unit-testable without instantiating Angular.
 *
 * Keep this a state object (`OperateModelState`) so new operate knobs are additive — the
 * mapping reads only the fields it understands and ignores the rest.
 */
import type { PredictiveStudioCreateScoringProcessInput } from '@memberjunction/core-entities';
/** Which records the run scores. Mirrors the dialog's segmented scope control. */
export type OperateScopeMode = 'all' | 'view' | 'list';
/** Where predictions land. Mirrors the dialog's segmented output control. */
export type OperateOutputMode = 'generic' | 'writeback';
/** Which prediction value a write-back lands (classification can choose the class label). */
export type OperateValueKind = 'score' | 'class';
/**
 * The full knob state of the Operate dialog. The component holds exactly this object and
 * mutates it from the UI; {@link mapStateToCreateScoringInput} turns it into the Remote Op
 * input. New knobs append fields here (additive) without breaking existing mapping callers.
 */
export interface OperateModelState {
    /** `MJ: ML Models` id the created scoring process runs. */
    modelId: string;
    /** Target entity whose rows are scored (resolved registered entity name, e.g. `Memberships`). */
    targetEntityName: string;
    /** Scope segment selection. */
    scopeMode: OperateScopeMode;
    /** Selected `User Views` id when {@link scopeMode} is `'view'`. */
    viewId: string | null;
    /** Selected `Lists` id when {@link scopeMode} is `'list'`. */
    listId: string | null;
    /** Output segment selection. */
    outputMode: OperateOutputMode;
    /** Target column to write predictions into when {@link outputMode} is `'writeback'`. */
    outputField: string;
    /** Which value the write-back lands (only meaningful for classification + write-back). */
    valueKind: OperateValueKind;
}
/** Why a state can't be turned into a valid scoring-process input. */
export type OperateMappingError = 'missing-model' | 'missing-target-entity' | 'missing-view' | 'missing-list' | 'missing-output-field';
/** Discriminated result of {@link mapStateToCreateScoringInput}. */
export type OperateMappingResult = {
    ok: true;
    input: PredictiveStudioCreateScoringProcessInput;
} | {
    ok: false;
    error: OperateMappingError;
};
/**
 * Map the dialog's knob state to a {@link PredictiveStudioCreateScoringProcessInput}.
 *
 * Contract enforced here (the thing the unit tests pin):
 * - **Scope** → exactly one selector on `scope`: `all` (default) / `viewId` / `listId`.
 * - **Output** → `outputField` is present ONLY in write-back mode (and must be non-empty);
 *   generic mode omits it entirely (predictions land in run history only — no binding).
 * - `valueKind` is attached only in write-back mode (the create op ignores it otherwise).
 *
 * Returns a discriminated result so the component can surface a precise, non-throwing error.
 */
export declare function mapStateToCreateScoringInput(state: OperateModelState): OperateMappingResult;
/** A short, user-facing message for a mapping error (used by the dialog's notifications). */
export declare function describeOperateMappingError(error: OperateMappingError): string;
//# sourceMappingURL=ps-operate-dialog.mapping.d.ts.map