"use strict";
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);
var Result_exports = {};
__export(Result_exports, {
  default: () => Result_default
});
module.exports = __toCommonJS(Result_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var import_react = __toESM(require("react"));
var import_prop_types = require("prop-types");
var import_Text = __toESM(require("../../../Text"));
var import_Box = __toESM(require("../../../Box"));
var import_Attendances = __toESM(require("../Attendances"));
var import_styles = require("./styles");
var import_TextWithBadge = __toESM(require("./TextWithBadge"));
const Result = ({
  avatar: Avatar,
  attendances = void 0,
  rate = void 0,
  title,
  subTitle = void 0,
  divided = false,
  children = void 0,
  attendancesColor = void 0,
  badgeIcon = void 0
}) => {
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.StyledBox, { divided, display: "flex", flexDirection: "row", children: [
    Avatar && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: (0, import_react.isValidElement)(Avatar) ? Avatar : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Avatar, {}) }),
    /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Content, { children: [
      !!(attendances == null ? void 0 : attendances.length) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
        import_Attendances.default,
        {
          attendances,
          rate,
          color: attendancesColor
        }
      ),
      badgeIcon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TextWithBadge.default, { badgeIcon, title }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Box.default, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Text.default.Body1, { bold: true, numberOfLines: 1, children: title }) }),
      subTitle && subTitle !== "" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Text.default.Body2, { numberOfLines: 1, color: "deep", children: subTitle }),
      children
    ] })
  ] });
};
Result.propTypes = {
  /** The component Avatar */
  avatar: import_prop_types.node.isRequired,
  /** A list with the attendances */
  attendances: (0, import_prop_types.arrayOf)(
    (0, import_prop_types.shape)({
      description: import_prop_types.string,
      icon: import_prop_types.func
    })
  ),
  /** The evaluation of the partner */
  rate: import_prop_types.string,
  /** The main title */
  title: import_prop_types.string.isRequired,
  /** The text below the main title */
  subTitle: import_prop_types.string,
  /** If it is to show the divide in the bottom */
  divided: import_prop_types.bool,
  /** The chidren necessary */
  children: import_prop_types.node,
  /** The color of attendences icon and description */
  attendancesColor: import_prop_types.string,
  /** The property that defines a whether a badge should be shown and which icon should be rendered */
  badgeIcon: import_prop_types.node
};
var Result_default = Result;
