var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/components/pisellRating/PisellRating.stories.tsx
var PisellRating_stories_exports = {};
__export(PisellRating_stories_exports, {
  Basic: () => Basic,
  CustomCount: () => CustomCount,
  Disabled: () => Disabled,
  HalfStar: () => HalfStar,
  HeartIcon: () => HeartIcon,
  ProductReview: () => ProductReview,
  ReadOnly: () => ReadOnly,
  Sizes: () => Sizes,
  SmileIcon: () => SmileIcon,
  WithCount: () => WithCount,
  WithTooltips: () => WithTooltips,
  WithValue: () => WithValue,
  default: () => PisellRating_stories_default
});
module.exports = __toCommonJS(PisellRating_stories_exports);
var import_PisellRating = require("./PisellRating");
var import_react = require("react");
var import_antd = require("antd");
var import_icons = require("@ant-design/icons");
var meta = {
  title: "表单/表单组件/PisellRating",
  component: import_PisellRating.PisellRating,
  tags: ["autodocs"]
};
var PisellRating_stories_default = meta;
var Basic = {
  args: {
    value: 3
  },
  render: (args) => {
    const [value, setValue] = (0, import_react.useState)(args.value);
    return /* @__PURE__ */ React.createElement(import_PisellRating.PisellRating, { ...args, value, onChange: setValue });
  }
};
var ReadOnly = {
  args: {
    mode: "read",
    value: 4.5,
    allowHalf: true
  }
};
var Disabled = {
  args: {
    disabled: true,
    value: 3
  }
};
var HalfStar = {
  render: () => {
    const [value, setValue] = (0, import_react.useState)(3.5);
    return /* @__PURE__ */ React.createElement(
      import_PisellRating.PisellRating,
      {
        value,
        onChange: setValue,
        allowHalf: true
      }
    );
  }
};
var WithValue = {
  args: {
    mode: "read",
    value: 4.2,
    allowHalf: true,
    showValue: true
  }
};
var WithCount = {
  args: {
    mode: "read",
    value: 4.5,
    allowHalf: true,
    showValue: true,
    showCount: true,
    reviewCount: 328
  }
};
var WithTooltips = {
  render: () => {
    const [value, setValue] = (0, import_react.useState)(0);
    return /* @__PURE__ */ React.createElement(
      import_PisellRating.PisellRating,
      {
        value,
        onChange: setValue,
        tooltips: ["很差", "差", "一般", "好", "很好"]
      }
    );
  }
};
var CustomCount = {
  render: () => {
    const [value, setValue] = (0, import_react.useState)(6);
    return /* @__PURE__ */ React.createElement(
      import_PisellRating.PisellRating,
      {
        value,
        onChange: setValue,
        max: 10
      }
    );
  }
};
var HeartIcon = {
  render: () => {
    const [value, setValue] = (0, import_react.useState)(3);
    return /* @__PURE__ */ React.createElement(
      import_PisellRating.PisellRating,
      {
        value,
        onChange: setValue,
        character: /* @__PURE__ */ React.createElement(import_icons.HeartFilled, null),
        color: "#ff4d4f"
      }
    );
  }
};
var SmileIcon = {
  render: () => {
    const [value, setValue] = (0, import_react.useState)(4);
    return /* @__PURE__ */ React.createElement(
      import_PisellRating.PisellRating,
      {
        value,
        onChange: setValue,
        character: /* @__PURE__ */ React.createElement(import_icons.SmileFilled, null),
        color: "#52c41a"
      }
    );
  }
};
var ProductReview = {
  render: () => {
    const [userRating, setUserRating] = (0, import_react.useState)(0);
    const averageRating = 4.2;
    const reviewCount = 328;
    return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { style: { marginBottom: 24 } }, /* @__PURE__ */ React.createElement("div", { style: { marginBottom: 8, fontWeight: "bold" } }, "商品评分"), /* @__PURE__ */ React.createElement(
      import_PisellRating.PisellRating,
      {
        mode: "read",
        value: averageRating,
        allowHalf: true,
        showValue: true,
        showCount: true,
        reviewCount
      }
    )), /* @__PURE__ */ React.createElement(import_antd.Form.Item, { label: "您的评分" }, /* @__PURE__ */ React.createElement(
      import_PisellRating.PisellRating,
      {
        value: userRating,
        onChange: setUserRating,
        allowHalf: true,
        tooltips: ["非常差", "差", "一般", "满意", "非常满意"]
      }
    )));
  }
};
var Sizes = {
  render: () => {
    return /* @__PURE__ */ React.createElement("div", { style: { display: "flex", flexDirection: "column", gap: 16 } }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("span", { style: { marginRight: 8 } }, "小："), /* @__PURE__ */ React.createElement(import_PisellRating.PisellRating, { value: 4, size: 16 })), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("span", { style: { marginRight: 8 } }, "默认："), /* @__PURE__ */ React.createElement(import_PisellRating.PisellRating, { value: 4, size: 20 })), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("span", { style: { marginRight: 8 } }, "大："), /* @__PURE__ */ React.createElement(import_PisellRating.PisellRating, { value: 4, size: 24 })));
  }
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  Basic,
  CustomCount,
  Disabled,
  HalfStar,
  HeartIcon,
  ProductReview,
  ReadOnly,
  Sizes,
  SmileIcon,
  WithCount,
  WithTooltips,
  WithValue
});
