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/pisellEntityCard/PisellEntityCard.stories.tsx
var PisellEntityCard_stories_exports = {};
__export(PisellEntityCard_stories_exports, {
  ActionButtonOnly: () => ActionButtonOnly,
  ActionDefaultOff: () => ActionDefaultOff,
  ActionIconOnly: () => ActionIconOnly,
  ActionMixedWithCustomStyle: () => ActionMixedWithCustomStyle,
  ActionTextOnly: () => ActionTextOnly,
  B1Line: () => B1Line,
  B2Horizontal: () => B2Horizontal,
  B2Vertical: () => B2Vertical,
  B5Standard: () => B5Standard,
  B9Extended: () => B9Extended,
  Clickable: () => Clickable,
  Default: () => Default,
  Disabled: () => Disabled,
  MediaIcon: () => MediaIcon,
  MediaThumbnail: () => MediaThumbnail,
  PrimaryOnly: () => PrimaryOnly,
  SlotPrimary: () => SlotPrimary,
  SwipeToDelete: () => SwipeToDelete,
  TagPositionInline: () => TagPositionInline,
  WidthFull: () => WidthFull,
  WithActions: () => WithActions,
  default: () => PisellEntityCard_stories_default
});
module.exports = __toCommonJS(PisellEntityCard_stories_exports);
var import_icons = require("@ant-design/icons");
var import_PisellEntityCard = require("./PisellEntityCard");
var meta = {
  title: "Data Display/PisellEntityCard",
  component: import_PisellEntityCard.PisellEntityCard,
  tags: ["autodocs"],
  decorators: [
    (Story) => /* @__PURE__ */ React.createElement("div", { style: { width: 340 } }, /* @__PURE__ */ React.createElement(Story, null))
  ],
  argTypes: {
    density: {
      description: "信息密度",
      control: "select",
      options: ["B1", "B2", "B5", "B9"]
    },
    layout: {
      description: "布局方向",
      control: "radio",
      options: ["horizontal", "vertical"]
    },
    width: {
      description: "卡片宽度",
      control: "select",
      options: ["content", "full", 300, 340, 400]
    },
    showMedia: { description: "显示媒体区", control: "boolean" },
    showPrimaryText: { description: "显示主文案", control: "boolean" },
    showSecondaryText: { description: "显示次级文案", control: "boolean" },
    showTags: { description: "显示标签", control: "boolean" },
    showActions: { description: "显示底部操作", control: "boolean" },
    swipeToDelete: { description: "开启左滑删除", control: "boolean" }
  },
  args: {
    width: 340
  }
};
var PisellEntityCard_stories_default = meta;
var defaultPrimary = "张三";
var defaultSecondary = [{ text: "产品经理 · 杭州" }, { text: "钉钉事业部" }];
var defaultTags = [{ text: "在职" }, { text: "正式" }];
var defaultMedia = {
  type: "avatar",
  src: "https://ui-avatars.com/api/?name=Zhang+San&background=4a90d9&color=fff&size=48",
  alt: "头像",
  size: 48
};
var Default = {
  args: {
    primaryText: defaultPrimary,
    secondaryTexts: defaultSecondary,
    media: defaultMedia,
    density: "B2",
    layout: "horizontal"
  }
};
var PrimaryOnly = {
  args: {
    primaryText: "实体名称",
    showMedia: false,
    showSecondaryText: false,
    showTags: false,
    density: "B1"
  }
};
var B1Line = {
  args: {
    primaryText: defaultPrimary,
    media: {
      ...defaultMedia,
      src: "https://ui-avatars.com/api/?name=Zhang+San&background=4a90d9&color=fff&size=24",
      size: 24
    },
    density: "B1",
    layout: "horizontal",
    showSecondaryText: false,
    showTags: false
  }
};
var B2Horizontal = {
  args: {
    primaryText: defaultPrimary,
    secondaryTexts: defaultSecondary,
    media: defaultMedia,
    density: "B2",
    layout: "horizontal"
  }
};
var B2Vertical = {
  args: {
    primaryText: defaultPrimary,
    secondaryTexts: defaultSecondary,
    media: {
      ...defaultMedia,
      src: "https://ui-avatars.com/api/?name=Zhang+San&background=4a90d9&color=fff&size=64",
      size: 64
    },
    density: "B2",
    layout: "vertical"
  }
};
var B5Standard = {
  args: {
    primaryText: defaultPrimary,
    secondaryTexts: [
      { text: "产品经理 · 杭州" },
      { text: "钉钉事业部" },
      { text: "第三行描述" },
      { text: "第四行" },
      { text: "第五行" }
    ],
    tags: defaultTags,
    media: defaultMedia,
    density: "B5",
    layout: "horizontal"
  }
};
var B9Extended = {
  args: {
    primaryText: defaultPrimary,
    secondaryTexts: [
      ...defaultSecondary,
      { text: "带提示的说明", showTooltip: true }
    ],
    tags: defaultTags,
    media: defaultMedia,
    density: "B9",
    layout: "horizontal"
  }
};
var ActionDefaultOff = {
  args: {
    primaryText: defaultPrimary,
    secondaryTexts: defaultSecondary,
    media: defaultMedia,
    showActions: false,
    actions: [
      { type: "text", label: "查看详情", onClick: () => {
      } }
    ]
  }
};
var ActionTextOnly = {
  args: {
    primaryText: defaultPrimary,
    secondaryTexts: defaultSecondary,
    media: defaultMedia,
    showActions: true,
    actions: [
      { type: "text", label: "查看详情", onClick: () => console.log("查看详情") },
      { type: "text", label: "Add Contact", onClick: () => console.log("Add Contact") }
    ]
  }
};
var ActionButtonOnly = {
  args: {
    primaryText: defaultPrimary,
    secondaryTexts: defaultSecondary,
    media: defaultMedia,
    showActions: true,
    actions: [
      { type: "button", label: "选择", onClick: () => console.log("选择") },
      { type: "button", label: "编辑", onClick: () => console.log("编辑") }
    ]
  }
};
var ActionIconOnly = {
  args: {
    primaryText: "Bill Camp",
    secondaryTexts: [{ text: "Billcamp@pisell.com" }],
    media: defaultMedia,
    showActions: true,
    actions: [
      { type: "icon", icon: /* @__PURE__ */ React.createElement(import_icons.EditOutlined, null), onClick: () => console.log("编辑") }
    ]
  }
};
var ActionMixedWithCustomStyle = {
  args: {
    primaryText: defaultPrimary,
    secondaryTexts: defaultSecondary,
    media: defaultMedia,
    showActions: true,
    actions: [
      { type: "text", label: "Add Contact", icon: /* @__PURE__ */ React.createElement(import_icons.PlusOutlined, null), onClick: () => console.log("Add Contact"), style: { color: "#1677ff" } },
      { type: "button", label: "选择", onClick: () => console.log("选择"), style: { borderColor: "#52c41a", color: "#52c41a" } },
      { type: "icon", icon: /* @__PURE__ */ React.createElement(import_icons.EditOutlined, null), onClick: () => console.log("编辑"), style: { color: "#475467" } },
      { type: "icon", icon: /* @__PURE__ */ React.createElement(import_icons.DeleteOutlined, null), onClick: () => console.log("删除"), className: "pisell-entity-card-action-icon", style: { color: "#ff4d4f" } }
    ]
  }
};
var WithActions = {
  args: {
    primaryText: defaultPrimary,
    secondaryTexts: defaultSecondary,
    media: defaultMedia,
    showActions: true,
    actions: [
      { type: "text", label: "查看详情", onClick: () => console.log("查看") },
      { type: "button", label: "选择", onClick: () => console.log("选择") }
    ]
  }
};
var SwipeToDelete = {
  args: {
    primaryText: defaultPrimary,
    secondaryTexts: defaultSecondary,
    media: defaultMedia,
    swipeToDelete: true,
    onDelete: () => console.log("onDelete")
  }
};
var TagPositionInline = {
  args: {
    primaryText: defaultPrimary,
    tags: defaultTags,
    tagPosition: "inline",
    showMedia: false,
    showSecondaryText: false
  }
};
var WidthFull = {
  args: {
    primaryText: defaultPrimary,
    secondaryTexts: defaultSecondary,
    media: defaultMedia,
    width: "full"
  },
  decorators: [
    (Story) => /* @__PURE__ */ React.createElement("div", { style: { width: 340 } }, /* @__PURE__ */ React.createElement(Story, null))
  ]
};
var SlotPrimary = {
  args: {
    primaryText: "不应显示",
    renderPrimary: () => /* @__PURE__ */ React.createElement("span", { style: { fontWeight: 700, color: "#1677ff" } }, "自定义主文案")
  }
};
var MediaThumbnail = {
  args: {
    primaryText: "商品名称",
    secondaryTexts: [{ text: "¥99.00" }],
    media: {
      type: "thumbnail",
      src: "https://picsum.photos/seed/product/128/128",
      alt: "商品图",
      size: 64,
      shape: "square"
    },
    density: "B2"
  }
};
var MediaIcon = {
  args: {
    primaryText: defaultPrimary,
    secondaryTexts: defaultSecondary,
    media: {
      type: "icon",
      icon: /* @__PURE__ */ React.createElement(import_icons.UserOutlined, { style: { fontSize: 24 } }),
      size: 40,
      color: "#1677ff"
    },
    density: "B2"
  }
};
var Clickable = {
  args: {
    primaryText: defaultPrimary,
    secondaryTexts: defaultSecondary,
    media: defaultMedia,
    onClick: () => alert("卡片被点击")
  }
};
var Disabled = {
  args: {
    primaryText: defaultPrimary,
    secondaryTexts: defaultSecondary,
    media: defaultMedia,
    disabled: true
  }
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  ActionButtonOnly,
  ActionDefaultOff,
  ActionIconOnly,
  ActionMixedWithCustomStyle,
  ActionTextOnly,
  B1Line,
  B2Horizontal,
  B2Vertical,
  B5Standard,
  B9Extended,
  Clickable,
  Default,
  Disabled,
  MediaIcon,
  MediaThumbnail,
  PrimaryOnly,
  SlotPrimary,
  SwipeToDelete,
  TagPositionInline,
  WidthFull,
  WithActions
});
