// ../src/foundations/a11y/visually-hidden.tsx
import { jsx } from "preact/jsx-runtime";
var VisuallyHidden = ({ text }) => {
  return /* @__PURE__ */ jsx("span", { className: "visually-hidden", dangerouslySetInnerHTML: { __html: text } });
};

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

// ../src/components/video-caption/video-caption.tsx
import { Fragment, jsx as jsx2, jsxs } from "preact/jsx-runtime";
var VideoCaption = ({ caption, duration, classNames, attributes, forcePx }) => {
  const classes = formatClassString(["ds-video-caption", forcePx && "ds-force-px", classNames]);
  return /* @__PURE__ */ jsxs("figcaption", { className: classes, ...attributes, children: [
    duration && /* @__PURE__ */ jsxs(Fragment, { children: [
      /* @__PURE__ */ jsx2("span", { className: "ds-video-caption__duration", "aria-hidden": "true", children: duration }),
      /* @__PURE__ */ jsx2(VisuallyHidden, { text: `Videon \xE4r ${duration} l\xE5ng.` })
    ] }),
    caption && /* @__PURE__ */ jsx2("span", { className: "ds-video-caption__text", children: caption })
  ] });
};
export {
  VideoCaption
};
//# sourceMappingURL=video-caption.js.map
