import { jsx as A } from "../../../external/.pnpm/preact@10.28.2/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js";
import C from "../Button/hooks/useButton.js";
import { DEFAULT_BUTTON_CLASSNAME as N, BUTTON_ANCHOR_CLASSNAME as B } from "../Button/constants.js";
import { ButtonVariant as h } from "../Button/types.js";
import { useMemo as t } from "../../../external/.pnpm/preact@10.28.2/node_modules/preact/hooks/dist/hooks.module.js";
import { fixedForwardRef as p } from "../../../utils/preact/fixedForwardRef.js";
import { parseClassName as T } from "../../../utils/preact/className.js";
import { parseBooleanProp as k } from "../../../utils/preact/props.js";
const M = (o, n) => {
  const { variant: i = h.PRIMARY, disabled: a = !1, onClick: l, classNameModifiers: m = [], className: e } = o, c = t(() => T("", e) || "", [e]), f = t(() => k(a), [a]), { click: r, allChildren: u, allProps: s } = C(
    c,
    [...m, i],
    `${N} ${B}`,
    f,
    o,
    "button",
    l
  ), d = t(() => ({ ...s, ...o.onClick && r ? { onClick: r } : {} }), [r, s, o.onClick]);
  return /* @__PURE__ */ A("a", { ...d, href: o.href, ref: n, children: u });
}, O = p(M);
export {
  O as default
};
