(()=>{"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 t in a)e.o(a,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:a[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.blocks,a=window.wp.serverSideRender;var t=e.n(a);const n=window.wp.components,l=window.wp.blockEditor,r=window.ReactJSXRuntime,s=JSON.parse('{"UU":"aiovg/search"}');(0,o.registerBlockType)(s.UU,{edit:function({attributes:e,setAttributes:o}){const{template:a,keyword:s,category:i,tag:c,sort:g,search_button:_,target:b}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.InspectorControls,{children:(0,r.jsxs)(n.PanelBody,{title:aiovg_blocks.i18n.general_settings,className:"aiovg-block-panel",children:[(0,r.jsx)(n.PanelRow,{children:(0,r.jsx)(n.SelectControl,{label:aiovg_blocks.i18n.select_template,value:a,options:[{label:aiovg_blocks.i18n.vertical,value:"vertical"},{label:aiovg_blocks.i18n.horizontal,value:"horizontal"}],onChange:e=>o({template:e}),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})}),(0,r.jsx)(n.PanelRow,{children:(0,r.jsx)(n.ToggleControl,{label:aiovg_blocks.i18n.search_by_keywords,checked:s,onChange:()=>o({keyword:!s}),__nextHasNoMarginBottom:!0})}),(0,r.jsx)(n.PanelRow,{children:(0,r.jsx)(n.ToggleControl,{label:aiovg_blocks.i18n.search_by_categories,checked:i,onChange:()=>o({category:!i}),__nextHasNoMarginBottom:!0})}),(0,r.jsx)(n.PanelRow,{children:(0,r.jsx)(n.ToggleControl,{label:aiovg_blocks.i18n.search_by_tags,checked:c,onChange:()=>o({tag:!c}),__nextHasNoMarginBottom:!0})}),(0,r.jsx)(n.PanelRow,{children:(0,r.jsx)(n.ToggleControl,{label:aiovg_blocks.i18n.sort_by_dropdown,checked:g,onChange:()=>o({sort:!g}),__nextHasNoMarginBottom:!0})}),(0,r.jsx)(n.PanelRow,{children:(0,r.jsx)(n.ToggleControl,{label:aiovg_blocks.i18n.search_button,checked:_,onChange:()=>o({search_button:!_}),__nextHasNoMarginBottom:!0})}),(0,r.jsx)(n.PanelRow,{children:(0,r.jsx)(n.SelectControl,{label:aiovg_blocks.i18n.search_results_page,value:b,options:[{label:aiovg_blocks.i18n.default_page,value:"default"},{label:aiovg_blocks.i18n.current_page,value:"current"}],onChange:e=>o({target:e}),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})})]})}),(0,r.jsx)("div",{...(0,l.useBlockProps)(),children:(0,r.jsx)(n.Disabled,{children:(0,r.jsx)(t(),{block:"aiovg/search",attributes:e})})})]})}})})();