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