import type { WithRev } from '@/api/type'; import type { ProductionRunDuplicateSourceState } from './use-production-run-duplicate-sources'; export interface ProductionRunFormDialogProps { show: boolean; /** * The run being edited. Absent creates a new one. * * Only a DRAFT can be edited — the legality table is what decides that, and * the listing never offers `update` on anything else — so this component does * not re-check the status. */ run?: WithRev | null; /** Runs from the current location that can supply output items to copy. */ duplicateSources?: WithRev[]; duplicateSourceState?: ProductionRunDuplicateSourceState; } export interface ProductionRunFormDialogEvents { (event: 'update:show', value: boolean): void; (event: 'load-more-duplicate-sources'): void; /** * A write landed. Carries the run so the caller can route to it; the caller * still refreshes, because `request` may have moved it since. */ (event: 'saved', run: WithRev): void; }