Liferay.Loader.define("@liferay/content-dashboard-web@2.0.73/js/components/SidebarPanelInfoView/SidebarPanelInfoView",["module","exports","require","@frontend-taglib-clay$clayui/alert","@frontend-taglib-clay$clayui/icon","@frontend-taglib-clay$clayui/label","@frontend-taglib-clay$clayui/layout","@frontend-taglib-clay$clayui/sticker","@frontend-taglib-clay$clayui/tabs","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../Sidebar","./DetailsContent","./ManageCollaborators","./Subscribe","./VersionsContent","./utils/formatDate"],(function(e,a,t){window;{Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=v(t("@frontend-taglib-clay$clayui/alert")),r=v(t("@frontend-taglib-clay$clayui/icon")),n=v(t("@frontend-taglib-clay$clayui/label")),i=v(t("@frontend-taglib-clay$clayui/layout")),c=v(t("@frontend-taglib-clay$clayui/sticker")),s=v(t("@frontend-taglib-clay$clayui/tabs")),o=v(t("liferay!frontend-js-react-web$classnames")),d=(v(t("liferay!frontend-js-react-web$prop-types")),function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=p();if(a&&a.has(e))return a.get(e);var t={},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(t,r,n):t[r]=e[r]}t.default=e,a&&a.set(e,t);return t}(t("liferay!frontend-js-react-web$react"))),u=v(t("../Sidebar")),f=v(t("./DetailsContent")),y=v(t("./ManageCollaborators")),b=v(t("./Subscribe")),m=v(t("./VersionsContent")),g=v(t("./utils/formatDate"));function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function v(e){return e&&e.__esModule?e:{default:e}}const e=({allVersions:e=[],classPK:a,createDate:t,description:p,downloadURL:v,languageTag:E="en",latestVersions:w=[],modifiedDate:L,specificFields:$={},subscribe:h,subType:P,tags:S=[],title:j,type:C,preview:D,fetchSharingButtonURL:T,fetchSharingCollaboratorsURL:k,user:N,viewURLs:O=[],vocabularies:R={}})=>{const[U,I]=(0,d.useState)(0),M=!(!e||!e.length),[V,_]=(0,d.useState)(!1),x=parseInt(N.userId,10)%10,F=(0,d.useCallback)((()=>{_(!0)}),[]);return d.default.createElement(d.default.Fragment,null,d.default.createElement(u.default.Header,{actionsSlot:h&&d.default.createElement(b.default,h),title:j},d.default.createElement(i.default.ContentRow,null,d.default.createElement("div",null,V&&d.default.createElement(l.default,{className:"mb-3",displayType:"warning",onClose:()=>{_(!1)},variant:"stripe"},Liferay.Language.get("there-was-a-problem-retrieving-data-please-try-reloading-the-page")),d.default.createElement("div",{className:"sidebar-section sidebar-section--compress"},d.default.createElement("p",{className:"c-mb-1 text-secondary","data-qa-id":"assetTypeInfo"},P?"".concat(C," - ").concat(P):"".concat(C)),w.map((e=>d.default.createElement("div",{className:"c-mt-2",key:e.version},d.default.createElement(n.default,{displayType:"info"},Liferay.Language.get("version")+" ",e.version),d.default.createElement(n.default,{displayType:e.statusStyle},e.statusLabel))))),d.default.createElement("div",{className:"sidebar-section"},k?d.default.createElement(y.default,{fetchSharingCollaboratorsURL:k,onError:F}):d.default.createElement(d.default.Fragment,null,d.default.createElement(c.default,{className:(0,o.default)("sticker-user-icon",{["user-icon-color-".concat(x)]:!N.url}),shape:"circle"},N.url?d.default.createElement("img",{alt:"".concat(N.name,"."),className:"sticker-img",src:N.url}):d.default.createElement(r.default,{symbol:"user"})),d.default.createElement("span",{className:"c-ml-2 text-secondary"},N.name))),d.default.createElement("div",{className:"mb-0 sidebar-section"},M&&d.default.createElement(s.default,{modern:!0},d.default.createElement(s.default.Item,{active:0===U,innerProps:{"aria-controls":"details"},onClick:()=>I(0)},Liferay.Language.get("details")),d.default.createElement(s.default.Item,{active:1===U,innerProps:{"aria-controls":"versions"},onClick:()=>I(1)},Liferay.Language.get("versions"))))))),d.default.createElement(u.default.Body,null,d.default.createElement("div",null,d.default.createElement(s.default.Content,{activeIndex:U,fade:!0},d.default.createElement(s.default.TabPane,{"aria-labelledby":"tab-1"},d.default.createElement(f.default,{classPK:a,createDate:t,description:p,downloadURL:v,fetchSharingButtonURL:T,formatDate:g.default,languageTag:E,modifiedDate:L,preview:D,specificFields:$,tags:S,title:j,viewURLs:O,vocabularies:R})),d.default.createElement(s.default.TabPane,{"aria-labelledby":"tab-2"},d.default.createElement(m.default,{allVersions:e,formatDate:g.default,languageTag:E}))))))};e.defaultProps={description:"",languageTag:"en-US",propTypes:[],vocabularies:{}};var E=e;a.default=E}}));
//# sourceMappingURL=SidebarPanelInfoView.js.map