import DidAddress, { IDidAddressProps } from './did-address';
import ResponsiveDidAddress from './responsive-did-address';

export interface IDidAddressWrapper extends IDidAddressProps {
  responsive?: true | false;
}

function DidAddressWrapper({
  ref = undefined,
  responsive = true,
  ...rest
}: IDidAddressWrapper & {
  ref?: React.Ref<unknown>;
}) {
  if (responsive) {
    return <ResponsiveDidAddress {...rest} ref={ref} />;
  }
  return <DidAddress {...rest} ref={ref} />;
}

export default DidAddressWrapper;
