import type { ComponentProps } from 'react';
import React, { memo } from 'react';
import { LoadingIndicator } from '@theorchard/suite-components';
import { components } from 'react-select';

type Props = ComponentProps<typeof components.LoadingMessage>;

const AsyncLoader = (props: Props) => (
    <components.LoadingMessage className="AsyncLoader" {...props}>
        <LoadingIndicator small />
    </components.LoadingMessage>
);

export default memo(AsyncLoader);
