// @flow import * as ICONS from 'constants/icons'; import Button from 'component/button'; import Icon from 'component/common/icon'; import React from 'react'; type Props = { collectionIndex?: number, collectionUris: Array, dragHandleProps?: any, uri: string, editCollection: (CollectionEditParams) => void, }; export default function CollectionButtons(props: Props) { const { collectionIndex: foundIndex, collectionUris, dragHandleProps, uri, editCollection } = props; const [confirmDelete, setConfirmDelete] = React.useState(false); const lastCollectionIndex = collectionUris ? collectionUris.length - 1 : 0; const collectionIndex = Number(foundIndex); const orderButton = (className: string, title: string, icon: string, disabled: boolean, handleClick?: () => void) => (