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

import { forwardRef } from '../utils/react';
import { Box } from '../box';
import * as css from './paper.css';

/*-- Types --*/

export interface PaperProps extends css.PaperVariants {}

/*-- Main --*/

export const Paper = forwardRef<'div', PaperProps>(function Paper(
  { className, children, padding = 'lg', ...rest },
  ref,
) {
  const cn = clsx(className, css.paper({ padding }));

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