(()=>{"use strict";const e=window.wp.blocks,l=window.React,t=window.wp.i18n,i=window.wp.blockEditor,a=window.wp.components,n=JSON.parse('{"u2":"wlc-algolia/result-title"}');(0,e.registerBlockType)(n.u2,{edit:function({attributes:e,setAttributes:n}){const{fieldPath:o,linkType:r,linkFieldPath:c,hideIfEmpty:w}=e;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(i.InspectorControls,null,(0,l.createElement)(a.PanelBody,{title:(0,t.__)("Result Title","wlc-search-integration-with-algolia"),initialOpen:!0},(0,l.createElement)(a.TextControl,{label:(0,t.__)("Title field path","wlc-search-integration-with-algolia"),value:o||"",onChange:e=>n({fieldPath:e})}),(0,l.createElement)(a.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)(a.TextControl,{label:(0,t.__)("Link field path","wlc-search-integration-with-algolia"),value:c||"",onChange:e=>n({linkFieldPath:e})}):null,(0,l.createElement)(a.ToggleControl,{label:(0,t.__)("Hide if empty","wlc-search-integration-with-algolia"),checked:!1!==w,onChange:e=>n({hideIfEmpty:!!e})}))),(0,l.createElement)("div",{style:{fontWeight:700,fontSize:16}},(0,t.__)("Title","wlc-search-integration-with-algolia")," ",(0,l.createElement)("span",{style:{opacity:.6}},o?`(${o})`:"")))},save:()=>null})})();