import React from "react";
import { image, locales } from "@pisell/utils";
import "./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.createElement("div", { className: "pisell2-ecocup-customer-card" }, /* @__PURE__ */ React.createElement("div", { className: "pisell2-ecocup-customer-card-avatar" }, isMultiple ? /* @__PURE__ */ React.createElement("div", { className: "pisell2-ecocup-customer-card-avatar-text" }) : cover ? /* @__PURE__ */ React.createElement("img", {
		src: image.ali(cover, 360),
		alt: "avatar"
	}) : /* @__PURE__ */ React.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.createElement("div", { className: "pisell2-ecocup-customer-card-info" }, /* @__PURE__ */ React.createElement("div", { className: "pisell2-ecocup-customer-card-info-name" }, isMultiple ? locales.getText("pisell2.text.ecocup.cup-info-card.title.multiple-customer") : name || ""), /* @__PURE__ */ React.createElement("div", { className: "pisell2-ecocup-customer-card-info-phone" }, isMultiple ? "-" : phoneStr || ""), isMultiple ? /* @__PURE__ */ React.createElement("div", null, "-") : null));
};
//#endregion
export { CustomerCard as default };
