"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 Attendances_exports = {};
__export(Attendances_exports, {
  default: () => Attendances_default
});
module.exports = __toCommonJS(Attendances_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var import_prop_types = require("prop-types");
var import_react = __toESM(require("react"));
var import_styled_components = __toESM(require("styled-components"));
var import_Box = __toESM(require("../../Box"));
var import_Text = __toESM(require("../../Text"));
var import_Rate = __toESM(require("./Rate"));
var import_TinyTextIcon = __toESM(require("./TinyTextIcon"));
const List = (0, import_styled_components.default)(import_Text.default.Caption).attrs({
  numberOfLines: 1,
  color: ({ color }) => color || "deep"
})`
  flex: 1;
`;
const ItemSeparator = (0, import_styled_components.default)(import_Box.default).attrs({
  height: "zero"
})``;
const Attendances = ({ attendances, rate = void 0, color = "deep" }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
  import_Box.default,
  {
    display: "flex",
    width: "100%",
    alignItems: "center",
    justifyContent: "center",
    flexDirection: "row",
    mb: "xxxsmall",
    children: [
      /* @__PURE__ */ (0, import_jsx_runtime.jsx)(List, { color, children: attendances.map(({ description, icon }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.default.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TinyTextIcon.default, { as: icon, marginTop: "2px", fill: color || "deep" }),
        /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ItemSeparator, { w: "xxxsmall" }),
        description,
        /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ItemSeparator, { w: "xxsmall" })
      ] }, description)) }),
      rate && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Rate.default, { rate })
    ]
  }
);
Attendances.propTypes = {
  attendances: (0, import_prop_types.arrayOf)(
    (0, import_prop_types.shape)({
      description: import_prop_types.string,
      icon: import_prop_types.func
    })
  ).isRequired,
  rate: import_prop_types.string,
  color: import_prop_types.string
};
var Attendances_default = Attendances;
