import React from 'react';
import { CellMultiDocumentEdit } from '@wix/patterns-fields';
import type { CellEditProps } from '../../types';

export const MultiDocumentEdit: React.FC<CellEditProps<string[] | null>> = ({
  value,
  onChange,
  onCommit,
  onCancel,
  onStartEdit,
  inputRef,
  columnId,
  rowKey,
}) => (
  <CellMultiDocumentEdit
    value={value}
    onChange={onChange}
    onCommit={onCommit}
    onCancel={onCancel}
    onStartEdit={onStartEdit}
    inputRef={inputRef}
    dataHook="multi-document-edit"
    fieldId={`multi-document-edit-${columnId}-${rowKey}`}
  />
);
