import {
  CreateMovementFormType,
  createMovementSchema,
} from "../schemas/movement.schemas"

export async function createMovementAction(data: CreateMovementFormType) {
  const validatedFields = createMovementSchema.safeParse(data)

  if (!validatedFields.success) {
    return {
      success: false,
      errors: validatedFields.error.flatten().fieldErrors,
    }
  }
}
