import { CardToolbarItemOptions, CardValue, EditorInterface, PluginOptions, ToolbarItemOptions } from '@aomao/engine';

export interface EmbedValue extends CardValue {
  height?: number;
  collapsed?: boolean;
  xml?: string;
  isResize?: boolean;
}

export type EmbedRenderBeforeEvent = (url: string) => EmbedValue;

export interface EmbedOptions extends PluginOptions {
  renderBefore?: EmbedRenderBeforeEvent;
  cardToolbars?: (items: (ToolbarItemOptions | CardToolbarItemOptions)[], editor: EditorInterface) => (ToolbarItemOptions | CardToolbarItemOptions)[];
}
