'use strict';

var React = require('react');
var clsx = require('clsx');
var Button_resolver = require('../../button/Button.resolver.js');
var useListItemControl = require('../useListItemControl.js');
var ListItemContext = require('../ListItemContext.js');
var jsxRuntime = require('react/jsx-runtime');

const Button = ({
  priority = 'secondary-neutral',
  partiallyInteractive,
  ...props
}) => {
  const {
    baseItemProps
  } = useListItemControl.useListItemControl('button', {
    partiallyInteractive,
    ...props
  });
  const {
    ids,
    describedByIds
  } = React.useContext(ListItemContext.ListItemContext);
  const commonProps = {
    ...props,
    className: clsx.clsx('wds-list-item-control', !partiallyInteractive && props.href && 'wds-list-item-control_pseudo-element'),
    id: ids.control,
    priority,
    v2: true,
    size: 'sm',
    disabled: baseItemProps.disabled
  };
  const buttonContentId = props.href || partiallyInteractive ? '' : `${ids.control}_content`;
  return /*#__PURE__*/jsxRuntime.jsx(Button_resolver.default, {
    "aria-describedby": `${buttonContentId} ${describedByIds}`,
    ...commonProps
  });
};
Button.displayName = 'ListItem.Button';

exports.Button = Button;
//# sourceMappingURL=ListItemButton.js.map
