import React, { useCallback, useRef } from 'react';
import { CellVideoEdit } from '@wix/patterns-fields';
export const VideoEdit = ({ value, onChange, onCommit, onCancel, onStartEdit, inputRef, }) => {
    const wrapperRef = useRef(null);
    const requestCellFocus = useCallback(() => {
        const cell = wrapperRef.current?.closest('[role="gridcell"]');
        cell?.focus({ preventScroll: true });
    }, []);
    return (React.createElement("div", { ref: wrapperRef, style: { width: '100%', height: '100%' } },
        React.createElement(CellVideoEdit, { value: value, onChange: onChange, onCommit: onCommit, onCancel: onCancel, onStartEdit: onStartEdit, inputRef: inputRef, onRequestCellFocus: requestCellFocus, dataHook: "video-edit" })));
};
//# sourceMappingURL=Edit.js.map