(()=>{"use strict";var e={n:o=>{var a=o&&o.__esModule?()=>o.default:()=>o;return e.d(a,{a}),a},d:(o,a)=>{for(var l in a)e.o(a,l)&&!e.o(o,l)&&Object.defineProperty(o,l,{enumerable:!0,get:a[l]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.blocks,a=window.wp.serverSideRender;var l=e.n(a);const c=window.wp.blockEditor,r=window.wp.components,t=window.ReactJSXRuntime,s=JSON.parse('{"UU":"acadp/search-form"}');(0,o.registerBlockType)(s.UU,{attributes:{style:{type:"string",default:acadp_blocks.search_form.style},keyword:{type:"boolean",default:acadp_blocks.search_form.keyword},location:{type:"boolean",default:acadp_blocks.search_form.location},category:{type:"boolean",default:acadp_blocks.search_form.category},custom_fields:{type:"boolean",default:acadp_blocks.search_form.custom_fields},price:{type:"boolean",default:acadp_blocks.search_form.price}},edit:function({attributes:e,setAttributes:o}){const{style:a,keyword:s,location:n,category:i,custom_fields:d,price:_}=e;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.InspectorControls,{children:(0,t.jsxs)(r.PanelBody,{title:acadp_blocks.search_form.i18n.panel_settings,children:[(0,t.jsx)(r.PanelRow,{children:(0,t.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,label:acadp_blocks.search_form.i18n.style_label,value:a,options:[{label:acadp_blocks.search_form.i18n.style_vertical,value:"vertical"},{label:acadp_blocks.search_form.i18n.style_inline,value:"inline"}],onChange:e=>o({style:e})})}),(0,t.jsx)(r.PanelRow,{children:(0,t.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:acadp_blocks.search_form.i18n.keyword_label,checked:s,onChange:()=>o({keyword:!s})})}),(0,t.jsx)(r.PanelRow,{children:(0,t.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:acadp_blocks.search_form.i18n.location_label,checked:n,onChange:()=>o({location:!n})})}),(0,t.jsx)(r.PanelRow,{children:(0,t.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:acadp_blocks.search_form.i18n.category_label,checked:i,onChange:()=>o({category:!i})})}),(0,t.jsx)(r.PanelRow,{children:(0,t.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:acadp_blocks.search_form.i18n.custom_fields_label,checked:d,onChange:()=>o({custom_fields:!d})})}),(0,t.jsx)(r.PanelRow,{children:(0,t.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:acadp_blocks.search_form.i18n.price_label,checked:_,onChange:()=>o({price:!_})})})]})}),(0,t.jsx)("div",{...(0,c.useBlockProps)(),children:(0,t.jsx)(r.Disabled,{children:(0,t.jsx)(l(),{block:"acadp/search-form",attributes:e})})})]})}})})();