import type { Component } from 'vue'; import { h } from 'vue'; import { Button, Popconfirm, Space } from 'antdv-next'; const AButton = Button as any; const APopconfirm = Popconfirm as any; const ASpace = Space as any; export interface QqbotActionItem { confirmText?: string; danger?: boolean; disabled?: boolean; icon?: Component; key: string; label: string; loading?: boolean; onClick: () => Promise | void; } export const renderQqbotActions = (actions: QqbotActionItem[]) => { return ( {actions.map((action) => { const button = ( {action.label} ); if (!action.confirmText) return {button}; return ( {{ default: () => button }} ); })} ); };