import { DateSmall, LocationSmall, TimeSmall } from "@wix/wix-ui-icons-common";
import React from "react";
import { VERTICAL_EMBED_SUBTITLE } from "./../data-hooks.js";
import styles from "./description-scss.js";
const Description = ({ componentData }) => {
  if (componentData.type === "EVENT" && componentData.eventData) {
    const { scheduling, location } = componentData.eventData;
    const showDateTime = !componentData.hideDateTime && scheduling;
    const showLocation = !componentData.hideLocation && location;
    if (!showDateTime && !showLocation) {
      return null;
    }
    return /* @__PURE__ */ React.createElement("div", { className: styles.subtitle, "data-hook": VERTICAL_EMBED_SUBTITLE }, showDateTime && /* @__PURE__ */ React.createElement(DescriptionItem, { icon: /* @__PURE__ */ React.createElement(DateSmall, null), text: scheduling }), showLocation && /* @__PURE__ */ React.createElement(DescriptionItem, { icon: /* @__PURE__ */ React.createElement(LocationSmall, null), text: location }));
  }
  if (componentData.type === "BOOKING" && componentData.bookingData) {
    const { durations } = componentData.bookingData;
    const showDuration = !componentData.hideDuration && durations;
    if (!showDuration) {
      return null;
    }
    return /* @__PURE__ */ React.createElement("div", { className: styles.subtitle, "data-hook": VERTICAL_EMBED_SUBTITLE }, /* @__PURE__ */ React.createElement(DescriptionItem, { icon: /* @__PURE__ */ React.createElement(TimeSmall, null), text: durations }));
  }
  return null;
};
const DescriptionItem = ({ icon, text }) => /* @__PURE__ */ React.createElement("span", { className: styles.descriptionItem }, icon, text);
export {
  Description
};
//# sourceMappingURL=description.js.map
