import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
//#region src/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.ts
/**
* 将 `FloorMapLayoutContext` 与 Layout props 合并：各字段 props ?? ctx，props 显式值优先。
*/
function mergeFloorMapLayoutPropsFromContext(props, ctx) {
	var _props$floorMapConfig, _props$dataSources, _props$onSave, _props$onDataSourceRe, _props$dataSourceLabe, _props$dataSourceForm, _props$dataSourceReco, _props$loading, _props$saveError, _props$onElementRende, _props$toolbarShowSav, _props$paletteSidebar, _props$floorMapFullsc, _props$appearanceMode, _props$showDataSource, _props$viewportDockTo, _props$viewportDockTr;
	if (ctx == null) return props;
	return _objectSpread2(_objectSpread2({}, props), {}, {
		floorMapConfig: (_props$floorMapConfig = props.floorMapConfig) !== null && _props$floorMapConfig !== void 0 ? _props$floorMapConfig : ctx.floorMapConfig,
		dataSources: (_props$dataSources = props.dataSources) !== null && _props$dataSources !== void 0 ? _props$dataSources : ctx.dataSources,
		onSave: (_props$onSave = props.onSave) !== null && _props$onSave !== void 0 ? _props$onSave : ctx.onSave,
		onDataSourceRecordSave: (_props$onDataSourceRe = props.onDataSourceRecordSave) !== null && _props$onDataSourceRe !== void 0 ? _props$onDataSourceRe : ctx.onDataSourceRecordSave,
		dataSourceLabels: (_props$dataSourceLabe = props.dataSourceLabels) !== null && _props$dataSourceLabe !== void 0 ? _props$dataSourceLabe : ctx.dataSourceLabels,
		dataSourceFormColumns: (_props$dataSourceForm = props.dataSourceFormColumns) !== null && _props$dataSourceForm !== void 0 ? _props$dataSourceForm : ctx.dataSourceFormColumns,
		dataSourceRecordForm: (_props$dataSourceReco = props.dataSourceRecordForm) !== null && _props$dataSourceReco !== void 0 ? _props$dataSourceReco : ctx.dataSourceRecordForm,
		loading: (_props$loading = props.loading) !== null && _props$loading !== void 0 ? _props$loading : ctx.loading,
		saveError: (_props$saveError = props.saveError) !== null && _props$saveError !== void 0 ? _props$saveError : ctx.saveError,
		onElementRenderError: (_props$onElementRende = props.onElementRenderError) !== null && _props$onElementRende !== void 0 ? _props$onElementRende : ctx.onElementRenderError,
		toolbarShowSave: (_props$toolbarShowSav = props.toolbarShowSave) !== null && _props$toolbarShowSav !== void 0 ? _props$toolbarShowSav : ctx.toolbarShowSave,
		paletteSidebarVisibleLimit: (_props$paletteSidebar = props.paletteSidebarVisibleLimit) !== null && _props$paletteSidebar !== void 0 ? _props$paletteSidebar : ctx.paletteSidebarVisibleLimit,
		floorMapFullscreenMode: (_props$floorMapFullsc = props.floorMapFullscreenMode) !== null && _props$floorMapFullsc !== void 0 ? _props$floorMapFullsc : ctx.floorMapFullscreenMode,
		appearanceMode: (_props$appearanceMode = props.appearanceMode) !== null && _props$appearanceMode !== void 0 ? _props$appearanceMode : ctx.appearanceMode,
		showDataSourceRecordFormBlock: (_props$showDataSource = props.showDataSourceRecordFormBlock) !== null && _props$showDataSource !== void 0 ? _props$showDataSource : ctx.showDataSourceRecordFormBlock,
		viewportDockToolButtons: (_props$viewportDockTo = props.viewportDockToolButtons) !== null && _props$viewportDockTo !== void 0 ? _props$viewportDockTo : ctx.viewportDockToolButtons,
		viewportDockTrailing: (_props$viewportDockTr = props.viewportDockTrailing) !== null && _props$viewportDockTr !== void 0 ? _props$viewportDockTr : ctx.viewportDockTrailing
	});
}
//#endregion
export { mergeFloorMapLayoutPropsFromContext };
