Liferay.Loader.define("analytics-reports-web@2.0.38/js/components/BasicInformation",["module","exports","require","@frontend-taglib-clay$clayui/icon","@frontend-taglib-clay$clayui/layout","@frontend-taglib-clay$clayui/sticker","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../context/StoreContext","./Translation"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=d(a("@frontend-taglib-clay$clayui/icon")),l=d(a("@frontend-taglib-clay$clayui/layout")),r=d(a("@frontend-taglib-clay$clayui/sticker")),o=d(a("liferay!frontend-js-react-web$classnames")),c=(d(a("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 t=f();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("liferay!frontend-js-react-web$react"))),u=a("../context/StoreContext"),i=d(a("./Translation"));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}}function s({author:{authorId:e,name:t,url:a}}){return c.default.createElement("div",{className:"text-secondary"},c.default.createElement(r.default,{className:(0,o.default)("c-mr-2 sticker-user-icon",{["user-icon-color-".concat(parseInt(e,10)%10)]:!a}),shape:"circle",size:"sm"},a?c.default.createElement("img",{alt:"".concat(t,"."),className:"sticker-img",src:a}):c.default.createElement(n.default,{symbol:"user"})),Liferay.Util.sub(Liferay.Language.get("authored-by-x"),t))}var m=function({author:e,canonicalURL:t,onSelectedLanguageClick:a,publishDate:n,title:r,viewURLs:o}){const{languageTag:f}=(0,c.useContext)(u.StoreStateContext),d=Intl.DateTimeFormat(f,{day:"numeric",month:"long",year:"numeric"}).format(new Date(n));return c.default.createElement("div",{className:"sidebar-section"},c.default.createElement(l.default.ContentRow,{className:"mb-2",verticalAlign:"center"},c.default.createElement(l.default.ContentCol,null,c.default.createElement("div",{className:"inline-item-before"},c.default.createElement(l.default.ContentRow,null,c.default.createElement(l.default.ContentCol,null,c.default.createElement(i.default,{onSelectedLanguageClick:a,viewURLs:o}))))),c.default.createElement(l.default.ContentCol,{expand:!0},c.default.createElement(l.default.ContentRow,null,c.default.createElement("span",{className:"font-weight-semi-bold text-truncate-inline"},c.default.createElement("span",{className:"text-truncate","data-tooltip-align":"bottom",title:r},r))),c.default.createElement(l.default.ContentRow,null,c.default.createElement("span",{className:"text-truncate text-truncate-reverse","data-tooltip-align":"bottom",title:t},c.default.createElement("bdi",{className:"text-secondary"},t))))),c.default.createElement(l.default.ContentRow,{className:"mb-2"},c.default.createElement(l.default.ContentCol,{expand:!0},c.default.createElement("span",{className:"text-secondary"},Liferay.Util.sub(Liferay.Language.get("published-on-x"),d)))),e&&c.default.createElement(l.default.ContentRow,null,c.default.createElement(l.default.ContentCol,{expand:!0},c.default.createElement(s,{author:e}))))};t.default=m}}));
//# sourceMappingURL=BasicInformation.js.map