import type { Well } from '../types' import type { AssayMatrixTemplate, BioTemplateEnvelope, CalibrationCurveTemplate, DataFrameTemplate, FlowCytometryPanelTemplate, InstrumentRunTemplate, ProtocolStepsTemplate, QpcrPlateTemplate, ReagentListTemplate, SamplePrepTemplate, SampleSheetTemplate, TimeCourseTemplate, TemplateDataFrameAdapterResult, } from './types' import { toAssayMatrixDataFrame } from './assayMatrixAdapters' import { toCalibrationCurveDataFrame } from './calibrationCurveAdapters' import { toFlowPanelDataFrame } from './flowPanelAdapters' import { toInstrumentRunDataFrame } from './instrumentRunAdapters' import { toProtocolDataFrame } from './protocolAdapters' import { toQpcrDataFrame } from './qpcrAdapters' import { toReagentDataFrame } from './reagentAdapters' import { toSamplePrepDataFrame } from './samplePrepAdapters' import { toSampleDataFrame } from './sampleSheetAdapters' import { toTimeCourseDataFrame } from './timeCourseAdapters' export { toAssayMatrixColumns, toAssayMatrixDataFrame, toAssayMatrixRows, toAssayMatrixSampleOptions, } from './assayMatrixAdapters' export { toCalibrationCurveColumns, toCalibrationCurveDataFrame, toCalibrationCurveRows, } from './calibrationCurveAdapters' export { toDoseConditions, toDoseLayoutState, } from './doseResponseAdapters' export { toFlowPanelColumns, toFlowPanelDataFrame, toFlowPanelRows, } from './flowPanelAdapters' export { toInstrumentRunColumns, toInstrumentRunDataFrame, toInstrumentRunRows, toInstrumentRunScheduleEvents, toInstrumentRunSteps, } from './instrumentRunAdapters' export { toPlateMapEditorState, toWellPlateWells, } from './plateMapAdapters' export { racksFromPlateState } from './componentPlateHelpers' export { toProtocolColumns, toProtocolDataFrame, toProtocolRows, toProtocolSteps, } from './protocolAdapters' export { toQpcrColumns, toQpcrDataFrame, toQpcrRows, toQpcrWellPlateWells, } from './qpcrAdapters' export { toReagentColumns, toReagentDataFrame, toReagentListItems, toReagentRows, } from './reagentAdapters' export { toSamplePrepColumns, toSamplePrepDataFrame, toSamplePrepRows, } from './samplePrepAdapters' export { toSampleColumns, toSampleDataFrame, toSampleOptions, toSampleRows, } from './sampleSheetAdapters' export { toTimeCourseColumns, toTimeCourseDataFrame, toTimeCourseRows, toTimeCourseSteps, } from './timeCourseAdapters' /** @deprecated Scheduled for removal from the core SDK in MINT 1.4; the biology templates move to a dedicated package or the owning plugins. */ export function toTemplateDataFrame( template: DataFrameTemplate | BioTemplateEnvelope ): TemplateDataFrameAdapterResult { switch (template.template_id) { case 'sample-sheet': return toSampleDataFrame(template as SampleSheetTemplate) case 'sample-prep': return toSamplePrepDataFrame(template as SamplePrepTemplate) case 'calibration-curve': return toCalibrationCurveDataFrame(template as CalibrationCurveTemplate) case 'time-course': return toTimeCourseDataFrame(template as TimeCourseTemplate) case 'protocol-steps': return toProtocolDataFrame(template as ProtocolStepsTemplate) case 'assay-matrix': return toAssayMatrixDataFrame(template as AssayMatrixTemplate) case 'reagent-list': return toReagentDataFrame(template as ReagentListTemplate) case 'flow-cytometry-panel': return toFlowPanelDataFrame(template as FlowCytometryPanelTemplate) case 'instrument-run': return toInstrumentRunDataFrame(template as InstrumentRunTemplate) case 'qpcr-plate': return toQpcrDataFrame(template as QpcrPlateTemplate) default: throw new Error(`Template '${String(template.template_id)}' does not expose a DataFrame adapter.`) } } /** @deprecated Scheduled for removal from the core SDK in MINT 1.4; the biology templates move to a dedicated package or the owning plugins. */ export function toWellMapArray(wells: Record): Well[] { return Object.values(wells) }