import React, { forwardRef } from 'react';
import { DividerProps } from './divider.types';

const Divider = forwardRef<HTMLHRElement, DividerProps>(
    ({ orientation, variant, ...props }, ref) => (
        <hr
            {...props}
            className={`m3 m3-divider ${orientation ?? 'horizontal'} ${variant ?? 'full-width'}`.trimEnd()}
            ref={ref}
        />
    ),
);

export { Divider };
