Liferay.Loader.define("@liferay/frontend-data-set-web@1.0.31/management_bar/components/ActiveViewSelector",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/drop-down","@frontend-taglib-clay$clayui/icon","liferay!frontend-js-react-web$react","../../FrontendDataSetContext","../../thunks/persistActiveView","../../views/ViewsContext"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n("@frontend-taglib-clay$clayui/button"),r=d(n("@frontend-taglib-clay$clayui/drop-down")),l=d(n("@frontend-taglib-clay$clayui/icon")),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var l=a?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(n,r,l):n[r]=e[r]}n.default=e,t&&t.set(e,n);return n}(n("liferay!frontend-js-react-web$react")),o=d(n("../../FrontendDataSetContext")),u=d(n("../../thunks/persistActiveView")),c=d(n("../../views/ViewsContext"));function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function d(e){return e&&e.__esModule?e:{default:e}}var s=function({views:e}){const[t,n]=(0,i.useState)(!1),[{activeView:f},d]=(0,i.useContext)(c.default),{appURL:s,id:y,portletId:p}=(0,i.useContext)(o.default);return i.default.createElement(r.default,{active:t,onActiveChange:n,trigger:i.default.createElement(a.ClayButtonWithIcon,{className:"nav-link nav-link-monospaced",displayType:"unstyled",symbol:f.thumbnail})},i.default.createElement(r.default.ItemList,null,e.map((({label:e,name:t,thumbnail:a})=>i.default.createElement(r.default.Item,{key:t,onClick:e=>{e.preventDefault(),n(!1),d((0,u.default)({activeViewName:t,appURL:s,id:y,portletId:p}))}},i.default.createElement(l.default,{className:"mr-3",symbol:a}),e)))))};t.default=s}}));
//# sourceMappingURL=ActiveViewSelector.js.map