import type { PrepareProductionRunResult } from '@/api/production-run'; import type { ProductionRunCommitRow } from '../planning/use-production-run-form'; import type { ProductionRunQuantityModel } from '../../shared/model/production-run-unit-snapshot'; export interface PrepareRunDialogProps { show: boolean; run: FdoProductionRun; locationName: string | null; /** Page-level utility may jump straight to the same frozen print review. */ initialView?: 'review' | 'print'; } /** Frozen review state shared by confirmation, print and the eventual write. */ export interface PrepareRunReview { items: { skuId: string; name: string; code: string; unit: string; precision: number | null; model: ProductionRunQuantityModel; }[]; ingredients: (ProductionRunCommitRow & { precision: number | null; })[]; } export interface PrepareRunDialogEvents { (event: 'update:show', value: boolean): void; /** Stock moved. Carries the warnings the caller must keep on screen. */ (event: 'issued', result: PrepareProductionRunResult): void; }