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

// ../src/components/teaser-card/teaser-card.tsx
import { jsx } from "preact/jsx-runtime";
var TeaserCard = ({ areaType, targetLink, theme, classNames, attributes, children }) => {
  const componentClassName = "ds-teaser";
  const classes = formatClassString([
    componentClassName,
    areaType && areaType !== "main" && `${componentClassName}--${areaType}`,
    areaType == "bauta" && "ds-dark",
    theme && `ds-theme--${theme}`,
    classNames
  ]);
  if (targetLink) {
    return /* @__PURE__ */ jsx("a", { className: classes, href: targetLink, ...attributes, children });
  }
  return /* @__PURE__ */ jsx("div", { className: classes, ...attributes, children });
};
export {
  TeaserCard
};
//# sourceMappingURL=teaser-card.js.map
