"use client";
const require_create_split_props = require("../../utils/create-split-props.cjs");
const require_factory = require("../factory.cjs");
const require_use_date_picker_context = require("./use-date-picker-context.cjs");
const require_use_date_picker_view_props_context = require("./use-date-picker-view-props-context.cjs");
const require_use_date_picker_table_cell_props_context = require("./use-date-picker-table-cell-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-picker/date-picker-table-cell.tsx
var splitTableCellProps = require_create_split_props.createSplitProps();
var DatePickerTableCell = (0, react.forwardRef)((props, ref) => {
	const [cellProps, localProps] = splitTableCellProps(props, [
		"disabled",
		"value",
		"visibleRange",
		"columns"
	]);
	const datePicker = require_use_date_picker_context.useDatePickerContext();
	const viewProps = require_use_date_picker_view_props_context.useDatePickerViewPropsContext();
	const mergedProps = (0, _zag_js_react.mergeProps)({
		day: datePicker.getDayTableCellProps,
		month: datePicker.getMonthTableCellProps,
		year: datePicker.getYearTableCellProps
	}[viewProps.view](cellProps), localProps);
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_use_date_picker_table_cell_props_context.DatePickerTableCellPropsProvider, {
		value: cellProps,
		children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.ark.td, {
			ref,
			...mergedProps
		})
	});
});
DatePickerTableCell.displayName = "DatePickerTableCell";
//#endregion
exports.DatePickerTableCell = DatePickerTableCell;
