import * as __WEBPACK_EXTERNAL_MODULE__tachybase_components__ from "@tachybase/components";
import * as __WEBPACK_EXTERNAL_MODULE__tachybase_schema__ from "@tachybase/schema";
import * as __WEBPACK_EXTERNAL_MODULE_antd__ from "antd";
import * as __WEBPACK_EXTERNAL_MODULE__ReadPretty_mjs__ from "./ReadPretty.mjs";
const mapTimeFormat = function() {
    return (props, field)=>{
        const format = props['format'] || 'HH:mm:ss';
        const onChange = props.onChange;
        return {
            ...props,
            format,
            value: (0, __WEBPACK_EXTERNAL_MODULE__tachybase_components__.dayjsable)(props.value, format),
            onChange: (value)=>{
                if (onChange) onChange((0, __WEBPACK_EXTERNAL_MODULE__tachybase_components__.formatDayjsValue)(value, format) || null);
            }
        };
    };
};
const TimePicker = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.connect)(__WEBPACK_EXTERNAL_MODULE_antd__.TimePicker, (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.mapProps)(mapTimeFormat()), (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.mapReadPretty)(__WEBPACK_EXTERNAL_MODULE__ReadPretty_mjs__.ReadPretty));
TimePicker.RangePicker = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.connect)(__WEBPACK_EXTERNAL_MODULE_antd__.TimePicker.RangePicker, (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.mapProps)(mapTimeFormat()), (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.mapReadPretty)(__WEBPACK_EXTERNAL_MODULE__ReadPretty_mjs__.ReadPretty));
const TimePicker_rslib_entry_ = TimePicker;
export { TimePicker, TimePicker_rslib_entry_ as default };
