import React from 'react';
import { faCheck } from '@fortawesome/free-solid-svg-icons/faCheck';
import { FontAwesomeIcon } from '../font-awesome-icon';
import { ACCENT_TYPES, Button } from '../button';
import { useTranslation } from '../hooks/use-translation';
import { jsx as _jsx } from "react/jsx-runtime";
export default function ToggleSelectButton({
  isSelected,
  onToggle,
  selectContentText: selectContentTextParams,
  isDisabled = false,
  deselectContent = /*#__PURE__*/_jsx(FontAwesomeIcon, {
    icon: faCheck
  })
}) {
  const {
    t
  } = useTranslation();
  const selectContentText = selectContentTextParams ?? t('Select');
  return /*#__PURE__*/_jsx("span", {
    className: "select-toggle-button",
    children: /*#__PURE__*/_jsx(Button, {
      accentType: ACCENT_TYPES.COMMAND,
      testId: "select-toggle-button",
      isDisabled: isDisabled,
      onClick: onToggle,
      children: isSelected ? deselectContent : selectContentText
    })
  });
}