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

// ../src/components/mask/mask.tsx
import { jsx } from "preact/jsx-runtime";
var Mask = ({ image, variant, classNames, attributes }) => {
  const componentClassName = "ds-mask";
  const classes = formatClassString([
    componentClassName,
    variant ? `${componentClassName}--${variant}` : "",
    classNames
  ]);
  const maskStyle = {
    clipPath: `url(#${variant})`
  };
  return /* @__PURE__ */ jsx("div", { className: classes, ...attributes, children: /* @__PURE__ */ jsx("div", { style: maskStyle, className: `${componentClassName}__image-wrapper`, children: image }) });
};

// ../src/components/teaser-image/teaser-image.tsx
import { jsx as jsx2, jsxs } from "preact/jsx-runtime";
var TeaserImage = ({ image, byline, mask, classNames, attributes }) => {
  const componentClassName = "ds-teaser-image";
  const classes = formatClassString([componentClassName, mask ? `${componentClassName}--mask` : "", classNames]);
  return /* @__PURE__ */ jsxs("figure", { className: classes, ...attributes, children: [
    mask ? /* @__PURE__ */ jsx2(Mask, { variant: mask, image }) : image,
    byline && /* @__PURE__ */ jsx2("figcaption", { className: `${componentClassName}__byline`, children: byline })
  ] });
};
export {
  TeaserImage
};
//# sourceMappingURL=teaser-image.js.map
