// ../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/pill/pill.tsx
import { jsx as jsx3, jsxs as jsxs2 } from "preact/jsx-runtime";
var Pill = ({ text, variant = "link", size = "lg", href, classNames, attributes = {} }) => {
  const classNamePrefix = "ds-pill--";
  const classes = formatClassString([
    "ds-pill",
    `${classNamePrefix}${variant}`,
    `${classNamePrefix}${size}`,
    classNames
  ]);
  return /* @__PURE__ */ jsxs2("a", { href, className: classes, ...attributes, children: [
    /* @__PURE__ */ jsx3("span", { children: text }),
    /* @__PURE__ */ jsx3(IconUse, { ...{ iconName: "arrow_forward", attributes: { "aria-hidden": "true" } } })
  ] });
};
export {
  Pill
};
//# sourceMappingURL=pill.js.map
