import React from 'react';
import {MoreHorizontal} from 'lucide-react';
import {DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger} from '@/components/ui/dropdown-menu';

const CollectionDropdownMenu = ({ collection, onAddRequest, onRename, onDelete }) => (
    <DropdownMenu>
      <DropdownMenuTrigger data-dropdown-trigger="true" asChild>
        <div className="p-0 h-auto hover:bg-accent rounded-sm">
          <MoreHorizontal className="h-4 w-4"/>
        </div>
      </DropdownMenuTrigger>
      <DropdownMenuContent align="end">
        <DropdownMenuItem onClick={onAddRequest}>
          요청 추가
        </DropdownMenuItem>
        <DropdownMenuItem onClick={onRename}>
          이름 변경
        </DropdownMenuItem>
        <DropdownMenuItem
            className="text-destructive"
            onClick={() => onDelete(collection)}
        >
          삭제
        </DropdownMenuItem>
      </DropdownMenuContent>
    </DropdownMenu>
);

export default CollectionDropdownMenu;
