var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/components/pisellReservationSchedule/PisellReservationSchedule.stories.tsx
var PisellReservationSchedule_stories_exports = {};
__export(PisellReservationSchedule_stories_exports, {
  Controlled: () => Controlled,
  Default: () => Default,
  WithMinMax: () => WithMinMax,
  default: () => PisellReservationSchedule_stories_default
});
module.exports = __toCommonJS(PisellReservationSchedule_stories_exports);
var import_react = __toESM(require("react"));
var import_dayjs = __toESM(require("dayjs"));
var import_PisellReservationSchedule = require("./PisellReservationSchedule");
var meta = {
  title: "Data Entry/PisellReservationSchedule",
  component: import_PisellReservationSchedule.PisellReservationSchedule,
  tags: ["autodocs"],
  parameters: {
    layout: "padded",
    docs: {
      description: {
        component: "深色圆角营业日条：左右切换日历日，中间展示「今天（若当日）· 日期 · 星期」。可与 PisellTimeNavigator 组合为 PisellReservationScheduleBand。支持受控 `value` / `onChange(dayjs)`，以及 `minDate` / `maxDate`。"
      }
    }
  },
  argTypes: {
    value: {
      description: "当前选中日（受控），dayjs 或可解析字符串",
      control: "text"
    },
    defaultValue: {
      description: "非受控初始日",
      control: "text"
    },
    minDate: {
      description: "不可早于该日（含）",
      control: "text"
    },
    maxDate: {
      description: "不可晚于该日（含）",
      control: "text"
    },
    onChange: {
      action: "onChange",
      description: "选中日变更，参数为 Dayjs（当日 0 点）"
    },
    className: { control: "text" }
  }
};
var PisellReservationSchedule_stories_default = meta;
var Default = {
  args: {
    defaultValue: (0, import_dayjs.default)().format("YYYY-MM-DD")
  },
  decorators: [
    (StoryComp) => /* @__PURE__ */ import_react.default.createElement("div", { style: { maxWidth: 440 } }, /* @__PURE__ */ import_react.default.createElement(StoryComp, null))
  ]
};
var WithMinMax = {
  args: {
    defaultValue: (0, import_dayjs.default)().format("YYYY-MM-DD"),
    minDate: (0, import_dayjs.default)().startOf("day"),
    maxDate: (0, import_dayjs.default)().add(14, "day").endOf("day")
  },
  decorators: [
    (StoryComp) => /* @__PURE__ */ import_react.default.createElement("div", { style: { maxWidth: 440 } }, /* @__PURE__ */ import_react.default.createElement(StoryComp, null))
  ]
};
var Controlled = {
  render: function ControlledRender() {
    const [value, setValue] = (0, import_react.useState)((0, import_dayjs.default)().startOf("day"));
    return /* @__PURE__ */ import_react.default.createElement("div", { style: { maxWidth: 440 } }, /* @__PURE__ */ import_react.default.createElement(
      import_PisellReservationSchedule.PisellReservationSchedule,
      {
        value,
        onChange: (d) => {
          setValue(d);
          console.log("onChange", d.format("YYYY-MM-DD"));
        }
      }
    ), /* @__PURE__ */ import_react.default.createElement("p", { style: { marginTop: 12, fontSize: 12, color: "#666" } }, "当前：", value.format("YYYY-MM-DD dddd")));
  }
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  Controlled,
  Default,
  WithMinMax
});
