"use client";
'use strict';

var reactDayPicker = require('react-day-picker');
var lucideReact = require('lucide-react');
var clsx = require('clsx');
var tailwindMerge = require('tailwind-merge');
var jsxRuntime = require('react/jsx-runtime');

var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
  for (var prop in b || (b = {}))
    if (__hasOwnProp.call(b, prop))
      __defNormalProp(a, prop, b[prop]);
  if (__getOwnPropSymbols)
    for (var prop of __getOwnPropSymbols(b)) {
      if (__propIsEnum.call(b, prop))
        __defNormalProp(a, prop, b[prop]);
    }
  return a;
};
var __objRest = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols)
    for (var prop of __getOwnPropSymbols(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
function cn(...inputs) {
  return tailwindMerge.twMerge(clsx.clsx(inputs));
}
function Calendar(_a) {
  var _b = _a, {
    className,
    classNames,
    showOutsideDays = true
  } = _b, props = __objRest(_b, [
    "className",
    "classNames",
    "showOutsideDays"
  ]);
  return /* @__PURE__ */ jsxRuntime.jsx(
    reactDayPicker.DayPicker,
    __spreadValues({
      "data-slot": "calendar",
      showOutsideDays,
      weekStartsOn: 1,
      className: cn("w-[250px]", className),
      classNames: __spreadValues({
        root: "p-0",
        months: "flex gap-0",
        month: "flex h-[304px] w-[250px] flex-col overflow-clip",
        month_caption: "flex shrink-0 items-center justify-center gap-2 border-b border-stroke-hairline p-2",
        caption_label: "flex-1 text-center text-sm font-medium text-foreground",
        nav: "contents",
        button_previous: "inline-flex size-6 shrink-0 items-center justify-center rounded-sm bg-transparent text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
        button_next: "inline-flex size-6 shrink-0 items-center justify-center rounded-sm bg-transparent text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
        month_grid: "flex flex-1 flex-col gap-1 p-2",
        weekdays: "flex flex-1 gap-1",
        weekday: "flex flex-1 items-center justify-center rounded-xs p-2 text-center text-xs font-medium text-foreground/30",
        weeks: "contents",
        week: "flex flex-1 gap-1",
        day: cn(
          "relative flex flex-1 items-center justify-center rounded-xs p-0 text-center text-xs font-medium text-foreground",
          "has-[button]:hover:bg-muted",
          "[&:has([aria-selected])]:bg-primary/10",
          "[&:has([aria-selected].range_start)]:rounded-l-xs [&:has([aria-selected].range_start)]:rounded-r-none",
          "[&:has([aria-selected].range_end)]:rounded-r-xs [&:has([aria-selected].range_end)]:rounded-l-none",
          "[&:has([aria-selected].range_start.range_end)]:rounded-xs"
        ),
        day_button: cn(
          "inline-flex size-full items-center justify-center rounded-xs text-xs font-medium transition-colors",
          "hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
        ),
        today: cn(
          "[&>button]:relative [&>button]:z-10",
          "[&>button]:before:absolute [&>button]:before:size-[21px] [&>button]:before:rounded-full [&>button]:before:bg-[#e74341]",
          "[&>button]:before:left-1/2 [&>button]:before:top-1/2 [&>button]:before:-translate-x-1/2 [&>button]:before:-translate-y-1/2",
          "[&>button]:text-white [&>button]:hover:text-white [&>button]:hover:bg-transparent",
          "[&>button[aria-selected]]:before:hidden"
        ),
        outside: "text-foreground/30 [&>button]:text-foreground/30 [&>button]:hover:text-foreground/50",
        disabled: "text-foreground/20 pointer-events-none",
        hidden: "invisible",
        selected: cn(
          "[&:not(.range_middle)]:bg-primary [&:not(.range_middle)]:rounded-xs",
          "[&:not(.range_middle)>button]:text-primary-foreground [&:not(.range_middle)>button]:hover:bg-primary [&:not(.range_middle)>button]:hover:text-primary-foreground"
        ),
        range_start: "range_start",
        range_end: "range_end",
        range_middle: cn(
          "range_middle",
          "[&>button]:bg-transparent [&>button]:text-primary [&>button]:hover:bg-primary/20 [&>button]:hover:text-primary"
        )
      }, classNames),
      components: {
        Chevron: ({ orientation }) => {
          const Icon = orientation === "left" ? lucideReact.ChevronLeft : lucideReact.ChevronRight;
          return /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "size-4" });
        }
      }
    }, props)
  );
}

exports.Calendar = Calendar;
//# sourceMappingURL=calendar.cjs.map
//# sourceMappingURL=calendar.cjs.map