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/pisellPercent/PisellPercent.stories.tsx
var PisellPercent_stories_exports = {};
__export(PisellPercent_stories_exports, {
  Basic: () => Basic,
  CircleVariants: () => CircleVariants,
  Disabled: () => Disabled,
  EditWithInput: () => EditWithInput,
  EditWithSlider: () => EditWithSlider,
  ProgressStates: () => ProgressStates,
  ProjectDashboard: () => ProjectDashboard,
  RangeConversion: () => RangeConversion,
  ReadOnlyCircle: () => ReadOnlyCircle,
  ReadOnlyProgress: () => ReadOnlyProgress,
  ReadOnlyText: () => ReadOnlyText,
  default: () => PisellPercent_stories_default
});
module.exports = __toCommonJS(PisellPercent_stories_exports);
var import_PisellPercent = require("./PisellPercent");
var import_react = require("react");
var import_antd = require("antd");
var meta = {
  title: "表单/表单组件/PisellPercent",
  component: import_PisellPercent.PisellPercent,
  tags: ["autodocs"]
};
var PisellPercent_stories_default = meta;
var Basic = {
  args: {
    value: 85.5
  },
  render: (args) => {
    const [value, setValue] = (0, import_react.useState)(args.value);
    return /* @__PURE__ */ React.createElement(import_PisellPercent.PisellPercent, { ...args, value, onChange: setValue });
  }
};
var ReadOnlyText = {
  args: {
    mode: "read",
    value: 85.5,
    variant: "text"
  }
};
var ReadOnlyProgress = {
  args: {
    mode: "read",
    value: 75,
    variant: "progress",
    style: { width: 300 }
  }
};
var ReadOnlyCircle = {
  args: {
    mode: "read",
    value: 80,
    variant: "circle"
  }
};
var ProgressStates = {
  render: () => {
    return /* @__PURE__ */ React.createElement("div", { style: { display: "flex", flexDirection: "column", gap: 16, width: 300 } }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { style: { marginBottom: 8 } }, "正常（蓝色）"), /* @__PURE__ */ React.createElement(
      import_PisellPercent.PisellPercent,
      {
        mode: "read",
        value: 50,
        variant: "progress",
        progressProps: { strokeColor: "#1890ff" }
      }
    )), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { style: { marginBottom: 8 } }, "成功（绿色）"), /* @__PURE__ */ React.createElement(
      import_PisellPercent.PisellPercent,
      {
        mode: "read",
        value: 100,
        variant: "progress",
        progressProps: { strokeColor: "#52c41a", status: "success" }
      }
    )), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { style: { marginBottom: 8 } }, "异常（红色）"), /* @__PURE__ */ React.createElement(
      import_PisellPercent.PisellPercent,
      {
        mode: "read",
        value: 30,
        variant: "progress",
        progressProps: { strokeColor: "#ff4d4f", status: "exception" }
      }
    )), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { style: { marginBottom: 8 } }, "动画效果"), /* @__PURE__ */ React.createElement(
      import_PisellPercent.PisellPercent,
      {
        mode: "read",
        value: 65,
        variant: "progress",
        progressProps: { status: "active" }
      }
    )));
  }
};
var CircleVariants = {
  render: () => {
    return /* @__PURE__ */ React.createElement("div", { style: { display: "flex", gap: 32 } }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { style: { marginBottom: 8, textAlign: "center" } }, "默认"), /* @__PURE__ */ React.createElement(import_PisellPercent.PisellPercent, { mode: "read", value: 75, variant: "circle" })), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { style: { marginBottom: 8, textAlign: "center" } }, "大尺寸"), /* @__PURE__ */ React.createElement(
      import_PisellPercent.PisellPercent,
      {
        mode: "read",
        value: 80,
        variant: "circle",
        circleProps: { width: 150 }
      }
    )), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { style: { marginBottom: 8, textAlign: "center" } }, "自定义颜色"), /* @__PURE__ */ React.createElement(
      import_PisellPercent.PisellPercent,
      {
        mode: "read",
        value: 90,
        variant: "circle",
        circleProps: { strokeColor: "#52c41a" }
      }
    )));
  }
};
var RangeConversion = {
  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 } }, "[0, 100] 范围，值 85.5："), /* @__PURE__ */ React.createElement(import_PisellPercent.PisellPercent, { mode: "read", value: 85.5, range: [0, 100] })), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("span", { style: { marginRight: 8 } }, "[0, 1] 范围，值 0.855："), /* @__PURE__ */ React.createElement(import_PisellPercent.PisellPercent, { mode: "read", value: 0.855, range: [0, 1] })), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("span", { style: { marginRight: 8 } }, "[0, 1000] 范围，值 855："), /* @__PURE__ */ React.createElement(import_PisellPercent.PisellPercent, { mode: "read", value: 855, range: [0, 1e3] })));
  }
};
var EditWithInput = {
  render: () => {
    const [value, setValue] = (0, import_react.useState)(65.5);
    return /* @__PURE__ */ React.createElement(import_antd.Form.Item, { label: "完成度" }, /* @__PURE__ */ React.createElement(
      import_PisellPercent.PisellPercent,
      {
        value,
        onChange: setValue,
        min: 0,
        max: 100,
        step: 0.1,
        placeholder: "请输入百分比"
      }
    ));
  }
};
var EditWithSlider = {
  render: () => {
    const [value, setValue] = (0, import_react.useState)(65);
    return /* @__PURE__ */ React.createElement(import_antd.Form.Item, { label: "项目进度" }, /* @__PURE__ */ React.createElement(
      import_PisellPercent.PisellPercent,
      {
        value,
        onChange: setValue,
        showSlider: true,
        sliderProps: {
          marks: {
            0: "0%",
            25: "25%",
            50: "50%",
            75: "75%",
            100: "100%"
          }
        }
      }
    ));
  }
};
var ProjectDashboard = {
  render: () => {
    const tasks = [
      { name: "前端开发", completion: 85.5 },
      { name: "后端开发", completion: 72 },
      { name: "测试", completion: 45 },
      { name: "部署", completion: 0 }
    ];
    return /* @__PURE__ */ React.createElement("div", { style: { padding: 24 } }, tasks.map((task) => /* @__PURE__ */ React.createElement("div", { key: task.name, style: { marginBottom: 24 } }, /* @__PURE__ */ React.createElement("div", { style: { display: "flex", justifyContent: "space-between", marginBottom: 8 } }, /* @__PURE__ */ React.createElement("span", null, task.name), /* @__PURE__ */ React.createElement(import_PisellPercent.PisellPercent, { mode: "read", value: task.completion, variant: "text" })), /* @__PURE__ */ React.createElement(
      import_PisellPercent.PisellPercent,
      {
        mode: "read",
        value: task.completion,
        variant: "progress",
        progressProps: {
          strokeColor: task.completion === 100 ? "#52c41a" : "#1890ff"
        }
      }
    ))));
  }
};
var Disabled = {
  args: {
    disabled: true,
    value: 60
  }
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  Basic,
  CircleVariants,
  Disabled,
  EditWithInput,
  EditWithSlider,
  ProgressStates,
  ProjectDashboard,
  RangeConversion,
  ReadOnlyCircle,
  ReadOnlyProgress,
  ReadOnlyText
});
