!function(){"use strict";var e=window.wp.i18n,t=window.wp.blocks,i=window.wp.blockEditor,n=window.wp.components,l=window.ReactJSXRuntime;(0,t.registerBlockType)("hyve/chat",{edit:({attributes:t})=>{const o=(0,i.useBlockProps)(),s=0===Number(window.hyveChatBlock.stats.totalChunks??"0"),a=Boolean(window.hyveChatBlock?.globalChatEnabled),h="floating"===t?.variant;let r=(0,e.__)("Hyve Chatbot will appear here. No further action needed.","hyve-lite");return h&&(r=(0,e.__)("Hyve Chatbot bubble will appear on this page. No further action needed.","hyve-lite")),(0,l.jsx)("div",{...o,children:(0,l.jsxs)(n.Placeholder,{children:[s&&(0,l.jsx)(n.Notice,{isDismissible:!1,status:"warning",children:(0,l.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,l.jsx)(n.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")})]})}),a&&!h&&(0,l.jsx)(n.Notice,{isDismissible:!1,status:"info",children:(0,l.jsx)("p",{children:(0,e.__)("Hyve Chat is set to appear on all pages. This inline block will be shown here in place of the floating bubble.","hyve-lite")})}),a&&h&&(0,l.jsx)(n.Notice,{isDismissible:!1,status:"info",children:(0,l.jsx)("p",{children:(0,e.__)("Hyve Chat already appears on all pages, so this floating block is not needed here.","hyve-lite")})}),r]})})},save:()=>null})}();