import { CONCENTRATION_UNITS, ICONS, PLATE_FORMAT_OPTIONS, } from './controlSchemaConstants' import type { BioTemplateControlSchema, } from './controlSchemaTypes' import type { TemplateId, } from './types' export const templateControlSchemas = { 'plate-map': { plateName: { label: 'Plate name', default: 'Plate 1', section: 'layout', sectionLabel: 'Layout', sectionSubtitle: 'Plate geometry', view: 'design', sidebar: { icon: ICONS.plate, iconColor: '#0d9488', iconBg: '#ccfbf1' }, }, plateFormat: { label: 'Format', default: 96, options: PLATE_FORMAT_OPTIONS, section: 'layout', view: 'design', }, sampleNames: { type: 'tags', label: 'Samples', default: ['Control', 'Treatment'], section: 'samples', sectionLabel: 'Samples', sectionSubtitle: 'Groups and legend', view: 'design', sidebar: { icon: ICONS.samples, iconColor: '#10b981', iconBg: '#d1fae5' }, }, }, 'sample-sheet': { sampleCount: { type: 'number', label: 'Sample count', default: 2, min: 1, max: 10000, section: 'samples', sectionLabel: 'Samples', sectionSubtitle: 'Metadata table', view: 'design', sidebar: { icon: ICONS.samples, iconColor: '#10b981', iconBg: '#d1fae5' }, }, includeGroups: { label: 'Include groups', default: true, section: 'samples', view: 'design', }, includeBatch: { label: 'Include batch', default: false, section: 'columns', sectionLabel: 'Columns', view: 'design', sidebar: { icon: ICONS.table, iconColor: '#0ea5e9', iconBg: '#e0f2fe' }, }, }, 'sample-prep': { prepType: { label: 'Prep type', default: 'extraction', options: ['extraction', 'dilution', 'normalization', 'transfer', 'quench', 'custom'], section: 'protocol', sectionLabel: 'Protocol', sectionSubtitle: 'Prep workflow', view: 'design', sidebar: { icon: ICONS.run, iconColor: '#f97316', iconBg: '#ffedd5' }, }, volumeUnit: { label: 'Volume unit', default: 'uL', options: ['uL', 'mL'], section: 'protocol', view: 'design', }, outputVolume: { type: 'number', label: 'Output volume', default: 50, min: 0, section: 'protocol', view: 'design', }, }, 'dose-response': { unit: { label: 'Dose unit', default: 'uM', options: CONCENTRATION_UNITS, section: 'dose', sectionLabel: 'Dose Design', sectionSubtitle: 'Concentration series', view: 'design', sidebar: { icon: ICONS.dose, iconColor: '#8b5cf6', iconBg: '#ede9fe' }, }, replicates: { type: 'number', label: 'Replicates', default: 3, min: 1, max: 24, section: 'dose', view: 'design', }, includePlateLayout: { label: 'Create plate layout', default: true, section: 'layout', sectionLabel: 'Layout', sectionSubtitle: 'Well assignment', view: 'design', sidebar: { icon: ICONS.plate, iconColor: '#0d9488', iconBg: '#ccfbf1', defaultOpen: false }, }, }, 'calibration-curve': { analyte: { label: 'Analyte', default: 'Analyte', section: 'standards', sectionLabel: 'Standards', sectionSubtitle: 'Curve setup', view: 'analysis', sidebar: { icon: ICONS.dose, iconColor: '#8b5cf6', iconBg: '#ede9fe' }, }, model: { label: 'Model', default: 'linear', options: ['linear', 'linear-weighted-1-x', 'linear-weighted-1-x2', 'quadratic', 'four-parameter-logistic'], section: 'fit', sectionLabel: 'Fit', view: 'analysis', sidebar: { icon: ICONS.settings, iconColor: '#0d9488', iconBg: '#ccfbf1' }, }, minRSquared: { type: 'number', label: 'Minimum R squared', default: 0.99, min: 0, max: 1, props: { step: 0.001 }, section: 'fit', view: 'analysis', }, }, 'time-course': { timeUnit: { label: 'Time unit', default: 'hour', options: ['second', 'minute', 'hour', 'day', 'week'], section: 'schedule', sectionLabel: 'Schedule', sectionSubtitle: 'Sampling timeline', view: 'design', sidebar: { icon: ICONS.run, iconColor: '#0ea5e9', iconBg: '#e0f2fe' }, }, replicates: { type: 'number', label: 'Replicates', default: 3, min: 1, max: 24, section: 'samples', sectionLabel: 'Samples', view: 'design', sidebar: { icon: ICONS.samples, iconColor: '#10b981', iconBg: '#d1fae5' }, }, }, 'protocol-steps': { defaultDuration: { type: 'number', label: 'Default duration', default: 30, min: 0, section: 'protocol', sectionLabel: 'Protocol', sectionSubtitle: 'Step defaults', view: 'design', sidebar: { icon: ICONS.run, iconColor: '#f97316', iconBg: '#ffedd5' }, props: { suffix: 'min' }, }, editable: { label: 'Editable timeline', default: true, section: 'protocol', view: 'design', }, }, 'assay-matrix': { featureType: { label: 'Feature type', default: 'metabolite', options: ['metabolite', 'protein', 'gene', 'cell', 'compound', 'readout', 'other'], section: 'features', sectionLabel: 'Features', sectionSubtitle: 'Measurement matrix', view: 'analysis', sidebar: { icon: ICONS.table, iconColor: '#0ea5e9', iconBg: '#e0f2fe' }, }, normalizeValues: { label: 'Normalize values', default: false, section: 'analysis', sectionLabel: 'Analysis', view: 'analysis', sidebar: { icon: ICONS.settings, iconColor: '#0d9488', iconBg: '#ccfbf1', defaultOpen: false }, }, }, 'reagent-list': { reagentKind: { label: 'Reagent kind', default: 'reagent', options: ['compound', 'antibody', 'primer', 'enzyme', 'buffer', 'media', 'kit', 'reagent', 'other'], section: 'inventory', sectionLabel: 'Inventory', sectionSubtitle: 'Reagent metadata', view: 'design', sidebar: { icon: ICONS.table, iconColor: '#10b981', iconBg: '#d1fae5' }, }, trackStock: { label: 'Track stock level', default: true, section: 'inventory', view: 'design', }, }, 'flow-cytometry-panel': { markers: { type: 'tags', label: 'Markers', default: ['CD3', 'CD4', 'CD8'], section: 'panel', sectionLabel: 'Panel', sectionSubtitle: 'Markers and controls', view: 'design', sidebar: { icon: ICONS.table, iconColor: '#0ea5e9', iconBg: '#e0f2fe' }, }, instrument: { label: 'Instrument', default: 'Flow cytometer', section: 'panel', sectionLabel: 'Panel', sectionSubtitle: 'Markers and controls', view: 'design', sidebar: { icon: ICONS.settings, iconColor: '#0d9488', iconBg: '#ccfbf1' }, }, includeDefaultControls: { label: 'Default controls', default: true, section: 'panel', view: 'design', }, }, 'instrument-run': { instrument: { label: 'Instrument', default: 'LC-MS', options: ['LC-MS', 'GC-MS', 'Orbitrap', 'Triple quadrupole', 'Plate reader', 'Other'], section: 'acquisition', sectionLabel: 'Acquisition', sectionSubtitle: 'Run queue', view: 'run', sidebar: { icon: ICONS.run, iconColor: '#ef4444', iconBg: '#fee2e2' }, }, method: { label: 'Method', default: 'Default method', section: 'acquisition', view: 'run', }, includeQc: { label: 'Include QC', default: true, section: 'quality', sectionLabel: 'Quality Control', view: 'run', sidebar: { icon: ICONS.settings, iconColor: '#0d9488', iconBg: '#ccfbf1', defaultOpen: false }, }, }, 'qpcr-plate': { chemistry: { label: 'Chemistry', default: 'sybr', options: ['sybr', 'taqman', 'probe', 'evagreen', 'other'], section: 'assay', sectionLabel: 'Assay', sectionSubtitle: 'qPCR setup', view: 'design', sidebar: { icon: ICONS.plate, iconColor: '#0d9488', iconBg: '#ccfbf1' }, }, replicates: { type: 'number', label: 'Replicates', default: 3, min: 1, max: 12, section: 'assay', view: 'design', }, includeNoTemplateControls: { label: 'No-template controls', default: true, section: 'controls', sectionLabel: 'Controls', view: 'design', sidebar: { icon: ICONS.settings, iconColor: '#8b5cf6', iconBg: '#ede9fe', defaultOpen: false }, }, }, } satisfies Record