"use client"

import * as React from "react"
import * as SeparatorPrimitive from "@radix-ui/react-separator"
import { cn } from "@/lib/utils"

function Separator({
  className,
  orientation = "horizontal",
  decorative = true,
  ...props
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {

  const base =
    orientation === "horizontal"
      ? "bg-border shrink-0 w-full h-px"
      : "bg-border shrink-0 h-full w-px"

  return (
    <SeparatorPrimitive.Root
      data-slot="separator-root"
      decorative={decorative}
      orientation={orientation}
      className={cn(base, className)}
      {...props}
    />
  )
}

export { Separator }
