/**
 * This file is part of the NocoBase (R) project.
 * Copyright (c) 2020-2024 NocoBase Co., Ltd.
 * Authors: NocoBase Team.
 *
 * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
 * For more information, please refer to: https://www.nocobase.com/agreement.
 */

"use strict";(self.webpackChunk_nocobase_plugin_ai=self.webpackChunk_nocobase_plugin_ai||[]).push([["933"],{5324:function(e,n,t){t.r(n),t.d(n,{DataModelingCard:function(){return m}});var l=t(8156),a=t.n(l),o=t(2721),i=t(482),r=t(3990),s=t(3772),c=t(8731),u=t(5708),m=function(e){var n,t,l,m=e.messageId,d=e.toolCall,g=(0,r.NT)(),p=(0,s.useToken)().token,f=u.h.use.responseLoading(),E=u.h.use.messages(),v=c.Y.use.setOpenToolModal(),h=c.Y.use.setActiveTool(),C=c.Y.use.setActiveMessageId(),T=null==(t=c.Y.use.toolsByMessageId()[m])||null==(n=t[d.id])?void 0:n.version,k=f&&(null==(l=E[length-1])?void 0:l.content.messageId)===m,b=a().createElement(a().Fragment,null,g("Please review and finish the process"));return k?b=a().createElement(a().Fragment,null,a().createElement(o.Spin,{indicator:a().createElement(i.LoadingOutlined,{spin:!0}),size:"small"})," ",g("Generating...")):d.args.collections||(console.error("Invalid definition",d.args),b=a().createElement(a().Fragment,null,a().createElement(i.ExclamationCircleTwoTone,{twoToneColor:"#eb2f96"})," ",g("Invalid definition"))),a().createElement(a().Fragment,null,a().createElement(o.Card,{style:{margin:"16px 0",cursor:"pointer"},onClick:function(){!k&&d.args.collections&&(h(d),C(m),v(!0))}},a().createElement(o.Card.Meta,{avatar:a().createElement(i.DatabaseOutlined,null),title:a().createElement(a().Fragment,null,g("Data modeling"),T&&T>1?a().createElement("span",{style:{marginLeft:"8px",color:p.colorTextDescription,fontWeight:"normal",fontStyle:"italic"}},g("Version")," ",T):null),description:b})))}}}]);