import { n as cn } from "./utils-DXzSsU1e.js";
import { t as buttonVariants } from "./button-B9CnnuTu.js";
import { Fragment, createBlock, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderList, renderSlot, toDisplayString, unref, withCtx } from "vue";
import { reactiveOmit } from "@vueuse/core";
import { CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading, CalendarNext, CalendarPrev, CalendarRoot, useForwardProps, useForwardPropsEmits } from "reka-ui";
import { ChevronLeft, ChevronRight } from "@lucide/vue";
//#region src/components/ui/calendar/Calendar.vue?vue&type=script&setup=true&lang.ts
var _hoisted_1 = { class: "flex flex-col gap-y-4 mt-4 sm:flex-row sm:gap-x-4 sm:gap-y-0" };
//#endregion
//#region src/components/ui/calendar/Calendar.vue
var Calendar_default = /* @__PURE__ */ defineComponent({
	__name: "Calendar",
	props: {
		class: { type: [
			Boolean,
			null,
			String,
			Object,
			Array
		] },
		defaultValue: {},
		defaultPlaceholder: {},
		placeholder: {},
		pagedNavigation: { type: Boolean },
		preventDeselect: { type: Boolean },
		weekStartsOn: {},
		weekdayFormat: {},
		calendarLabel: {},
		fixedWeeks: { type: Boolean },
		maxValue: {},
		minValue: {},
		locale: {},
		numberOfMonths: {},
		disabled: { type: Boolean },
		readonly: { type: Boolean },
		initialFocus: { type: Boolean },
		isDateDisabled: { type: Function },
		isDateUnavailable: { type: Function },
		dir: {},
		nextPage: { type: Function },
		prevPage: { type: Function },
		modelValue: {},
		multiple: { type: Boolean },
		disableDaysOutsideCurrentView: { type: Boolean },
		asChild: { type: Boolean },
		as: {}
	},
	emits: ["update:modelValue", "update:placeholder"],
	setup(__props, { emit: __emit }) {
		const props = __props;
		const emits = __emit;
		const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(CalendarRoot), mergeProps({ class: unref(cn)("p-3", props.class) }, unref(forwarded)), {
				default: withCtx(({ grid, weekDays }) => [createVNode(unref(CalendarHeader_default), null, {
					default: withCtx(() => [
						createVNode(unref(CalendarPrev_default)),
						createVNode(unref(CalendarHeading_default)),
						createVNode(unref(CalendarNext_default))
					]),
					_: 1
				}), createElementVNode("div", _hoisted_1, [(openBlock(true), createElementBlock(Fragment, null, renderList(grid, (month) => {
					return openBlock(), createBlock(unref(CalendarGrid_default), { key: month.value.toString() }, {
						default: withCtx(() => [createVNode(unref(CalendarGridHead_default), null, {
							default: withCtx(() => [createVNode(unref(CalendarGridRow_default), null, {
								default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(weekDays, (day) => {
									return openBlock(), createBlock(unref(CalendarHeadCell_default), { key: day }, {
										default: withCtx(() => [createTextVNode(toDisplayString(day), 1)]),
										_: 2
									}, 1024);
								}), 128))]),
								_: 2
							}, 1024)]),
							_: 2
						}, 1024), createVNode(unref(CalendarGridBody_default), null, {
							default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(month.rows, (weekDates, index) => {
								return openBlock(), createBlock(unref(CalendarGridRow_default), {
									key: `weekDate-${index}`,
									class: "mt-2 w-full"
								}, {
									default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(weekDates, (weekDate) => {
										return openBlock(), createBlock(unref(CalendarCell_default), {
											key: weekDate.toString(),
											date: weekDate
										}, {
											default: withCtx(() => [createVNode(unref(CalendarCellTrigger_default), {
												day: weekDate,
												month: month.value
											}, null, 8, ["day", "month"])]),
											_: 2
										}, 1032, ["date"]);
									}), 128))]),
									_: 2
								}, 1024);
							}), 128))]),
							_: 2
						}, 1024)]),
						_: 2
					}, 1024);
				}), 128))])]),
				_: 1
			}, 16, ["class"]);
		};
	}
});
//#endregion
//#region src/components/ui/calendar/CalendarCell.vue
var CalendarCell_default = /* @__PURE__ */ defineComponent({
	__name: "CalendarCell",
	props: {
		class: { type: [
			Boolean,
			null,
			String,
			Object,
			Array
		] },
		date: {},
		asChild: { type: Boolean },
		as: {}
	},
	setup(__props) {
		const props = __props;
		const forwardedProps = useForwardProps(reactiveOmit(props, "class"));
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(CalendarCell), mergeProps({ class: unref(cn)("relative h-9 w-9 p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([data-selected])]:rounded-md [&:has([data-selected])]:bg-accent [&:has([data-selected][data-outside-view])]:bg-accent/50", props.class) }, unref(forwardedProps)), {
				default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
				_: 3
			}, 16, ["class"]);
		};
	}
});
//#endregion
//#region src/components/ui/calendar/CalendarCellTrigger.vue
var CalendarCellTrigger_default = /* @__PURE__ */ defineComponent({
	__name: "CalendarCellTrigger",
	props: {
		class: { type: [
			Boolean,
			null,
			String,
			Object,
			Array
		] },
		day: {},
		month: {},
		asChild: { type: Boolean },
		as: {}
	},
	setup(__props) {
		const props = __props;
		const forwardedProps = useForwardProps(reactiveOmit(props, "class"));
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(CalendarCellTrigger), mergeProps({ class: unref(cn)(unref(buttonVariants)({ variant: "ghost" }), "h-9 w-9 p-0 font-normal", "[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground", "data-[selected]:bg-primary data-[selected]:text-primary-foreground data-[selected]:opacity-100 data-[selected]:hover:bg-primary data-[selected]:hover:text-primary-foreground data-[selected]:focus:bg-primary data-[selected]:focus:text-primary-foreground", "data-[disabled]:text-muted-foreground data-[disabled]:opacity-50", "data-[unavailable]:text-destructive-foreground data-[unavailable]:line-through", "data-[outside-view]:text-muted-foreground data-[outside-view]:opacity-50 [&[data-outside-view][data-selected]]:bg-accent/50 [&[data-outside-view][data-selected]]:text-muted-foreground [&[data-outside-view][data-selected]]:opacity-30", props.class) }, unref(forwardedProps)), {
				default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
				_: 3
			}, 16, ["class"]);
		};
	}
});
//#endregion
//#region src/components/ui/calendar/CalendarGrid.vue
var CalendarGrid_default = /* @__PURE__ */ defineComponent({
	__name: "CalendarGrid",
	props: {
		class: { type: [
			Boolean,
			null,
			String,
			Object,
			Array
		] },
		asChild: { type: Boolean },
		as: {}
	},
	setup(__props) {
		const props = __props;
		const forwardedProps = useForwardProps(reactiveOmit(props, "class"));
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(CalendarGrid), mergeProps({ class: unref(cn)("w-full border-collapse space-y-1", props.class) }, unref(forwardedProps)), {
				default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
				_: 3
			}, 16, ["class"]);
		};
	}
});
//#endregion
//#region src/components/ui/calendar/CalendarGridBody.vue
var CalendarGridBody_default = /* @__PURE__ */ defineComponent({
	__name: "CalendarGridBody",
	props: {
		asChild: { type: Boolean },
		as: {}
	},
	setup(__props) {
		const props = __props;
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(CalendarGridBody), normalizeProps(guardReactiveProps(props)), {
				default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
				_: 3
			}, 16);
		};
	}
});
//#endregion
//#region src/components/ui/calendar/CalendarGridHead.vue
var CalendarGridHead_default = /* @__PURE__ */ defineComponent({
	__name: "CalendarGridHead",
	props: {
		asChild: { type: Boolean },
		as: {}
	},
	setup(__props) {
		const props = __props;
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(CalendarGridHead), normalizeProps(guardReactiveProps(props)), {
				default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
				_: 3
			}, 16);
		};
	}
});
//#endregion
//#region src/components/ui/calendar/CalendarGridRow.vue
var CalendarGridRow_default = /* @__PURE__ */ defineComponent({
	__name: "CalendarGridRow",
	props: {
		class: { type: [
			Boolean,
			null,
			String,
			Object,
			Array
		] },
		asChild: { type: Boolean },
		as: {}
	},
	setup(__props) {
		const props = __props;
		const forwardedProps = useForwardProps(reactiveOmit(props, "class"));
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(CalendarGridRow), mergeProps({ class: unref(cn)("flex", props.class) }, unref(forwardedProps)), {
				default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
				_: 3
			}, 16, ["class"]);
		};
	}
});
//#endregion
//#region src/components/ui/calendar/CalendarHeadCell.vue
var CalendarHeadCell_default = /* @__PURE__ */ defineComponent({
	__name: "CalendarHeadCell",
	props: {
		class: { type: [
			Boolean,
			null,
			String,
			Object,
			Array
		] },
		asChild: { type: Boolean },
		as: {}
	},
	setup(__props) {
		const props = __props;
		const forwardedProps = useForwardProps(reactiveOmit(props, "class"));
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(CalendarHeadCell), mergeProps({ class: unref(cn)("w-9 rounded-md text-[0.8rem] font-normal text-muted-foreground", props.class) }, unref(forwardedProps)), {
				default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
				_: 3
			}, 16, ["class"]);
		};
	}
});
//#endregion
//#region src/components/ui/calendar/CalendarHeader.vue
var CalendarHeader_default = /* @__PURE__ */ defineComponent({
	__name: "CalendarHeader",
	props: {
		class: { type: [
			Boolean,
			null,
			String,
			Object,
			Array
		] },
		asChild: { type: Boolean },
		as: {}
	},
	setup(__props) {
		const props = __props;
		const forwardedProps = useForwardProps(reactiveOmit(props, "class"));
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(CalendarHeader), mergeProps({ class: unref(cn)("relative flex w-full items-center justify-between pt-1", props.class) }, unref(forwardedProps)), {
				default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
				_: 3
			}, 16, ["class"]);
		};
	}
});
//#endregion
//#region src/components/ui/calendar/CalendarHeading.vue
var CalendarHeading_default = /* @__PURE__ */ defineComponent({
	__name: "CalendarHeading",
	props: {
		class: { type: [
			Boolean,
			null,
			String,
			Object,
			Array
		] },
		asChild: { type: Boolean },
		as: {}
	},
	setup(__props) {
		const props = __props;
		const forwardedProps = useForwardProps(reactiveOmit(props, "class"));
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(CalendarHeading), mergeProps({ class: unref(cn)("text-sm font-medium", props.class) }, unref(forwardedProps)), {
				default: withCtx(({ headingValue }) => [renderSlot(_ctx.$slots, "default", { headingValue }, () => [createTextVNode(toDisplayString(headingValue), 1)])]),
				_: 3
			}, 16, ["class"]);
		};
	}
});
//#endregion
//#region src/components/ui/calendar/CalendarNext.vue
var CalendarNext_default = /* @__PURE__ */ defineComponent({
	__name: "CalendarNext",
	props: {
		class: { type: [
			Boolean,
			null,
			String,
			Object,
			Array
		] },
		nextPage: { type: Function },
		asChild: { type: Boolean },
		as: {}
	},
	setup(__props) {
		const props = __props;
		const forwardedProps = useForwardProps(reactiveOmit(props, "class"));
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(CalendarNext), mergeProps({ class: unref(cn)(unref(buttonVariants)({ variant: "outline" }), "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100", props.class) }, unref(forwardedProps)), {
				default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [createVNode(unref(ChevronRight), { class: "h-4 w-4" })])]),
				_: 3
			}, 16, ["class"]);
		};
	}
});
//#endregion
//#region src/components/ui/calendar/CalendarPrev.vue
var CalendarPrev_default = /* @__PURE__ */ defineComponent({
	__name: "CalendarPrev",
	props: {
		class: { type: [
			Boolean,
			null,
			String,
			Object,
			Array
		] },
		prevPage: { type: Function },
		asChild: { type: Boolean },
		as: {}
	},
	setup(__props) {
		const props = __props;
		const forwardedProps = useForwardProps(reactiveOmit(props, "class"));
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(CalendarPrev), mergeProps({ class: unref(cn)(unref(buttonVariants)({ variant: "outline" }), "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100", props.class) }, unref(forwardedProps)), {
				default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [createVNode(unref(ChevronLeft), { class: "h-4 w-4" })])]),
				_: 3
			}, 16, ["class"]);
		};
	}
});
//#endregion
export { CalendarHeadCell_default as a, CalendarGridBody_default as c, CalendarCell_default as d, Calendar_default as f, CalendarHeader_default as i, CalendarGrid_default as l, CalendarNext_default as n, CalendarGridRow_default as o, CalendarHeading_default as r, CalendarGridHead_default as s, CalendarPrev_default as t, CalendarCellTrigger_default as u };

//# sourceMappingURL=calendar-CU8pgFN5.js.map