parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"Ra3s":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TYPES=void 0;var e=wp,l=e.i18n.__,a=[{label:l("Newest","buddypress"),value:"newest"},{label:l("Active","buddypress"),value:"active"},{label:l("Popular","buddypress"),value:"popular"},{label:l("Alphabetical","buddypress"),value:"alphabetical"}];exports.TYPES=a;
},{}],"l8fw":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("./constants"),t=wp,o=t.blockEditor.InspectorControls,n=t.components,l=n.Disabled,r=n.PanelBody,u=n.RangeControl,s=n.SelectControl,i=n.TextControl,a=n.ToggleControl,p=t.element,d=p.Fragment,b=p.createElement,c=t.i18n.__,g=bp,f=g.blockComponents.ServerSideRender,m=function(t){var n=t.attributes,p=t.setAttributes,g=n.title,m=n.maxGroups,C=n.groupDefault,y=n.linkTitle;return b(d,null,b(o,null,b(r,{title:c("Settings","buddypress"),initialOpen:!0},b(i,{label:c("Title","buddypress"),value:g,onChange:function(e){p({title:e})}}),b(u,{label:c("Max groups to show","buddypress"),value:m,onChange:function(e){return p({maxGroups:e})},min:1,max:10,required:!0}),b(s,{label:c("Default groups to show","buddypress"),value:C,options:e.TYPES,onChange:function(e){p({groupDefault:e})}}),b(a,{label:c("Link block title to Groups directory","buddypress"),checked:!!y,onChange:function(){p({linkTitle:!y})}}))),b(l,null,b(f,{block:"bp/dynamic-groups",attributes:n})))},C=m;exports.default=C;
},{"./constants":"Ra3s"}],"SJlW":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=wp,t=e.blocks.createBlock,r={from:[{type:"block",blocks:["core/legacy-widget"],isMatch:function(e){var t=e.idBase,r=e.instance;return!(null==r||!r.raw)&&"bp_groups_widget"===t},transform:function(e){var r=e.instance;return t("bp/dynamic-groups",{title:r.raw.title,maxGroups:r.raw.max_groups,groupDefault:r.raw.group_default,linkTitle:r.raw.link_title})}}]},a=r;exports.default=a;
},{}],"lVvR":[function(require,module,exports) {
"use strict";var e=t(require("./dynamic-groups/edit")),r=t(require("./dynamic-groups/transforms"));function t(e){return e&&e.__esModule?e:{default:e}}var s=wp,u=s.blocks.registerBlockType,i=s.i18n.__;u("bp/dynamic-groups",{title:i("Dynamic Groups List","buddypress"),description:i("A dynamic list of recently active, popular, newest, or alphabetical groups.","buddypress"),icon:{background:"#fff",foreground:"#d84800",src:"buddicons-groups"},category:"buddypress",attributes:{title:{type:"string",default:i("Groups","buddypress")},maxGroups:{type:"number",default:5},groupDefault:{type:"string",default:"active"},linkTitle:{type:"boolean",default:!1}},edit:e.default,transforms:r.default});
},{"./dynamic-groups/edit":"l8fw","./dynamic-groups/transforms":"SJlW"}]},{},["lVvR"], null)
//# sourceMappingURL=/bp-groups/js/blocks/dynamic-groups.js.map