import { __ } from '@wordpress/i18n';
import { Video } from 'lucide-react';
import { createMediaField } from './media-field';

declare module '@tiptap/core' {
	interface Commands<ReturnType> {
		video: {
			insertVideo: (attrs?: { url?: string; title?: string }) => ReturnType;
		};
	}
}

export const VideoField = createMediaField({
	name: 'video',
	dataType: 'video',
	libraryType: 'video',
	addLabel: __('Add Video', 'allcoach'),
	subLabel: __('Click to select from media library', 'allcoach'),
	icon: Video,
	commandName: 'insertVideo',
});
