import React, { FunctionComponent } from 'react';
import loader from 'assets/images/loader_app.gif';
import { AtomImage } from 'native/atoms/Image';
import { LoadingContainer } from './styles'

export interface ILoadingProps {
    width?: string;
    height?: string;
    transparent?: boolean;
}

export const AtomLoading: FunctionComponent<ILoadingProps> = ({
    width = '102px',
    height = '102px',
    transparent = false
}) => {
    return (
        <LoadingContainer transparent={transparent} testID={'loading-container'}>
            <AtomImage src={loader} alt={'Loading'} imgWidth={width} imgHeight={height} />
        </LoadingContainer>
    );
};

