"use client";
const require_create_split_props = require("../../utils/create-split-props.cjs");
const require_factory = require("../factory.cjs");
const require_use_date_input_context = require("./use-date-input-context.cjs");
const require_use_date_input_segment_group_props_context = require("./use-date-input-segment-group-props-context.cjs");
let react = require("react");
let _zag_js_react = require("@zag-js/react");
let react_jsx_runtime = require("react/jsx-runtime");
//#region src/components/date-input/date-input-segment.tsx
var splitSegmentProps = require_create_split_props.createSplitProps();
var DateInputSegment = (0, react.forwardRef)((props, ref) => {
	const [segmentProps, localProps] = splitSegmentProps(props, ["segment"]);
	const segmentGroupProps = require_use_date_input_segment_group_props_context.useDateInputSegmentGroupPropsContext();
	const mergedProps = (0, _zag_js_react.mergeProps)(require_use_date_input_context.useDateInputContext().getSegmentProps({
		...segmentProps,
		index: segmentGroupProps.index
	}), localProps);
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.ark.span, {
		...mergedProps,
		ref,
		children: segmentProps.segment.text
	});
});
DateInputSegment.displayName = "DateInputSegment";
//#endregion
exports.DateInputSegment = DateInputSegment;
