import { _ as defaultBaseState, f as createBaseState, t as PHDocumentController } from "../../dist-DZj99xX4.js";
import "../../dist-DAY54QOk.js";
import { _ as definedNonNullAnySchema, a as assertIsHealthReportState, c as healthReportDocumentType, d as GraphMetricsInputSchema, f as GraphMetricsSchema, g as HealthStatusSchema, h as HealthReportStateSchema, i as assertIsHealthReportDocument, l as AddCheckInputSchema, m as HealthCheckSchema, n as HealthReportDocumentSchema, o as isHealthReportDocument, p as HealthCategorySchema, r as HealthReportPHStateSchema, s as isHealthReportState, t as HealthReportDocumentHeaderSchema, u as GenerateReportInputSchema, v as isDefinedNonNullAny } from "../../document-schema-DOs2T__c.js";
import { a as utils$1, c as actions, d as generateReport, i as initialLocalState, l as addCheck, n as utils, o as reducer, r as initialGlobalState, s as documentModel, t as HealthReport, u as creators_exports } from "../../module-DPzH7-S-.js";
import { i as useSelectedHealthReportDocument, n as useHealthReportDocumentsInSelectedDrive, r as useHealthReportDocumentsInSelectedFolder, t as useHealthReportDocumentById } from "../../hooks-9sUpePzj.js";
import { n as latestVersion, r as supportedVersions, t as healthReportUpgradeManifest } from "../../upgrade-manifest-CHIvGh5F.js";
//#region document-models/health-report/v1/gen/controller.ts
/**
* WARNING: DO NOT EDIT
* This file is auto-generated and updated by codegen
*/
const HealthReportController = PHDocumentController.forDocumentModel(HealthReport);
//#endregion
//#region document-models/health-report/v1/gen/ph-factories.ts
function defaultGlobalState() {
	return {
		generatedAt: null,
		generatedBy: null,
		mode: null,
		overallStatus: null,
		checks: [],
		graphMetrics: null,
		recommendations: []
	};
}
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 HealthReportDocument with custom global and local state
* This properly handles the PHBaseState requirements while allowing
* document-specific state to be set.
*/
function createHealthReportDocument(state) {
	return utils$1.createDocument(state ? createState(createBaseState(state.auth, state.document), state.global, state.local) : void 0);
}
//#endregion
export { AddCheckInputSchema, GenerateReportInputSchema, GraphMetricsInputSchema, GraphMetricsSchema, HealthCategorySchema, HealthCheckSchema, HealthReport, HealthReportController, HealthReportDocumentHeaderSchema, HealthReportDocumentSchema, HealthReportPHStateSchema, HealthReportStateSchema, HealthStatusSchema, actions, addCheck, assertIsHealthReportDocument, assertIsHealthReportState, createHealthReportDocument, createState, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, documentModel, generateReport, healthReportDocumentType, creators_exports as healthReportReportManagementActions, healthReportUpgradeManifest, initialGlobalState, initialLocalState, isDefinedNonNullAny, isHealthReportDocument, isHealthReportState, latestVersion, reducer, supportedVersions, useHealthReportDocumentById, useHealthReportDocumentsInSelectedDrive, useHealthReportDocumentsInSelectedFolder, useSelectedHealthReportDocument, utils };

//# sourceMappingURL=index.js.map