Liferay.Loader.define("product-navigation-control-menu@6.0.52/js/ContentOptions",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/drop-down","@frontend-taglib-clay$clayui/form","@frontend-taglib-clay$clayui/icon","frontend-js-web","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","./AddPanel"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=f(a("@frontend-taglib-clay$clayui/button")),l=f(a("@frontend-taglib-clay$clayui/drop-down")),r=c(a("@frontend-taglib-clay$clayui/form")),o=f(a("@frontend-taglib-clay$clayui/icon")),d=a("frontend-js-web"),i=(f(a("liferay!frontend-js-react-web$prop-types")),c(a("liferay!frontend-js-react-web$react"))),s=a("./AddPanel");function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){var r=n?Object.getOwnPropertyDescriptor(e,l):null;r&&(r.get||r.set)?Object.defineProperty(a,l,r):a[l]=e[l]}return a.default=e,t&&t.set(e,a),a}function f(e){return e&&e.__esModule?e:{default:e}}const e=[{label:(0,d.sub)(Liferay.Language.get("x-items"),4),value:4},{label:(0,d.sub)(Liferay.Language.get("x-items"),8),value:8},{label:(0,d.sub)(Liferay.Language.get("x-items"),10),value:10}];var y=({onChangeSelect:t})=>{const{addContentsURLs:a,displayGrid:u,portletNamespace:c,setDisplayGrid:f}=(0,i.useContext)(s.AddPanelContext),[y,p]=(0,i.useState)(!1);return i.default.createElement("div",{className:"sidebar-body__add-panel__content-options"},i.default.createElement(r.default.Group,{small:!0},i.default.createElement(r.ClaySelectWithOption,{"aria-label":"Select Label",className:"btn-monospaced sidebar-body__add-panel__content-options-select",defaultValue:10,id:"".concat(c,"_contentDropdown"),onChange:e=>t(e.target.value),options:e,sizing:"sm"})),i.default.createElement(n.default,{className:"btn-monospaced sidebar-body__add-panel__content-options-list",displayType:"unstyled",onClick:()=>f(!u),small:!0,title:Liferay.Language.get("display-style")},i.default.createElement(o.default,{symbol:u?"cards2":"list"}),i.default.createElement("span",{className:"sr-only"},Liferay.Language.get("display-style"))),i.default.createElement(l.default,{active:y,menuElementAttrs:{containerProps:{className:"cadmin"}},onActiveChange:p,trigger:i.default.createElement(n.default,{className:"btn-monospaced sidebar-body__add-panel__content-options-add",displayType:"unstyled",small:!0,title:Liferay.Language.get("add-new")},i.default.createElement(o.default,{symbol:"plus"}),i.default.createElement("span",{className:"sr-only"},Liferay.Language.get("add-new")))},i.default.createElement(l.default.ItemList,null,a.map(((e,t)=>i.default.createElement(l.default.Item,{key:t,onClick:()=>{p(!1),(0,d.navigate)(e.url)}},e.label))))))};t.default=y}}));
//# sourceMappingURL=ContentOptions.js.map