Liferay.Loader.define("@liferay/object-web@1.0.108/js/components/Panel/Panel",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/icon","@frontend-taglib-clay$clayui/tooltip","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$react","./objectPanelContext","./Panel.scss"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a("@frontend-taglib-clay$clayui/button"),l=s(a("@frontend-taglib-clay$clayui/icon")),r=a("@frontend-taglib-clay$clayui/tooltip"),c=s(a("liferay!frontend-js-react-web$classnames")),o=s(a("liferay!frontend-js-react-web$react")),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();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]}a.default=e,t&&t.set(e,a);return a}(a("./objectPanelContext"));function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function s(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}function f(e,t){if(null==e)return{};var a,n,l=function(e,t){if(null==e)return{};var a,n,l={},r=Object.keys(e);for(n=0;n<r.length;n++)a=r[n],t.indexOf(a)>=0||(l[a]=e[a]);return l}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n<r.length;n++)a=r[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}a("./Panel.scss");const e=e=>{let{children:t,className:a}=e,n=f(e,["children","className"]);return o.default.createElement(i.default,null,o.default.createElement("div",u({},n,{className:(0,c.default)(a,"object-admin-panel")}),t))},p=({children:e,className:t})=>{const[{expanded:a}]=(0,i.usePanelContext)();return o.default.createElement(o.default.Fragment,null,a&&o.default.createElement("div",{className:(0,c.default)(t,"object-admin-panel__body")},e))},y=({contentLeft:e,contentRight:t,disabled:a=!1,title:d,type:s})=>{const[{expanded:u},f]=(0,i.usePanelContext)();return o.default.createElement("div",{className:(0,c.default)("object-admin-panel__header",{"object-admin-panel__header--expanded":u&&"regular"===s})},o.default.createElement("div",{className:(0,c.default)("object-admin-panel__header__content-left",{"object-admin-panel__header__content-left--disabled":a})},"regular"===s&&o.default.createElement(n.ClayButtonWithIcon,{displayType:"unstyled",symbol:"drag"}),o.default.createElement("h3",{className:(0,c.default)("object-admin-panel__title",{"ml-3":"regular"!==s})},d),("categorization"===s||"comments"===s)&&o.default.createElement(r.ClayTooltipProvider,null,o.default.createElement("span",{className:"ml-2",title:"categorization"===s?Liferay.Language.get("visibility-and-permissions-can-affect-how-the-categorization-block-will-be-displayed"):Liferay.Language.get("visibility-and-permissions-can-affect-how-the-comments-block-is-displayed")},o.default.createElement(l.default,{className:"object-admin-panel__tooltip-icon",symbol:"info-panel-open"}))),e&&o.default.createElement("span",{className:"align-items-center d-flex ml-2"},e)),o.default.createElement("div",{className:"object-admin-panel__header__content-right"},t&&o.default.createElement("span",{className:"align-items-center d-flex ml-2"},t),"regular"===s&&o.default.createElement(n.ClayButtonWithIcon,{displayType:"unstyled",onClick:()=>f({payload:{expanded:!u},type:i.TYPES.CHANGE_PANEL_EXPANDED}),symbol:u?"angle-down":"angle-right"})))},b=({children:e,contentRight:t,title:a})=>o.default.createElement("div",{className:"object-admin-panel__simple-body"},o.default.createElement("div",{className:"object-admin-panel__simple-body__content-left"},o.default.createElement(n.ClayButtonWithIcon,{displayType:"unstyled",symbol:"drag"}),o.default.createElement("div",null,o.default.createElement("h5",{className:"object-admin-panel__title"},a),o.default.createElement("div",null,e))),o.default.createElement("div",{className:"object-admin-panel__simple-body__content-right"},t));e.Body=p,e.Header=y,e.SimpleBody=b;var m=e;t.default=m}}));
//# sourceMappingURL=Panel.js.map