Liferay.Loader.define("data-engine-js-components-web@1.0.55/js/custom/form-report/components/sidebar/Sidebar",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/icon","@frontend-taglib-clay$clayui/layout","@frontend-taglib-clay$clayui/loading-indicator","liferay!frontend-js-react-web$react","../../hooks/useRequest","../list/List","../summary/Summary","./SidebarContext","./Sidebar.scss"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const{field:t,isOpen:a,portletNamespace:l}=(0,i.useContext)(u.SidebarContext);return i.default.createElement(i.default.Fragment,null,a&&i.default.createElement("div",{className:"lfr-de__form-report-sidebar-backdrop"}),i.default.createElement("div",{className:"sidebar-container lfr-de__form-report-sidebar"+(a?" open":""),id:"".concat(l,"sidebar-reports")},i.default.createElement("div",{className:"sidebar sidebar-light"},t&&i.default.createElement(e,null))))};var l=m(a("@frontend-taglib-clay$clayui/button")),r=m(a("@frontend-taglib-clay$clayui/icon")),n=m(a("@frontend-taglib-clay$clayui/layout")),c=m(a("@frontend-taglib-clay$clayui/loading-indicator")),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 a={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=l?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(a,r,n):a[r]=e[r]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react")),o=m(a("../../hooks/useRequest")),d=m(a("../list/List")),s=m(a("../summary/Summary")),u=a("./SidebarContext");function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function m(e){return e&&e.__esModule?e:{default:e}}a("./Sidebar.scss");const e=()=>{const{field:e,formReportRecordsFieldValuesURL:t,portletNamespace:a,summary:f={},toggleSidebar:m,totalEntries:b,type:y}=(0,i.useContext)(u.SidebarContext),{origin:p}=new URL(t),g=t.replace(p,""),E="".concat(g,"&").concat(a,"fieldName=").concat(e.name),{isLoading:N,response:v=[]}=(0,o.default)(E),{icon:j,label:w}=e;return i.default.createElement(i.default.Fragment,null,i.default.createElement("nav",{className:"component-tbar tbar"},i.default.createElement(n.default.ContainerFluid,null,i.default.createElement("ul",{className:"tbar-nav"},i.default.createElement("li",{className:"tbar-item"},i.default.createElement("div",{className:"icon"},i.default.createElement(r.default,{symbol:j}))),i.default.createElement("li",{className:"tbar-item tbar-item-expand"},i.default.createElement("div",{className:"tbar-section"},i.default.createElement("div",{className:"field-info"},i.default.createElement("p",{className:"title"},w),i.default.createElement("p",{className:"description"},b+" ",Liferay.Language.get("entries").toLowerCase())))),i.default.createElement("li",{className:"tbar-item"},i.default.createElement(l.default,{className:"close-sidebar",displayType:"secondary",monospaced:!0,onClick:()=>m()},i.default.createElement(r.default,{className:"close-button",symbol:"times-small"})))))),i.default.createElement("div",{className:"sidebar-body"},N&&i.default.createElement("div",{className:"align-items-center d-flex loading-wrapper"},i.default.createElement(c.default,null)),!!Object.entries(f).length&&i.default.createElement(s.default,{summary:f}),i.default.createElement(d.default,{data:v,type:y})))}}}));
//# sourceMappingURL=Sidebar.js.map