import{j as e,a3 as g}from"./main-5057ff34.js";import{r as h}from"./chunk-react-162a731f.js";import{c as u}from"./chunk-index-89b7ba38.js";import{m as d,e as c,G as s,f as p,B as m}from"./chunk-material-ui-eb5bb5f8.js";const y=d(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=d(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(m,{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(m,{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};