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