var registerBlockType=wp.blocks.registerBlockType,InspectorControls=wp.editor.InspectorControls,_wp$components=wp.components,BaseControl=_wp$components.BaseControl,PanelBody=_wp$components.PanelBody,SelectControl=_wp$components.SelectControl,ServerSideRender=_wp$components.ServerSideRender,TextControl=_wp$components.TextControl;registerBlockType("a-staff/loop-block",{title:A_STAFF_LOOP_BLOCK.block_title,icon:"groups",category:"widgets",supports:{anchor:!1,customClassName:!1},edit:function(t){return[wp.element.createElement(InspectorControls,null,wp.element.createElement(PanelBody,{title:A_STAFF_LOOP_BLOCK.layout_panel_title},wp.element.createElement(BaseControl,{label:A_STAFF_LOOP_BLOCK.columns_number_label},wp.element.createElement("input",{type:"number",onChange:function(e){t.setAttributes({columns:parseInt(e.target.value)})},value:t.attributes.columns,min:A_STAFF_LOOP_BLOCK.columns_min,max:A_STAFF_LOOP_BLOCK.columns_max})),wp.element.createElement(SelectControl,{label:A_STAFF_LOOP_BLOCK.orderby_label,value:t.attributes.orderby,options:A_STAFF_LOOP_BLOCK.orderby_options,onChange:function(e){t.setAttributes({orderby:e})}}),wp.element.createElement(SelectControl,{label:A_STAFF_LOOP_BLOCK.order_label,value:t.attributes.order,options:A_STAFF_LOOP_BLOCK.order_options,onChange:function(e){t.setAttributes({order:e})}}),wp.element.createElement(TextControl,{label:A_STAFF_LOOP_BLOCK.class_name_label,value:t.attributes.class,onChange:function(e){t.setAttributes({class:e})}})),wp.element.createElement(PanelBody,{title:A_STAFF_LOOP_BLOCK.filters_panel_title,initialOpen:!1},wp.element.createElement(SelectControl,{label:A_STAFF_LOOP_BLOCK.ids_label,value:t.attributes.ids,options:A_STAFF_LOOP_BLOCK.ids_options,multiple:"true",onChange:function(e){t.setAttributes({ids:e})}}),wp.element.createElement(SelectControl,{label:A_STAFF_LOOP_BLOCK.exclude_label,value:t.attributes.exclude,options:A_STAFF_LOOP_BLOCK.ids_options,multiple:"true",onChange:function(e){t.setAttributes({exclude:e})}}),wp.element.createElement(SelectControl,{label:A_STAFF_LOOP_BLOCK.department_label,value:t.attributes.department,options:A_STAFF_LOOP_BLOCK.department_options,multiple:"true",onChange:function(e){t.setAttributes({department:e})}}),wp.element.createElement(SelectControl,{label:A_STAFF_LOOP_BLOCK.exclude_department_label,value:t.attributes.exclude_department,options:A_STAFF_LOOP_BLOCK.department_options,multiple:"true",onChange:function(e){t.setAttributes({exclude_department:e})}}))),wp.element.createElement(ServerSideRender,{block:"a-staff/loop-block",attributes:t.attributes})]},save:function(){return null}}),$(document).on("click",".a-staff-member-box-wrapper a",function(e){e.preventDefault()});