import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import { withMode } from "../../dataSourceForm/utils.js";
import DatePickerCpt from "../../../date-picker/datePickerCpt.js";
import DatePickerReadPretty from "./ReadPretty.js";
import { isString } from "@pisell/utils";
import dayjs from "dayjs";
//#region src/components/dataSourceComponents/fields/DatePicker/WithMode.ts
/**
* @title: 带模式控制的 DatePicker 组件
* @description: 支持 edit、view、disabled 等渲染模式的日期选择器
*/
const DatePickerWithMode = withMode(DatePickerCpt, DatePickerReadPretty, (props) => {
	return _objectSpread2(_objectSpread2({}, props), {}, { value: isString(props.value) && props.value ? dayjs(props.value) : props.value });
});
//#endregion
export { DatePickerWithMode as default };
