import { ShiftRotationDayShiftVC } from '../../../presentation/validationClasses/shiftManagement/shiftRotationDayShiftVC';
import { ShiftDefinitionInput } from '../../types/shiftManagement/shiftDefinitionInput';

/**
 * Maps the user-facing rotation-day shift payload onto the input shape consumed by
 * `ShiftService` when creating or version-bumping a rotation-owned `Shifts` row.
 *
 * Drops the optional `shiftCode` identity field — the caller decides whether the code
 * means "match-and-update an existing shift" or "treat as new"; this mapper only carries
 * the shift's definition (name + color + description + timeSlots).
 */
export const mapRotationDayShiftVCToShiftInput = (s: ShiftRotationDayShiftVC): ShiftDefinitionInput => ({
    color: s.color,
    description: s.description,
    name: s.name,
    timeSlots: s.timeSlots,
});
