import noop from 'lodash/noop';
import { PasskeyActions } from '@arcblock/did-connect-react/lib/Passkey';
import PropTypes from 'prop-types';
import { useTeamContext } from '../../contexts/team';
import { jsx as _jsx } from "react/jsx-runtime";
export default function RegisterPasskey({
  hasPasskey = false
}) {
  const {
    isNodeTeam
  } = useTeamContext();
  if (!isNodeTeam) {
    return null;
  }
  return /*#__PURE__*/_jsx(PasskeyActions, {
    behavior: "only-new",
    action: "connect",
    createMode: "connect",
    createButtonText: hasPasskey ? 'Add New Passkey' : 'Add Passkey',
    onSuccess: noop,
    onError: noop,
    dense: true
  });
}
RegisterPasskey.propTypes = {
  hasPasskey: PropTypes.bool
};