import { QuirrelClient, } from "./client";
import { registerDevelopmentDefaults } from "./client/config";
registerDevelopmentDefaults({
    applicationPort: 5173,
});
export function Queue(route, handler, options) {
    const quirrel = new QuirrelClient({
        options,
        handler,
        route,
    });
    async function svelteHandler({ request }) {
        const { body, headers, status } = await quirrel.respondTo(await request.text(), request.headers);
        return new Response(body, { headers, status });
    }
    svelteHandler.enqueue = (payload, options) => quirrel.enqueue(payload, options);
    svelteHandler.enqueueMany = (jobs) => quirrel.enqueueMany(jobs);
    svelteHandler.delete = (jobId) => quirrel.delete(jobId);
    svelteHandler.invoke = (jobId) => quirrel.invoke(jobId);
    svelteHandler.get = () => quirrel.get();
    svelteHandler.getById = (jobId) => quirrel.getById(jobId);
    return svelteHandler;
}
export function CronJob(route, cronSchedule, handler, options) {
    return Queue(route, handler, options);
}
//# sourceMappingURL=sveltekit.js.map