(()=>{"use strict";var e,t={3520:()=>{const e=window.wp.blocks,t=window.React,a=window.wp.i18n,l=window.wp.blockEditor,n=window.wp.components,o=JSON.parse('{"u2":"wlc-algolia/agent-chat"}');(0,e.registerBlockType)(o.u2,{edit:function(e){const{attributes:o,setAttributes:r}=e,{agentId:i,placeholder:c,showHeader:g,headerText:h,accentColor:s,height:d}=o;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(l.InspectorControls,null,(0,t.createElement)(n.PanelBody,{title:(0,a.__)("Agent Settings","wlc-search-integration-with-algolia"),initialOpen:!0},(0,t.createElement)(n.TextControl,{label:(0,a.__)("Agent ID","wlc-search-integration-with-algolia"),value:i,onChange:e=>r({agentId:e}),help:(0,a.__)("Enter your Algolia Agent Studio Agent ID","wlc-search-integration-with-algolia")}),(0,t.createElement)(n.TextControl,{label:(0,a.__)("Input Placeholder","wlc-search-integration-with-algolia"),value:c,onChange:e=>r({placeholder:e})}),(0,t.createElement)(n.ToggleControl,{label:(0,a.__)("Show Header","wlc-search-integration-with-algolia"),checked:!1!==g,onChange:e=>r({showHeader:!!e})}),!1!==g?(0,t.createElement)(n.TextControl,{label:(0,a.__)("Header Text","wlc-search-integration-with-algolia"),value:h,onChange:e=>r({headerText:e})}):null,(0,t.createElement)(n.TextControl,{label:(0,a.__)("Height","wlc-search-integration-with-algolia"),value:d,onChange:e=>r({height:e}),help:(0,a.__)("Chat container height (e.g., 600px, 80vh)","wlc-search-integration-with-algolia")}),(0,t.createElement)("div",{style:{marginTop:12}},(0,t.createElement)("div",{style:{marginBottom:8,fontWeight:600}},(0,a.__)("Accent Color","wlc-search-integration-with-algolia")),(0,t.createElement)(n.ColorPalette,{value:s,onChange:e=>r({accentColor:e||"#DB002F"})})))),(0,t.createElement)("div",{...(0,l.useBlockProps)()},(0,t.createElement)("div",{className:"wp-block-wlc-algolia-agent-chat__editor"},(0,t.createElement)("h3",null,(0,a.__)("Algolia Agent Chat","wlc-search-integration-with-algolia")),(0,t.createElement)("div",{className:"wp-block-wlc-algolia-agent-chat__editor-preview"},i?(0,t.createElement)(t.Fragment,null,!1!==g?(0,t.createElement)("div",{style:{padding:"12px",background:"#f5f5f5",borderRadius:"8px 8px 0 0",fontWeight:600}},h||(0,a.__)("AI Assistant","wlc-search-integration-with-algolia")):null,(0,t.createElement)("div",{style:{padding:"16px",background:"#fff",border:"1px solid #ddd",borderRadius:!1!==g?"0 0 8px 8px":"8px",minHeight:d||"400px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",color:"#666"}},(0,t.createElement)("div",{style:{fontSize:14,marginBottom:8}},(0,a.__)("Agent ID:","wlc-search-integration-with-algolia")," ",(0,t.createElement)("code",null,i)),(0,t.createElement)("div",{style:{fontSize:12,opacity:.7}},(0,a.__)("Chat interface will appear on the frontend","wlc-search-integration-with-algolia")))):(0,t.createElement)("div",{style:{padding:"16px",background:"#fff3cd",border:"1px solid #ffc107",borderRadius:"8px",color:"#856404"}},(0,a.__)("Please configure Agent ID in the block settings","wlc-search-integration-with-algolia"))))))},save:function(){return null}})}},a={};function l(e){var n=a[e];if(void 0!==n)return n.exports;var o=a[e]={exports:{}};return t[e](o,o.exports,l),o.exports}l.m=t,e=[],l.O=(t,a,n,o)=>{if(!a){var r=1/0;for(h=0;h<e.length;h++){for(var[a,n,o]=e[h],i=!0,c=0;c<a.length;c++)(!1&o||r>=o)&&Object.keys(l.O).every((e=>l.O[e](a[c])))?a.splice(c--,1):(i=!1,o<r&&(r=o));if(i){e.splice(h--,1);var g=n();void 0!==g&&(t=g)}}return t}o=o||0;for(var h=e.length;h>0&&e[h-1][2]>o;h--)e[h]=e[h-1];e[h]=[a,n,o]},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={844:0,707:0};l.O.j=t=>0===e[t];var t=(t,a)=>{var n,o,[r,i,c]=a,g=0;if(r.some((t=>0!==e[t]))){for(n in i)l.o(i,n)&&(l.m[n]=i[n]);if(c)var h=c(l)}for(t&&t(a);g<r.length;g++)o=r[g],l.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return l.O(h)},a=globalThis.webpackChunkalgolia_blocks=globalThis.webpackChunkalgolia_blocks||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})();var n=l.O(void 0,[707],(()=>l(3520)));n=l.O(n)})();