import { j as json } from './exports-D1quPX8S.js';
import { am as isSetupComplete, aZ as resolveStackDir, a6 as getAddonProfileSelection, b as annotateAddonProfileAvailability, a7 as getAddonProfiles } from './src-CidJbygh.js';
import { g as getState } from './state-fxN45gBp.js';
import { r as requireAdmin, d as getRequestId } from './helpers-kzwksNq1.js';
import './utils-BSRjJDrZ.js';
import './chunk-CLZ62Ad-.js';
import 'node:module';
import './provider-constants-DPrj3yBX.js';
import './dist-DOFcG0Zp.js';
import 'node:fs';
import 'node:path';
import 'buffer';
import 'fs';
import 'path';
import 'node:child_process';
import 'node:url';
import 'node:crypto';
import 'events';
import 'node:events';
import 'node:stream';
import 'node:string_decoder';
import 'assert';
import 'zlib';
import 'node:assert';
import 'node:fs/promises';
import 'node:os';
import './endpoints-UdQGgKsR.js';

//#region src/routes/api/setup/ollama-profiles/+server.ts
var GET = async (event) => {
	if (isSetupComplete(resolveStackDir())) {
		const authError = requireAdmin(event, getRequestId(event));
		if (authError) return authError;
	}
	const state = getState();
	return json({
		ok: true,
		profiles: await annotateAddonProfileAvailability(getAddonProfiles(state.homeDir, "ollama")),
		selectedProfile: getAddonProfileSelection(state.stackDir, "ollama")
	});
};

export { GET };
//# sourceMappingURL=_server.ts-CPoU3qb9.js.map
