import usePrefix from "../../../../hooks/usePrefix.js";
import { StatusEnum } from "../../const.js";
import React from "react";
import "./index.less";
//#region src/components/eftposPay/component/header/index.tsx
const Icon = ({ status }) => {
	const prefix = usePrefix();
	if (status === StatusEnum.Loading) return /* @__PURE__ */ React.createElement("div", {
		style: { backgroundImage: `url(${prefix}/loading.png)` },
		className: "pisell-lowcode__eft-pay-img pisell-lowcode__eft-pay-load"
	});
	if (status === StatusEnum.Success) return /* @__PURE__ */ React.createElement("div", {
		style: { backgroundImage: `url(${prefix}/success.png)` },
		className: "pisell-lowcode__eft-pay-img "
	});
	if (status === StatusEnum.Fail) return /* @__PURE__ */ React.createElement("div", {
		style: { backgroundImage: `url(${prefix}/error.png)` },
		className: "pisell-lowcode__eft-pay-img "
	});
	if (status === StatusEnum.Warn) return /* @__PURE__ */ React.createElement("div", {
		style: { backgroundImage: `url(${prefix}/warn.png)` },
		className: "pisell-lowcode__eft-pay-img "
	});
	if (status === StatusEnum.Question) return /* @__PURE__ */ React.createElement("div", {
		style: { backgroundImage: `url(${prefix}/question.png)` },
		className: "pisell-lowcode__eft-pay-img "
	});
	return null;
};
var header_default = ({ status, title = "", subTitle, children }) => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "pisell-lowcode__eft-pay-icon" }, /* @__PURE__ */ React.createElement(Icon, { status }), children), title ? /* @__PURE__ */ React.createElement("div", { className: "pisell-lowcode__eft-pay-title" }, title) : null, subTitle ? /* @__PURE__ */ React.createElement("div", { className: "pisell-lowcode__eft-pay-sub-title" }, subTitle) : null);
//#endregion
export { header_default as default };
