import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';

import Actions from '../actions';
import ClickBoundary from '../click-boundary';

type PriceActionProps = {
  onDuplicate: Function;
  onRemove: Function;
};

export default function PriceActions(props: PriceActionProps) {
  const { t } = useLocaleContext();

  return (
    <ClickBoundary>
      <Actions
        actions={[
          { label: t('admin.price.duplicate'), handler: props.onDuplicate, color: 'primary' },
          { label: t('admin.price.remove'), handler: props.onRemove, color: 'error' },
        ]}
      />
    </ClickBoundary>
  );
}
