import { Configuration, FrontendApi } from '@ory/client';
import { PUBLIC_KRATOS_URL } from '$env/static/public';
import { KRATOS_SERVER_URL } from '$env/static/private';

// Server-side client (without browser-specific settings)
// Used only for session validation in server-side loaders
export const kratosServerClient = new FrontendApi(
	new Configuration({
		basePath: KRATOS_SERVER_URL || PUBLIC_KRATOS_URL || 'http://localhost:7200'
	})
);
