"use client"
import { ChevronsUpDown} from "lucide-react"

import { Button } from "@/components/ui/button"
import {
  Collapsible,
  CollapsibleContent,
  CollapsibleTrigger,
} from "@/components/ui/collapsible"

import { useState } from "react";

const BasicCollapsible = () => {
  const [isOpen, setIsOpen] = useState(false)
  return (
    <div className="flex justify-center">
      <Collapsible
        open={isOpen}
        onOpenChange={setIsOpen}
        className="w-[350px] space-y-2 "
      >
        <div className="flex items-center justify-between gap-4">
          <h4 className="text-sm font-semibold">
           Collapsible Trigger 
          </h4>
          <CollapsibleTrigger asChild>
            <Button variant="outline" size="icon">
              <ChevronsUpDown className="h-4 w-4" />
              <span className="sr-only">Toggle</span>
            </Button>
          </CollapsibleTrigger>
        </div>
        <div className="rounded-md  border border-default-200 dark:border-default-300 px-4 py-3 font-mono text-sm">
          @radix-ui/primitives
        </div>
        <CollapsibleContent className="space-y-2">
          <div className="rounded-md   border border-default-200 dark:border-default-300 px-4 py-3 font-mono text-sm">
            @radix-ui/colors
          </div>
          <div className="rounded-md  border border-default-200 dark:border-default-300 px-4 py-3 font-mono text-sm">
            @stitches/react
          </div>
        </CollapsibleContent>
      </Collapsible>
    </div>
  );
};

export default BasicCollapsible;