// ../src/helpers/formatClassString.ts
var formatClassString = (classesArray) => {
  return classesArray.filter((x) => !!x).join(" ");
};

// ../src/components/game-header/game-header.tsx
import { jsx, jsxs } from "preact/jsx-runtime";
var GameHeader = ({
  title,
  media,
  descriptionHtml,
  classNames,
  backgroundColor,
  textColor,
  attributes
}) => {
  const componentClassName = "ds-game-header";
  const classes = formatClassString([componentClassName, classNames]);
  const styles = {
    color: textColor,
    backgroundColor
  };
  return /* @__PURE__ */ jsxs("div", { className: classes, ...attributes, children: [
    /* @__PURE__ */ jsx("div", { className: `${componentClassName}__top`, style: styles, children: /* @__PURE__ */ jsxs("div", { className: `${componentClassName}__top-content`, children: [
      /* @__PURE__ */ jsx("h1", { className: `${componentClassName}__title`, children: title }),
      media && /* @__PURE__ */ jsx("div", { className: `${componentClassName}__media`, dangerouslySetInnerHTML: { __html: media } })
    ] }) }),
    descriptionHtml && /* @__PURE__ */ jsx("div", { className: `${componentClassName}__description`, children: /* @__PURE__ */ jsx(
      "div",
      {
        className: `${componentClassName}__description-content`,
        dangerouslySetInnerHTML: { __html: descriptionHtml }
      }
    ) })
  ] });
};
export {
  GameHeader
};
//# sourceMappingURL=game-header.js.map
