(()=>{"use strict";const e=window.wp.blocks,l=window.React,t=window.wp.i18n,a=window.wp.blockEditor,i=window.wp.components,n=JSON.parse('{"u2":"wlc-algolia/result-image"}');(0,e.registerBlockType)(n.u2,{edit:function({attributes:e,setAttributes:n}){const{fieldPath:o,linkType:r,linkFieldPath:c,hideIfEmpty:g}=e;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(a.InspectorControls,null,(0,l.createElement)(i.PanelBody,{title:(0,t.__)("Result Image","wlc-search-integration-with-algolia"),initialOpen:!0},(0,l.createElement)(i.TextControl,{label:(0,t.__)("Image URL field path","wlc-search-integration-with-algolia"),value:o||"",onChange:e=>n({fieldPath:e})}),(0,l.createElement)(i.SelectControl,{label:(0,t.__)("Link","wlc-search-integration-with-algolia"),value:r||"permalink",options:[{label:(0,t.__)("Permalink","wlc-search-integration-with-algolia"),value:"permalink"},{label:(0,t.__)("None","wlc-search-integration-with-algolia"),value:"none"},{label:(0,t.__)("Custom URL (field)","wlc-search-integration-with-algolia"),value:"field"}],onChange:e=>n({linkType:e})}),"field"===r?(0,l.createElement)(i.TextControl,{label:(0,t.__)("Link field path","wlc-search-integration-with-algolia"),value:c||"",onChange:e=>n({linkFieldPath:e})}):null,(0,l.createElement)(i.ToggleControl,{label:(0,t.__)("Hide if empty","wlc-search-integration-with-algolia"),checked:!1!==g,onChange:e=>n({hideIfEmpty:!!e})}))),(0,l.createElement)("div",{style:{width:110,height:70,background:"#eee",borderRadius:10,display:"grid",placeItems:"center",color:"#555"}},(0,t.__)("Image","wlc-search-integration-with-algolia")))},save:()=>null})})();