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/eftposPay/component/header/index.tsx
var header_exports = {};
__export(header_exports, {
  default: () => header_default
});
module.exports = __toCommonJS(header_exports);
var import_react = __toESM(require("react"));
var import_usePrefix = __toESM(require("../../../../hooks/usePrefix"));
var import_const = require("../../const");
var import_index = require("./index.less");
var Icon = ({ status }) => {
  const prefix = (0, import_usePrefix.default)();
  if (status === import_const.StatusEnum.Loading) {
    return /* @__PURE__ */ import_react.default.createElement(
      "div",
      {
        style: { backgroundImage: `url(${prefix}/loading.png)` },
        className: "pisell-lowcode__eft-pay-img pisell-lowcode__eft-pay-load"
      }
    );
  }
  if (status === import_const.StatusEnum.Success) {
    return /* @__PURE__ */ import_react.default.createElement(
      "div",
      {
        style: { backgroundImage: `url(${prefix}/success.png)` },
        className: "pisell-lowcode__eft-pay-img "
      }
    );
  }
  if (status === import_const.StatusEnum.Fail) {
    return /* @__PURE__ */ import_react.default.createElement(
      "div",
      {
        style: { backgroundImage: `url(${prefix}/error.png)` },
        className: "pisell-lowcode__eft-pay-img "
      }
    );
  }
  if (status === import_const.StatusEnum.Warn) {
    return /* @__PURE__ */ import_react.default.createElement(
      "div",
      {
        style: { backgroundImage: `url(${prefix}/warn.png)` },
        className: "pisell-lowcode__eft-pay-img "
      }
    );
  }
  if (status === import_const.StatusEnum.Question) {
    return /* @__PURE__ */ import_react.default.createElement(
      "div",
      {
        style: { backgroundImage: `url(${prefix}/question.png)` },
        className: "pisell-lowcode__eft-pay-img "
      }
    );
  }
  return null;
};
var header_default = ({
  status,
  title = "",
  subTitle,
  children
}) => /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-icon" }, /* @__PURE__ */ import_react.default.createElement(Icon, { status }), children), title ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-title" }, title) : null, subTitle ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-sub-title" }, subTitle) : null);
