import { p as createBaseState, t as PHDocumentController, v as defaultBaseState } from "./dist-RakiOObV.mjs";
import { T as useDocumentById, c as useDocumentsInSelectedFolder, g as useSelectedDocument, s as useDocumentsInSelectedDrive } from "./dist-DFMBprYi.mjs";
import { a as utils, d as isVaultConfigDocument, l as assertIsVaultConfigDocument, t as VaultConfig } from "./module-CtH3vWTD.mjs";
//#region document-models/vault-config/v1/gen/controller.ts
/**
* WARNING: DO NOT EDIT
* This file is auto-generated and updated by codegen
*/
const VaultConfigController = PHDocumentController.forDocumentModel(VaultConfig);
//#endregion
//#region document-models/vault-config/v1/gen/ph-factories.ts
function defaultGlobalState() {
	return {
		name: null,
		domain: null,
		dimensions: null,
		vocabulary: null,
		features: [],
		pipeline: null,
		maintenance: null,
		extractionCategories: [],
		noteSchema: null,
		mocSchema: null,
		updatedAt: null
	};
}
function defaultLocalState() {
	return {};
}
function defaultPHState() {
	return {
		...defaultBaseState(),
		global: defaultGlobalState(),
		local: defaultLocalState()
	};
}
function createGlobalState(state) {
	return {
		...defaultGlobalState(),
		...state || {}
	};
}
function createLocalState(state) {
	return {
		...defaultLocalState(),
		...state || {}
	};
}
function createState(baseState, globalState, localState) {
	return {
		...createBaseState(baseState?.auth, baseState?.document),
		global: createGlobalState(globalState),
		local: createLocalState(localState)
	};
}
/**
* Creates a VaultConfigDocument with custom global and local state
* This properly handles the PHBaseState requirements while allowing
* document-specific state to be set.
*/
function createVaultConfigDocument(state) {
	return utils.createDocument(state ? createState(createBaseState(state.auth, state.document), state.global, state.local) : void 0);
}
//#endregion
//#region document-models/vault-config/v1/hooks.ts
/** Hook to get a VaultConfig document by its id */
function useVaultConfigDocumentById(documentId) {
	const [document, dispatch] = useDocumentById(documentId);
	if (!isVaultConfigDocument(document)) return [void 0, void 0];
	return [document, dispatch];
}
/** Hook to get the selected VaultConfig document */
function useSelectedVaultConfigDocument() {
	const [document, dispatch] = useSelectedDocument();
	assertIsVaultConfigDocument(document);
	return [document, dispatch];
}
/** Hook to get all VaultConfig documents in the selected drive */
function useVaultConfigDocumentsInSelectedDrive() {
	return useDocumentsInSelectedDrive()?.filter(isVaultConfigDocument);
}
/** Hook to get all VaultConfig documents in the selected folder */
function useVaultConfigDocumentsInSelectedFolder() {
	return useDocumentsInSelectedFolder()?.filter(isVaultConfigDocument);
}
//#endregion
export { createState as a, defaultLocalState as c, useVaultConfigDocumentsInSelectedFolder as i, defaultPHState as l, useVaultConfigDocumentById as n, createVaultConfigDocument as o, useVaultConfigDocumentsInSelectedDrive as r, defaultGlobalState as s, useSelectedVaultConfigDocument as t, VaultConfigController as u };

//# sourceMappingURL=vault-config-C8ugF_F3.mjs.map