'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var chunk76NNDZH6_cjs = require('./chunk-76NNDZH6.cjs');
var chunkOLISEQHS_cjs = require('./chunk-OLISEQHS.cjs');
var lib = require('@djangocfg/ui-core/lib');
var jsxRuntime = require('react/jsx-runtime');

function CronSchedulerInner({
  showPreview,
  showCronExpression,
  allowCopy,
  timeFormat,
  disabled,
  className
}) {
  const { type } = chunk76NNDZH6_cjs.useCronType();
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: lib.cn("space-y-3", className), children: [
    /* @__PURE__ */ jsxRuntime.jsx(chunk76NNDZH6_cjs.ScheduleTypeSelector, { disabled }),
    type !== "custom" && /* @__PURE__ */ jsxRuntime.jsx(chunk76NNDZH6_cjs.TimeSelector, { format: timeFormat, disabled }),
    type === "weekly" && /* @__PURE__ */ jsxRuntime.jsx(chunk76NNDZH6_cjs.DayChips, { disabled, showPresets: true }),
    type === "monthly" && /* @__PURE__ */ jsxRuntime.jsx(chunk76NNDZH6_cjs.MonthDayGrid, { disabled, showPresets: true }),
    type === "custom" && /* @__PURE__ */ jsxRuntime.jsx(chunk76NNDZH6_cjs.CustomInput, { disabled }),
    showPreview && /* @__PURE__ */ jsxRuntime.jsx(
      chunk76NNDZH6_cjs.SchedulePreview,
      {
        showCronExpression: true,
        allowCopy
      }
    )
  ] });
}
chunkOLISEQHS_cjs.__name(CronSchedulerInner, "CronSchedulerInner");
function CronScheduler({
  value,
  onChange,
  defaultType = "daily",
  showPreview = true,
  showCronExpression = false,
  allowCopy = false,
  timeFormat = "24h",
  disabled = false,
  className
}) {
  return /* @__PURE__ */ jsxRuntime.jsx(
    chunk76NNDZH6_cjs.CronSchedulerProvider,
    {
      value,
      onChange,
      defaultType,
      children: /* @__PURE__ */ jsxRuntime.jsx(
        CronSchedulerInner,
        {
          showPreview,
          showCronExpression,
          allowCopy,
          timeFormat,
          disabled,
          className
        }
      )
    }
  );
}
chunkOLISEQHS_cjs.__name(CronScheduler, "CronScheduler");
var CronScheduler_client_default = CronScheduler;

exports.CronScheduler = CronScheduler;
exports.default = CronScheduler_client_default;
//# sourceMappingURL=CronScheduler.client-WEJF4PWQ.cjs.map
//# sourceMappingURL=CronScheduler.client-WEJF4PWQ.cjs.map