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

// ../src/foundations/icons/sprite.svg
import { h } from "preact";
import { jsx, jsxs } from "preact/jsx-runtime";

// ../src/components/icon-sprite/icon-sprite.tsx
import { jsx as jsx2 } from "preact/jsx-runtime";
var IconUse = ({ iconName, classNames, attributes }) => {
  const componentClassName = "ds-icon";
  const classes = formatClassString([
    componentClassName,
    `${componentClassName}--sprite`,
    `${componentClassName}--${iconName}`,
    classNames
  ]);
  return /* @__PURE__ */ jsx2("i", { className: classes, ...attributes, children: /* @__PURE__ */ jsx2("svg", { children: /* @__PURE__ */ jsx2("use", { xlinkHref: `#ds-${iconName}` }) }) });
};

// ../src/components/teaser-dot/teaser-dot.tsx
import { jsx as jsx3 } from "preact/jsx-runtime";

// ../src/helpers/teaser.tsx
import { Fragment, jsx as jsx4, jsxs as jsxs2 } from "preact/jsx-runtime";
var Title = ({ title, highlight, isItalicHeadline }) => {
  return title ? /* @__PURE__ */ jsxs2("h2", { className: `ds-teaser__title ${isItalicHeadline ? "ds-teaser__title--italic" : ""}`, children: [
    highlight && /* @__PURE__ */ jsxs2("span", { className: "ds-teaser__highlight", children: [
      highlight,
      " "
    ] }),
    title
  ] }) : null;
};
var Vignette = ({ vignette, variant }) => {
  return vignette ? /* @__PURE__ */ jsxs2("div", { className: "ds-teaser__vignette", children: [
    variant === "podcast" && /* @__PURE__ */ jsx4(IconUse, { iconName: "headphones" }),
    vignette
  ] }) : null;
};

// ../src/components/teaser-card/teaser-card.tsx
import { jsx as jsx5 } 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__ */ jsx5("a", { className: classes, href: targetLink, ...attributes, children });
  }
  return /* @__PURE__ */ jsx5("div", { className: classes, ...attributes, children });
};

// ../src/components/teaser-swipe-card/teaser-swipe-card.tsx
import { jsx as jsx6, jsxs as jsxs3 } from "preact/jsx-runtime";
var TeaserSwipeCard = ({
  title,
  targetLink,
  highlight,
  theme,
  time,
  media,
  vignette,
  variant,
  classNames,
  attributes
}) => {
  const componentClassName = "ds-teaser-swipe-card";
  const classes = formatClassString([
    "ds-teaser",
    componentClassName,
    variant && variant !== "default" && `${componentClassName}--${variant}`,
    classNames
  ]);
  return /* @__PURE__ */ jsxs3(TeaserCard, { theme, targetLink, classNames: classes, attributes, children: [
    media && variant !== "direkt" && /* @__PURE__ */ jsx6("div", { className: "ds-teaser-image", children: media }),
    /* @__PURE__ */ jsxs3("div", { className: "ds-teaser__text", children: [
      variant === "direkt" ? /* @__PURE__ */ jsx6("span", { className: `${componentClassName}__time`, children: time }) : /* @__PURE__ */ jsx6(Vignette, { vignette, variant }),
      /* @__PURE__ */ jsx6(Title, { title, highlight }),
      variant !== "direkt" && /* @__PURE__ */ jsx6("span", { className: `${componentClassName}__time`, children: time })
    ] })
  ] });
};
export {
  TeaserSwipeCard
};
//# sourceMappingURL=teaser-swipe-card.js.map
