calibrationMode.ts 803 B

12345678910111213141516171819
  1. import type { CalibrationMode } from '../api/client';
  2. /** Display order for the off/auto/on segmented controls. */
  3. export const CALIBRATION_MODES: CalibrationMode[] = ['off', 'auto', 'on'];
  4. /**
  5. * Active-button classes per calibration mode. Each state gets its own colour so
  6. * the selected value is legible at a glance rather than every choice reading as
  7. * the same "on" green: Off = red (never), Auto = blue (printer decides),
  8. * On = green (force every print).
  9. */
  10. export const CALIBRATION_MODE_ACTIVE: Record<CalibrationMode, string> = {
  11. off: 'bg-red-500 text-white',
  12. auto: 'bg-blue-500 text-white',
  13. on: 'bg-bambu-green text-white',
  14. };
  15. /** Inactive-button classes shared by every mode. */
  16. export const CALIBRATION_MODE_INACTIVE = 'bg-bambu-dark-tertiary text-bambu-gray hover:text-white';