'use strict';

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

var chunkF2CMIIOH_cjs = require('./chunk-F2CMIIOH.cjs');
var chunkWGEGR3DF_cjs = require('./chunk-WGEGR3DF.cjs');
var lib = require('@djangocfg/ui-core/lib');
var jsxRuntime = require('react/jsx-runtime');

function CronSchedulerInner({
  showPreview,
  showCronExpression,
  allowCopy,
  timeFormat,
  disabled,
  className
}) {
  const { type } = chunkF2CMIIOH_cjs.useCronType();
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: lib.cn("space-y-3", className), children: [
    /* @__PURE__ */ jsxRuntime.jsx(chunkF2CMIIOH_cjs.ScheduleTypeSelector, { disabled }),
    type !== "custom" && /* @__PURE__ */ jsxRuntime.jsx(chunkF2CMIIOH_cjs.TimeSelector, { format: timeFormat, disabled }),
    type === "weekly" && /* @__PURE__ */ jsxRuntime.jsx(chunkF2CMIIOH_cjs.DayChips, { disabled, showPresets: true }),
    type === "monthly" && /* @__PURE__ */ jsxRuntime.jsx(chunkF2CMIIOH_cjs.MonthDayGrid, { disabled, showPresets: true }),
    type === "custom" && /* @__PURE__ */ jsxRuntime.jsx(chunkF2CMIIOH_cjs.CustomInput, { disabled }),
    showPreview && /* @__PURE__ */ jsxRuntime.jsx(
      chunkF2CMIIOH_cjs.SchedulePreview,
      {
        showCronExpression: true,
        allowCopy
      }
    )
  ] });
}
chunkWGEGR3DF_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(
    chunkF2CMIIOH_cjs.CronSchedulerProvider,
    {
      value,
      onChange,
      defaultType,
      children: /* @__PURE__ */ jsxRuntime.jsx(
        CronSchedulerInner,
        {
          showPreview,
          showCronExpression,
          allowCopy,
          timeFormat,
          disabled,
          className
        }
      )
    }
  );
}
chunkWGEGR3DF_cjs.__name(CronScheduler, "CronScheduler");
var CronScheduler_client_default = CronScheduler;

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