!function(){"use strict";var e=window.React,t=window.wp.i18n,n=window.wp.blocks,l=window.wp.blockEditor,o=window.wp.components;(0,n.registerBlockType)("hyve/chat",{edit:()=>{var n;const a=(0,l.useBlockProps)(),i=0===Number(null!==(n=window.hyveChatBlock.stats.totalChunks)&&void 0!==n?n:"0"),r=Boolean(window.hyveChatBlock?.globalChatEnabled);return(0,e.createElement)("div",{...a},(0,e.createElement)(o.Placeholder,null,i&&(0,e.createElement)(o.Notice,{isDismissible:!1,status:"warning"},(0,e.createElement)("p",null,(0,t.__)("Your Knowledge Base is currently empty.","hyve-lite")," ",(0,t.__)("The Chat won’t be able to respond to questions until sources are added.","hyve-lite"),(0,e.createElement)(o.Button,{variant:"link",style:{paddingLeft:"3px"},onClick:e=>{e.preventDefault(),window.open(window.hyveChatBlock.knowledgeBaseURL,"_blank")}},(0,t.__)("Click here to add content.","hyve-lite")))),r?(0,e.createElement)("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"1rem"}},(0,t.__)("The Hyve Chat is enabled on all pages, and it won’t appear here to avoid conflicts.","hyve-lite"),(0,e.createElement)(o.Button,{variant:"secondary",onClick:e=>{e.preventDefault(),window.open(window.hyveChatBlock.dashboardURL,"_blank")}},(0,t.__)("Go to Dashboard","hyve-lite"))):(0,t.__)("Hyve Chatbot will appear here. No further action needed.","hyve-lite")))},save:()=>null})}();