"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index.cjs38.js"),u=require("react"),y=require("./index.cjs40.js"),B=require("./index.cjs35.js"),c=require("./index.cjs51.js"),L=require("./index.cjs52.js"),R=u.forwardRef(({title:o,publishedAt:n,formattedDate:d,description:f,viewsCount:P,readingTimeMinutes:p,author:q,imageUrl:l,view:m="card",imageAlt:A="",href:e,tags:b,className:E,contentClassName:N,showPlaceholder:g,testId:w,onClick:t,onKeyDown:r,...I},x)=>{const M=u.useMemo(()=>d??B.formatDateRu(n),[d,n]),S=u.useCallback(s=>{!e&&t&&(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),t(s)),r==null||r(s)},[e,t,r]),a=!!(e||t),$=y(c.default.root,c.default[`root--${m}`],a&&c.default["root--interactive"],E),v=i.jsxRuntimeExports.jsx(L.ArticlePreviewContent,{title:o,description:f,viewsCount:P,readingTimeMinutes:p,author:q,...l!=null?{imageUrl:l,imageAlt:A||o}:{},formattedDate:M,view:m,tags:b,href:e,showPlaceholder:g,className:N}),j={className:$,"data-atme-ui":!0,"data-testid":w,...a&&{"data-interactive":!0},...I};return e?i.jsxRuntimeExports.jsxs("div",{ref:x,...j,children:[i.jsxRuntimeExports.jsx("a",{href:e,className:c.default.cardLink,"aria-label":`Перейти к статье: ${o}`,onClick:t}),v]}):i.jsxRuntimeExports.jsx("div",{ref:x,...j,onClick:t,onKeyDown:a?S:r,role:a?"button":void 0,tabIndex:a?0:void 0,children:v})});R.displayName="ArticlePreview";exports.ArticlePreview=R;
//# sourceMappingURL=index.cjs30.js.map
