import{j as e,a4 as g}from"./main-7700519c.js";import{r as h}from"./chunk-react-caacd912.js";import{c as u}from"./chunk-index-cacabe40.js";import{m,d as c,G as s,e as p,B as d}from"./chunk-material-ui-241eb317.js";const y=m(t=>({titleTags:{marginInlineStart:10,marginBlockEnd:12,fontSize:"1.2rem"},mainBtn:{paddingBlockStart:9,"@media (max-width: 768px)":{height:"auto",overflowY:"auto",flexWrap:"nowrap",display:"flex",paddingBlockEnd:12}},querySeoBtn:{margin:"6px",backgroundColor:"#FFFFFF","@media (max-width: 768px)":{whiteSpace:"nowrap",minWidth:"auto"}},tagsSeoBtn:{margin:"6px",backgroundColor:"#F0F3F6"},querySeoLink:{"& a:-webkit-any-link":{textDecoration:"none",color:"#3A474E",fontSize:t.typography.pxToRem(14),paddingInline:10}}}),{name:"PopularTagsQuerySeo"}),S=({popularQuerySeoArray:t,tagsTitle:o})=>{const r=y();return e.jsxs(e.Fragment,{children:[o&&e.jsx(c,{classes:{root:r.titleTags},children:o}),Array.isArray(t)&&e.jsx(s,{item:!0,xs:12,classes:{root:u(!o&&r.mainBtn)},children:t.map(i=>e.jsx(p,{classes:{root:o?r.tagsSeoBtn:r.querySeoBtn},children:e.jsx(c,{variant:"body1",dangerouslySetInnerHTML:{__html:i},classes:{root:r.querySeoLink}})}))})]})},f=m(t=>({textContainer:{position:"relative",marginBottom:24},textInfo:{fontSize:t.typography.pxToRem(14),lineHeight:t.typography.pxToRem(24),"& a:-webkit-any-link":{textDecoration:"none",color:"#007aff"},"& a:-webkit-any-link:hover":{color:"#3A474E"},"& h1":{lineHeight:"2rem",marginBlockStart:0}},containerShadow:{position:"absolute",left:0,top:0,width:"100%",height:"100%",background:"linear-gradient(180deg, rgba(255, 255, 255, 0.0001) 0%, #FFFFFF 100%)"},showMoreBtn:{color:"#00b0df",padding:0,fontSize:t.typography.pxToRem(14),textTransform:"none","&:hover":{backgroundColor:"unset"}}}),{name:"DataSeoBottomPage"}),T=({seoBlock:t})=>{const o=f(),r=t==null?void 0:t.seo_pop_query_bot,i=g(r),a=t==null?void 0:t.seo_bottom_text,l=(a==null?void 0:a.length)>350,[n,x]=h.useState(!1);return e.jsxs(s,{item:!0,container:!0,spacing:8,direction:"row",justifyContent:"flex-start",alignItems:"flex-end",children:[a&&e.jsx(s,{item:!0,xs:6,style:{paddingBlock:l?24:0},children:e.jsxs(s,{container:!0,item:!0,direction:"column",alignItems:"flex-start",children:[e.jsxs(d,{className:o.textContainer,style:{height:!n&&l?200:"auto",overflow:n?"auto":"hidden"},children:[e.jsx(c,{variant:"body1",classes:{root:o.textInfo},dangerouslySetInnerHTML:{__html:a}}),n?"":e.jsx(d,{className:o.containerShadow,style:{height:!n&&l?"100%":0}})]}),l&&e.jsx(p,{classes:{root:o.showMoreBtn},color:"secondary",onClick:()=>x(!n),children:n?"Скрыть полное описание":"Открыть полное описание"})]})}),Array.isArray(i)&&e.jsx(s,{item:!0,xs:a?6:12,children:e.jsx(S,{popularQuerySeoArray:i,tagsTitle:"Популярные теги"})})]})};export{T as D,S as P};