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/pisellImport/PisellImport.stories.tsx
var PisellImport_stories_exports = {};
__export(PisellImport_stories_exports, {
  Basic: () => Basic,
  CustomIcon: () => CustomIcon,
  CustomLabel: () => CustomLabel,
  DefaultVsPrimary: () => DefaultVsPrimary,
  Disabled: () => Disabled,
  FileSelect: () => FileSelect,
  IconOnly: () => IconOnly,
  MultipleFiles: () => MultipleFiles,
  SizesButton: () => SizesButton,
  SizesIcon: () => SizesIcon,
  WithExport: () => WithExport,
  default: () => PisellImport_stories_default
});
module.exports = __toCommonJS(PisellImport_stories_exports);
var import_PisellImport = require("./PisellImport");
var import_pisellExport = require("../pisellExport");
var import_icons = require("@ant-design/icons");
var meta = {
  title: "Data Entry/PisellImport",
  component: import_PisellImport.PisellImport,
  tags: ["autodocs"],
  argTypes: {
    variant: {
      description: "展示形态",
      control: "radio",
      options: ["icon", "button"]
    },
    size: {
      description: "尺寸",
      control: "radio",
      options: ["small", "medium", "large"]
    },
    type: {
      description: "视觉类型",
      control: "radio",
      options: ["default", "primary"]
    },
    disabled: {
      description: "是否禁用",
      control: "boolean"
    },
    label: {
      description: "Button 形态文案",
      control: "text"
    }
  }
};
var PisellImport_stories_default = meta;
var Basic = {
  args: {
    variant: "button",
    size: "medium",
    type: "default",
    onImport: () => console.log("onImport")
  }
};
var IconOnly = {
  args: {
    variant: "icon",
    size: "medium",
    type: "default",
    onImport: () => console.log("onImport")
  }
};
var SizesButton = {
  render: () => /* @__PURE__ */ React.createElement("div", { style: { display: "flex", alignItems: "center", gap: 16, flexWrap: "wrap" } }, /* @__PURE__ */ React.createElement(import_PisellImport.PisellImport, { variant: "button", size: "small", onImport: () => {
  } }), /* @__PURE__ */ React.createElement(import_PisellImport.PisellImport, { variant: "button", size: "medium", onImport: () => {
  } }), /* @__PURE__ */ React.createElement(import_PisellImport.PisellImport, { variant: "button", size: "large", onImport: () => {
  } }))
};
var SizesIcon = {
  render: () => /* @__PURE__ */ React.createElement("div", { style: { display: "flex", alignItems: "center", gap: 16 } }, /* @__PURE__ */ React.createElement(import_PisellImport.PisellImport, { variant: "icon", size: "small", onImport: () => {
  } }), /* @__PURE__ */ React.createElement(import_PisellImport.PisellImport, { variant: "icon", size: "medium", onImport: () => {
  } }), /* @__PURE__ */ React.createElement(import_PisellImport.PisellImport, { variant: "icon", size: "large", onImport: () => {
  } }))
};
var DefaultVsPrimary = {
  render: () => /* @__PURE__ */ React.createElement("div", { style: { display: "flex", alignItems: "center", gap: 16 } }, /* @__PURE__ */ React.createElement(import_PisellImport.PisellImport, { variant: "button", type: "default", onImport: () => {
  } }), /* @__PURE__ */ React.createElement(import_PisellImport.PisellImport, { variant: "button", type: "primary", onImport: () => {
  } }))
};
var Disabled = {
  render: () => /* @__PURE__ */ React.createElement("div", { style: { display: "flex", alignItems: "center", gap: 16 } }, /* @__PURE__ */ React.createElement(import_PisellImport.PisellImport, { variant: "button", disabled: true, onImport: () => {
  } }), /* @__PURE__ */ React.createElement(import_PisellImport.PisellImport, { variant: "button", type: "primary", disabled: true, onImport: () => {
  } }), /* @__PURE__ */ React.createElement(import_PisellImport.PisellImport, { variant: "icon", disabled: true, onImport: () => {
  } }))
};
var CustomLabel = {
  args: {
    variant: "button",
    label: "导入 Excel",
    onImport: () => {
    }
  }
};
var CustomIcon = {
  args: {
    variant: "button",
    icon: /* @__PURE__ */ React.createElement(import_icons.UploadOutlined, { style: { fontSize: 20 } }),
    label: "上传",
    onImport: () => {
    }
  }
};
var FileSelect = {
  args: {
    variant: "button",
    accept: ".xlsx,.xls,.csv",
    multiple: false,
    maxSize: 10,
    onImport: (files) => {
      console.log("已选文件", files);
      alert(`已选择 ${files.length} 个文件：${files.map((f) => f.name).join(", ")}`);
    },
    onError: (err) => {
      console.error("onError", err);
      alert(err.message);
    }
  }
};
var MultipleFiles = {
  args: {
    variant: "button",
    label: "选择多个文件",
    multiple: true,
    onImport: (files) => alert(`已选择 ${files.length} 个文件`)
  }
};
var WithExport = {
  render: () => /* @__PURE__ */ React.createElement("div", { style: { display: "flex", alignItems: "center", gap: 16 } }, /* @__PURE__ */ React.createElement(import_PisellImport.PisellImport, { variant: "button", onImport: () => {
  } }), /* @__PURE__ */ React.createElement(import_pisellExport.PisellExport, { variant: "button", onExport: () => {
  } }))
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  Basic,
  CustomIcon,
  CustomLabel,
  DefaultVsPrimary,
  Disabled,
  FileSelect,
  IconOnly,
  MultipleFiles,
  SizesButton,
  SizesIcon,
  WithExport
});
