import{j as s,L as _,at as p}from"./index-DCzV2WLr.js";import{f as x,d as g}from"./selectors-CcL8BHpj.js";import{S as j}from"./SEO-CeR71RFs.js";import{s as h}from"./Toast-Q0uadnQg.js";import{s as N}from"./share_icon-DjRp4IpP.js";import{t as k}from"./timer_icon-BN-Yr58j.js";import{S as a}from"./Skeleton-CNHOJHEt.js";import{s as w}from"./blogPage.module-BGz_ymqn.js";import"./info_icon-D8fJPANx.js";const v="_card_15k1o_1",f="_imageWrapper_15k1o_21",y="_image_15k1o_21",$="_cardSmall_15k1o_35",b="_cardLarge_15k1o_39",u="_content_15k1o_43",S="_meta_15k1o_52",L="_mainMeta_15k1o_61",T="_dot_15k1o_68",W="_timeWrapper_15k1o_73",A="_clockIcon_15k1o_79",C="_cardContent_15k1o_85",M="_title_15k1o_92",B="_description_15k1o_97",I="_footer_15k1o_102",O="_tags_15k1o_109",z="_tag_15k1o_109",E="_shareBtn_15k1o_119",e={card:v,imageWrapper:f,image:y,cardSmall:$,cardLarge:b,content:u,meta:S,mainMeta:L,dot:T,timeWrapper:W,clockIcon:A,cardContent:C,title:M,description:B,footer:I,tags:O,tag:z,shareBtn:E},F=({article:t,className:r})=>{const n=t.size==="large",i=async c=>{c.preventDefault(),c.stopPropagation();const m=`${window.location.origin}/blog/${t.id}`;if(window.matchMedia("(max-width: 768px)").matches&&navigator.share)try{await navigator.share({title:t.title,text:t.description,url:m})}catch(d){d.name!=="AbortError"&&console.log(d)}else try{await navigator.clipboard.writeText(m),h({children:"Ссылка скопирована в буфер обмена"})}catch{h({children:"Не удалось скопировать ссылку"})}};return s.jsxs(_,{to:`/blog/${t.id}`,className:`${e.card} ${n?e.cardLarge:e.cardSmall} ${r||""}`,children:[s.jsx("div",{className:e.imageWrapper,children:s.jsx("img",{src:t.coverUrl,alt:t.title,className:e.image,loading:"lazy"})}),s.jsxs("div",{className:e.content,children:[s.jsxs("div",{className:`body-3 ${e.meta}`,children:[s.jsxs("div",{className:e.mainMeta,children:[s.jsx("span",{className:e.category,children:"Карьера и работа"}),s.jsx("span",{className:e.dot,children:"•"}),s.jsx("span",{className:e.date,children:"06.01"})]}),s.jsxs("span",{className:e.timeWrapper,children:[s.jsx("img",{src:k,alt:"",className:e.clockIcon}),t.readTime]})]}),s.jsxs("div",{className:e.cardContent,children:[s.jsx("h3",{className:`h2 ${e.title}`,children:t.title}),s.jsx("p",{className:`body-3 ${e.description}`,children:t.description})]}),s.jsxs("div",{className:e.footer,children:[s.jsx("div",{className:e.tags,children:t.tags.map(c=>s.jsx("span",{className:`body-3 ${e.tag}`,children:c},c))}),s.jsx("button",{className:e.shareBtn,onClick:i,"aria-label":"Поделиться статьей",children:s.jsx("img",{src:N,alt:"Share"})})]})]})]})},R=({className:t})=>s.jsxs("div",{className:`${e.card} ${t||""}`,children:[s.jsx("div",{className:e.imageWrapper,children:s.jsx(a,{height:"198px",width:"100%",animated:!0})}),s.jsxs("div",{className:e.content,children:[s.jsxs("div",{className:e.meta,children:[s.jsx("div",{className:e.mainMeta,children:s.jsx(a,{width:"120px",height:"18px"})}),s.jsx(a,{width:"40px",height:"18px"})]}),s.jsxs("div",{className:e.cardContent,children:[s.jsx(a,{width:"90%",height:"28px"}),s.jsx(a,{lines:2,width:"100%",height:"16px",lineGap:"8px"})]}),s.jsxs("div",{className:e.footer,children:[s.jsxs("div",{className:e.tags,children:[s.jsx(a,{width:"70px",height:"24px",style:{borderRadius:"32px"}}),s.jsx(a,{width:"50px",height:"24px",style:{borderRadius:"32px"}})]}),s.jsx(a,{variant:"circle",width:"24px",className:e.shareBtn})]})]})]}),D="_grid_1o8yk_1",G="_spanOne_1o8yk_9",P="_spanTwo_1o8yk_13",o={grid:D,spanOne:G,spanTwo:P},U=({articles:t,isLoading:r})=>r?s.jsx("div",{className:o.grid,children:Array.from({length:6}).map((n,i)=>s.jsx(R,{className:i===2?o.spanTwo:o.spanOne},i))}):s.jsx("div",{className:o.grid,children:t.map(n=>s.jsx(F,{article:n,className:n.size==="large"?o.spanTwo:o.spanOne},n.id))}),q="_wrapper_1jgfl_1",H="_content_1jgfl_16",J="_title_1jgfl_24",K="_text_1jgfl_29",l={wrapper:q,content:H,title:J,text:K},Q=()=>s.jsx("div",{className:l.wrapper,children:s.jsxs("div",{className:l.content,children:[s.jsx("h1",{className:`${l.title} h2`,children:"В этом разделе пока пусто"}),s.jsx("p",{className:`${l.text} body-1`,children:"Мы готовим новые материалы на эту важную тему. Пока можете изучить другие разделы нашего блога — там точно найдётся что-то полезное."})]})}),os=()=>{const t=p(x),r=p(g);return s.jsxs(s.Fragment,{children:[s.jsx(j,{title:"Блог",description:"Блог о карьере, работе и развитии"}),t.length===0&&!r?s.jsx(Q,{}):s.jsx(U,{articles:t,isLoading:r}),s.jsx("p",{className:`body-3 ${w.layoutText}`,children:"В этом блоге вы найдете статьи про карьеру и не только"})]})};export{os as BlogFeed};