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

// ../src/components/direkt-circle/direkt-circle.tsx
import { jsx, jsxs } from "preact/jsx-runtime";
var DirektCircle = ({
  circleColor = "white",
  classNames,
  attributes = {},
  isAnimated = false
}) => {
  const componentClassName = "ds-direkt-circle";
  const animatedClassName = isAnimated ? `${componentClassName}--animated` : "";
  const circleOpacity = [
    0.25,
    0.25,
    0.25,
    0.25,
    0.25,
    0.25,
    0.25,
    0.25,
    0.24,
    0.235,
    0.222,
    0.218,
    0.212,
    0.202,
    0.19,
    0.178,
    0.165,
    0.155,
    0.145,
    0.135,
    0.12,
    0.107,
    0.095,
    0.083,
    0.07,
    0.06,
    0.047,
    0.035,
    0.023,
    0.02
  ];
  const classes = [componentClassName, classNames, animatedClassName].filter(Boolean).join(" ");
  return /* @__PURE__ */ jsxs("svg", { className: classes, width: "500", height: "500", viewBox: "-250 -250 500 500", fill: "none", ...attributes, children: [
    /* @__PURE__ */ jsx("circle", { r: "5", fill: circleColor }),
    circleOpacity.map((opacity, index) => {
      const radius = (index + 1) * 8 + 5;
      return /* @__PURE__ */ jsx("circle", { opacity, r: radius, stroke: circleColor, strokeWidth: "1.5" }, index);
    })
  ] });
};

// ../src/components/direkt-header/direkt-header.tsx
import { jsx as jsx2, jsxs as jsxs2 } from "preact/jsx-runtime";
var DirektHeader = ({
  classNames,
  attributes = {},
  title,
  subtitle,
  pretitle = "Direkt",
  isAnimated = true,
  renderAsH2 = false
}) => {
  const componentClassName = "ds-direkt-header";
  const classes = formatClassString([componentClassName, classNames]);
  return /* @__PURE__ */ jsxs2("header", { className: classes, ...attributes, children: [
    /* @__PURE__ */ jsxs2("p", { className: `${componentClassName}__pre-title`, children: [
      /* @__PURE__ */ jsx2("span", { className: `${componentClassName}__circle-wrapper`, children: /* @__PURE__ */ jsx2(DirektCircle, { classNames: `${componentClassName}__circle`, isAnimated }) }),
      pretitle
    ] }),
    renderAsH2 ? /* @__PURE__ */ jsx2("h2", { className: `${componentClassName}__title`, children: title }) : /* @__PURE__ */ jsx2("h1", { className: `${componentClassName}__title`, children: title }),
    subtitle && (renderAsH2 ? /* @__PURE__ */ jsx2("h3", { className: `${componentClassName}__sub-title`, children: subtitle }) : /* @__PURE__ */ jsx2("h2", { className: `${componentClassName}__sub-title`, children: subtitle }))
  ] });
};
export {
  DirektHeader
};
//# sourceMappingURL=direkt-header.js.map
