
/**
 * @typedef {import('pocketbase').default} PocketBase
 * @typedef {import('./authService').AuthClient} AuthClient
 */

import { authService } from './authService';

/**
 * Creates a PocketBase client from the request context
 * @param {import('astro').APIContext} context
 * @returns {AuthClient}
 */
export const createClient = (context) => {
    return authService.createClientFromRequest(context.request);
};