import React from 'react';
import { clsx } from 'clsx';

import { forwardRef } from '../utils/react';
import { Paper, PaperProps } from '../paper';
import * as css from './no-content.css';

/*-- Types --*/

export interface NoContentProps extends Omit<PaperProps, 'padding'> {}

/*-- Main --*/

export const NoContent = forwardRef<'div', NoContentProps>(function NoContent(
  { className, children, ...rest },
  ref,
) {
  const cn = clsx(className, css.base);

  return (
    <Paper ref={ref} className={cn} {...rest}>
      {children}
    </Paper>
  );
});
