'use strict';

var react = require('@headlessui/react');
var mergeProps = require('merge-props');
var React = require('react');
var PolymorphicWithOverrides = require('../../../common/polymorphicWithOverrides/PolymorphicWithOverrides.js');
var SelectInput_contexts = require('../SelectInput.contexts.js');
var jsxRuntime = require('react/jsx-runtime');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var mergeProps__default = /*#__PURE__*/_interopDefault(mergeProps);

function SelectInputTriggerButton({
  as = 'button',
  ...restProps
}) {
  const {
    ref,
    onClick,
    onKeyDown,
    size,
    ...interactionProps
  } = React.useContext(SelectInput_contexts.SelectInputTriggerButtonPropsContext);
  return /*#__PURE__*/jsxRuntime.jsx(react.ListboxButton, {
    ref: ref,
    as: PolymorphicWithOverrides.PolymorphicWithOverrides,
    role: "combobox",
    __overrides: {
      as,
      size,
      ...interactionProps
    },
    ...mergeProps__default.default({
      onClick,
      onKeyDown
    }, restProps)
  });
}

exports.SelectInputTriggerButton = SelectInputTriggerButton;
//# sourceMappingURL=SelectInputTriggerButton.js.map
