import { ChevronsUpDown } from 'lucide-react'
import * as React from 'react'

import type { CollapsibleProps } from './index'
import * as CollapsiblePrimitive from './index'
interface ShadCollapsibleProps extends CollapsibleProps {
  title: string
  contents: string[]
}
export default (_props: ShadCollapsibleProps) => {
  const [isOpen, setIsOpen] = React.useState(false)

  return (
    <CollapsiblePrimitive.Root
      open={isOpen}
      onOpenChange={setIsOpen}
      tw="w-[350px] space-y-2"
    >
      <div tw="flex items-center justify-between space-x-4 px-4">
        <h4 tw="text-sm font-semibold">@peduarte starred 3 repositories</h4>
        <CollapsiblePrimitive.Trigger asChild>
          <button tw="w-9 p-0">
            <ChevronsUpDown tw="h-4 w-4" />
            <span tw="sr-only">Toggle</span>
          </button>
        </CollapsiblePrimitive.Trigger>
      </div>
      <div tw="rounded-md border border-slate-200 px-4 py-3 font-mono text-sm dark:border-slate-700">
        @radix-ui/primitives
      </div>
      <CollapsiblePrimitive.Content tw="space-y-2">
        <div tw="rounded-md border border-slate-200 px-4 py-3 font-mono text-sm dark:border-slate-700">
          @radix-ui/colors
        </div>
        <div tw="rounded-md border border-slate-200 px-4 py-3 font-mono text-sm dark:border-slate-700">
          @stitches/react
        </div>
      </CollapsiblePrimitive.Content>
    </CollapsiblePrimitive.Root>
  )
}
