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/pisellCustomerBrief/PisellCustomerBrief.tsx
var PisellCustomerBrief_exports = {};
__export(PisellCustomerBrief_exports, {
  PisellCustomerBrief: () => PisellCustomerBrief
});
module.exports = __toCommonJS(PisellCustomerBrief_exports);
var import_react = __toESM(require("react"));
var import_pisellEntityCard = require("../pisellEntityCard");
var import_PisellCustomerBrief = require("./PisellCustomerBrief.less");
function PisellCustomerBrief({
  name,
  subtitle,
  avatar,
  email,
  address,
  company,
  date,
  extendedFields = [],
  tags = [],
  actions = [],
  showActions = false,
  showAvatar = true,
  showPrimaryText = true,
  showSubtitle = true,
  showExtended = true,
  showTags = true,
  density = "B2",
  layout = "horizontal",
  width = "content",
  swipeToDelete = false,
  onDelete,
  tagPosition = "below",
  contentGap,
  primaryLineClamp,
  secondaryLineClamp,
  renderMedia,
  renderPrimary,
  renderSubtitle,
  renderSecondary,
  renderTags,
  renderActions,
  className,
  style,
  hoverStyle,
  activeStyle,
  disabledStyle,
  clickable = true,
  disabled = false,
  onClick
}) {
  const media = (0, import_react.useMemo)(() => {
    if (!showAvatar) return void 0;
    return {
      type: "avatar",
      src: avatar,
      alt: name,
      size: 40,
      shape: "circle"
    };
  }, [showAvatar, avatar, name]);
  const secondaryTexts = (0, import_react.useMemo)(() => {
    if (!showExtended) return [];
    const list = [];
    if (email) list.push({ text: email });
    if (address) list.push({ text: address });
    if (company) list.push({ text: company });
    if (date) list.push({ text: date });
    extendedFields.forEach((f) => list.push({ text: f.text, showTooltip: f.showTooltip }));
    return list;
  }, [showExtended, email, address, company, date, extendedFields]);
  return /* @__PURE__ */ import_react.default.createElement(
    import_pisellEntityCard.PisellEntityCard,
    {
      className: `pisell-customer-brief-root ${className ?? ""}`.trim(),
      style,
      hoverStyle,
      activeStyle,
      disabledStyle,
      clickable,
      disabled,
      onClick,
      media,
      primaryText: name,
      subtitleText: subtitle,
      secondaryTexts,
      tags,
      actions,
      showMedia: showAvatar,
      showPrimaryText,
      showSubtitle,
      showSecondaryText: showExtended,
      showTags,
      showActions,
      density,
      layout,
      width,
      swipeToDelete,
      onDelete,
      tagPosition,
      contentGap,
      primaryLineClamp,
      secondaryLineClamp,
      renderMedia,
      renderPrimary,
      renderSubtitle,
      renderSecondary,
      renderTags,
      renderActions
    }
  );
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  PisellCustomerBrief
});
