import React, { FunctionComponent, PropsWithChildren } from 'react';
import cn from 'classnames';

import { AppWrapperProps } from './types.d';

/**
 * Using for wrap whole application
 */

export const AppWrapper: FunctionComponent<PropsWithChildren<AppWrapperProps>> = ({
  children,
  className = '',
}): React.ReactElement => {
  const classNames = cn({
    out: true,
    [className]: !!className,
  });

  return (
    <div className={classNames}>
      <div className="page">{children}</div>
    </div>
  );
};
