(()=>{"use strict";var e={n:t=>{var i=t&&t.__esModule?()=>t.default:()=>t;return e.d(i,{a:i}),i},d:(t,i)=>{for(var r in i)e.o(i,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:i[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.blocks,i=window.React,r=window.wp.blockEditor,s=window.wp.components,n=window.wp.i18n,o=window.wp.serverSideRender;var d=e.n(o);const a=window.bp.blockData,l=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"bp/primary-nav","title":"Primary navigation","category":"widgets","icon":"buddicons-community","description":"Displays BuddyPress primary nav in the sidebar of your site. Make sure to use it as the first widget of the sidebar and only once.","keywords":["BuddyPress","navigation","community"],"textdomain":"buddypress","attributes":{"displayTitle":{"type":"boolean","default":true}},"supports":{"align":true},"editorScript":"file:index.js","style":"file:index.css"}');(0,t.registerBlockType)(l,{icon:{background:"#fff",foreground:"#d84800",src:"buddicons-community"},edit:({attributes:e,setAttributes:t,clientId:o})=>{const l=(0,r.useBlockProps)(),{displayTitle:c}=e,u=(0,a.getCurrentWidgetsSidebar)(o);return u&&u.id&&-1!==["sidebar-buddypress-members","sidebar-buddypress-groups"].indexOf(u.id)?(0,i.createElement)(s.Notice,{status:"error",isDismissible:!1},(0,i.createElement)("p",null,(0,n.__)("The BuddyPress Primary Navigation block shouldn't be used into this widget area. Please remove it.","buddypress"))):(0,i.createElement)("div",{...l},(0,i.createElement)(r.InspectorControls,null,(0,i.createElement)(s.PanelBody,{title:(0,n.__)("Settings","buddypress"),initialOpen:!0},(0,i.createElement)(s.ToggleControl,{label:(0,n.__)("Include navigation title","buddypress"),checked:!!c,onChange:()=>{t({displayTitle:!c})}}))),(0,i.createElement)(s.Disabled,null,(0,i.createElement)(d(),{block:"bp/primary-nav",attributes:e})))}})})();