import { p as createBaseState, t as PHDocumentController, v as defaultBaseState } from "./dist-COZZnek9.js";
import { a as utils, t as VetraCloudEnvironment } from "./module-DgaYTkIe.js";
//#region document-models/vetra-cloud-environment/v1/gen/controller.ts
/**
* WARNING: DO NOT EDIT
* This file is auto-generated and updated by codegen
*/
const VetraCloudEnvironmentController = PHDocumentController.forDocumentModel(VetraCloudEnvironment);
//#endregion
//#region document-models/vetra-cloud-environment/v1/gen/ph-factories.ts
function defaultGlobalState() {
	return {
		owner: null,
		label: null,
		genericSubdomain: null,
		genericBaseDomain: null,
		customDomain: {
			enabled: false,
			domain: null,
			dnsRecords: []
		},
		defaultPackageRegistry: null,
		services: [],
		packages: [],
		status: "DRAFT",
		apexService: null,
		autoUpdateChannel: null,
		runtimeConfig: null,
		studioInstanceId: 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 VetraCloudEnvironmentDocument with custom global and local state
* This properly handles the PHBaseState requirements while allowing
* document-specific state to be set.
*/
function createVetraCloudEnvironmentDocument(state) {
	return utils.createDocument(createState(createBaseState(state?.auth, {
		version: 1,
		...state?.document
	}), state?.global, state?.local));
}
//#endregion
export { defaultPHState as a, defaultLocalState as i, createVetraCloudEnvironmentDocument as n, VetraCloudEnvironmentController as o, defaultGlobalState as r, createState as t };

//# sourceMappingURL=vetra-cloud-environment-D9Hcts1t.js.map