import { p as createBaseState, t as PHDocumentController, v as defaultBaseState } from "../../dist-uUUuTqM0.js";
import { a as utils$1, c as documentModel, i as initialLocalState, n as utils, o as actions, r as initialGlobalState, s as reducer, t as OperationalHubProfile } from "../../module-C-RNzl6i.js";
import { a as setOperatorTeam, c as RemoveSubteamInputSchema, d as definedNonNullAnySchema, f as isDefinedNonNullAny, i as setOperationalHubName, l as SetOperationalHubNameInputSchema, n as creators_exports, o as AddSubteamInputSchema, r as removeSubteam, s as OperationalHubProfileStateSchema, t as addSubteam, u as SetOperatorTeamInputSchema } from "../../creators-BZ72KijW.js";
import { a as assertIsOperationalHubProfileState, c as operationalHubProfileDocumentType, i as assertIsOperationalHubProfileDocument, n as OperationalHubProfileDocumentSchema, o as isOperationalHubProfileDocument, r as OperationalHubProfilePHStateSchema, s as isOperationalHubProfileState, t as OperationalHubProfileDocumentHeaderSchema } from "../../document-schema-DUJorxA0.js";
import { n as latestVersion, r as supportedVersions, t as operationalHubProfileUpgradeManifest } from "../../upgrade-manifest-c4gvlvQ1.js";
import "../../dist-mx7YTOSV.js";
import "../../chunk-VBDAOXYI-DjbP4DfS.js";
import { i as useSelectedOperationalHubProfileDocument, n as useOperationalHubProfileDocumentsInSelectedDrive, r as useOperationalHubProfileDocumentsInSelectedFolder, t as useOperationalHubProfileDocumentById } from "../../hooks-BQaATsSq.js";
//#region document-models/operational-hub-profile/v1/gen/ph-factories.ts
function defaultGlobalState() {
	return {
		name: "",
		operatorTeam: null,
		subteams: []
	};
}
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 OperationalHubProfileDocument with custom global and local state
* This properly handles the PHBaseState requirements while allowing
* document-specific state to be set.
*/
function createOperationalHubProfileDocument(state) {
	return utils$1.createDocument(state ? createState(createBaseState(state.auth, state.document), state.global, state.local) : void 0);
}
//#endregion
//#region document-models/operational-hub-profile/v1/gen/controller.ts
const OperationalHubProfileController = PHDocumentController.forDocumentModel(OperationalHubProfile);
//#endregion
export { AddSubteamInputSchema, OperationalHubProfileController, OperationalHubProfileDocumentHeaderSchema, OperationalHubProfileDocumentSchema, OperationalHubProfilePHStateSchema, OperationalHubProfileStateSchema, RemoveSubteamInputSchema, SetOperationalHubNameInputSchema, SetOperatorTeamInputSchema, actions, addSubteam, assertIsOperationalHubProfileDocument, assertIsOperationalHubProfileState, createOperationalHubProfileDocument, createState, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, documentModel, initialGlobalState, initialLocalState, isDefinedNonNullAny, isOperationalHubProfileDocument, isOperationalHubProfileState, latestVersion, creators_exports as operationalHubProfileConfigurationActions, operationalHubProfileDocumentType, operationalHubProfileUpgradeManifest, reducer, removeSubteam, setOperationalHubName, setOperatorTeam, supportedVersions, useOperationalHubProfileDocumentById, useOperationalHubProfileDocumentsInSelectedDrive, useOperationalHubProfileDocumentsInSelectedFolder, useSelectedOperationalHubProfileDocument, utils };

//# sourceMappingURL=index.js.map