'use client'

import type { ComponentProps } from 'react'
import { Root as RadixSeparatorRoot } from '@radix-ui/react-separator'

import { cn } from '@/shared/lib/utils'

export function Separator({
  className,
  orientation = 'horizontal',
  decorative = true,
  ...props
}: ComponentProps<typeof RadixSeparatorRoot>) {
  return (
    <RadixSeparatorRoot
      data-slot='separator'
      decorative={decorative}
      orientation={orientation}
      className={cn(
        'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch',
        className
      )}
      {...props}
    />
  )
}
