import { jsx } from 'react/jsx-runtime';
import { forwardRef } from 'react';
import { c as cx } from './index-De1g9FRV.js';
import { s as styles$1 } from './Button.module-DsGhJYRw.js';
import { u as useLayoutPropsUtil } from './useLayoutPropsUtil-CB_zHDbW.js';
import { c as childrenToString } from './childrenToString-Bz9MqbHb.js';
import { useTrackingId } from './useTrackingId.js';

import './ButtonCompound.css';const styles = {
	"button-compound": "_button-compound_de23z_1",
	"shape-rounded": "_shape-rounded_de23z_22",
	"shape-pill": "_shape-pill_de23z_26",
	"shape-circular": "_shape-circular_de23z_30"
};

const ButtonCompound = forwardRef(
  (props, ref) => {
    const { layoutStyles, componentProps } = useLayoutPropsUtil(props);
    const {
      className,
      shape = "rounded",
      type,
      disabled,
      children,
      style,
      ...rest
    } = componentProps;
    const data = {
      children: childrenToString(props.children),
      shape,
      type
    };
    const trackingId = useTrackingId({
      name: "ButtonCompound",
      data,
      hasOverride: !!props["data-tracking-id"]
    });
    const buttonClassNames = cx(
      className,
      styles$1["button"],
      styles["button-compound"],
      {
        [styles["shape-pill"]]: shape === "pill",
        [styles["shape-circular"]]: shape === "circular",
        [styles["shape-rounded"]]: shape === "rounded"
      }
    );
    const styleCombined = {
      ...style,
      ...layoutStyles
    };
    return /* @__PURE__ */ jsx(
      "button",
      {
        "data-tracking-id": trackingId,
        className: buttonClassNames,
        type,
        disabled,
        "data-anv": "button-compound",
        ref,
        style: styleCombined,
        ...rest,
        children
      }
    );
  }
);
ButtonCompound.displayName = "ButtonCompound";

export { ButtonCompound as B };
//# sourceMappingURL=ButtonCompound-DsrK7G3q.js.map
