import { createTRPCRouter, protectedProcedure } from "../trpc.js";
import {
  createVacationRequest,
  CreateVacationRequestSchema,
} from "./vacation-create-support.js";
import { vacationManagementProcedures } from "./vacation-management-procedures.js";
import { vacationReadProcedures } from "./vacation-read.js";

export const vacationRouter = createTRPCRouter({
  ...vacationReadProcedures,
  ...vacationManagementProcedures,

  create: protectedProcedure
    .input(CreateVacationRequestSchema)
    .mutation(({ ctx, input }) => createVacationRequest(ctx, input)),
});
