const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_utils = require("@pisell/utils");
require("./index.less");
//#region src/components/ecocup/components/CustomerCard/index.tsx
const CustomerCard = (props) => {
	var _name$charAt;
	const { id, nickname, display_name, phone, country_calling_code, cover, isMultiple } = props;
	if (!id && !nickname && !display_name && !phone && !isMultiple) return null;
	const phoneStr = phone ? `${country_calling_code} ${phone}` : "-";
	const name = display_name || nickname || "";
	return /* @__PURE__ */ react.default.createElement("div", { className: "pisell2-ecocup-customer-card" }, /* @__PURE__ */ react.default.createElement("div", { className: "pisell2-ecocup-customer-card-avatar" }, isMultiple ? /* @__PURE__ */ react.default.createElement("div", { className: "pisell2-ecocup-customer-card-avatar-text" }) : cover ? /* @__PURE__ */ react.default.createElement("img", {
		src: _pisell_utils.image.ali(cover, 360),
		alt: "avatar"
	}) : /* @__PURE__ */ react.default.createElement("div", { className: "pisell2-ecocup-customer-card-avatar-text" }, (name === null || name === void 0 || (_name$charAt = name.charAt(0)) === null || _name$charAt === void 0 ? void 0 : _name$charAt.toUpperCase()) || "")), /* @__PURE__ */ react.default.createElement("div", { className: "pisell2-ecocup-customer-card-info" }, /* @__PURE__ */ react.default.createElement("div", { className: "pisell2-ecocup-customer-card-info-name" }, isMultiple ? _pisell_utils.locales.getText("pisell2.text.ecocup.cup-info-card.title.multiple-customer") : name || ""), /* @__PURE__ */ react.default.createElement("div", { className: "pisell2-ecocup-customer-card-info-phone" }, isMultiple ? "-" : phoneStr || ""), isMultiple ? /* @__PURE__ */ react.default.createElement("div", null, "-") : null));
};
//#endregion
exports.default = CustomerCard;
