import{a6 as r,j as t,a7 as u,a8 as E,u as h,a9 as j,b,g as N}from"./main-ac2fa4b1.js";import{H as B,a as L,F as f,b as H}from"./chunk-index-cb596e09.js";import{r as k}from"./chunk-react-162a731f.js";import{T as A}from"./chunk-index-b15ac92f.js";import{B as I,a as R}from"./chunk-index-06e3c389.js";import{T}from"./chunk-index-cf85705f.js";import{H as M}from"./chunk-index-24b40e0c.js";import{H as S,a as _}from"./chunk-index-5ebf2bdd.js";import{D as C}from"./chunk-index-dbde51c6.js";import{m as D,B as K,C as x,G as c,o as w,H as g}from"./chunk-material-ui-42c43899.js";import"./chunk-lodash-6114c6d4.js";import"./chunk-index-a4bfef69.js";import"./chunk-index-89b7ba38.js";import"./chunk-index-2ed2285e.js";import"./chunk-index-c479aaf2.js";import"./chunk-index-60bb7016.js";import"./chunk-index-815ed3d5.js";import"./chunk-index-52e322f4.js";import"./chunk-index-9d37c6bf.js";import"./chunk-index-965fe2b4.js";import"./chunk-styled-bfd8e494.js";import"./chunk-createSvgIcon-288b305d.js";import"./chunk-index-280fea8d.js";const F=D(a=>({breadcrumbs:{"& > *:last-child":{marginBottom:24,padding:20,"@media (max-width: 1024px)":{marginBottom:0,padding:"0 0 18px 0"}}},breadcrumbsLoading:{marginBottom:24,paddingRight:20,"@media (max-width: 1024px)":{marginBottom:18,paddingRight:0}},HelpPageWrapper:{backgroundColor:"#fff",paddingTop:56,paddingBottom:40,borderTop:"1px solid #E0E3E6","@media (max-width: 1024px)":{paddingTop:24}},menuLink:{color:a.color.black100,backgroundColor:"unset",textAlign:"left",display:"block",paddingTop:"8px",paddingBottom:"8px",fontSize:"16px"},menuLinkActive:{color:a.color.blue,backgroundColor:"unset"},sectionHeaderText:{marginBottom:36,"@media (max-width: 1024px)":{fontSize:24}},sectionBox:{borderRadius:"16px",border:"1px solid #E0E3E6",padding:12,marginBottom:32},skeleton:{backgroundColor:"#E0E3E6"},contentContainer:{"@media (max-width: 1024px)":{paddingRight:0,paddingLeft:0}},seoBlockStyle:{paddingBlockStart:56}}),{name:"HelpPage"}),y=a=>{const e=k.useContext(S),s=F(),o=e==null?void 0:e.breadcrumb,{routes:m=[]}=a,i=a.isLoading,l=e==null?void 0:e.seoBlock,n=[{LINK:r.CHOOSE_HELP,NAME:"Помощь в подборе"},{LINK:r.DELIVERY,NAME:"Доставка"},{LINK:r.PAYMENT,NAME:"Оплата заказа"},{LINK:r.RETURN,NAME:"Возврат и гарантия"},{LINK:r.FEEDBACK,NAME:"Обратная связь"},{LINK:r.SIZE_TABLE,NAME:"Таблица размеров"},{LINK:r.REPAIR,NAME:"Ремонт"},{LINK:r.TRADE_IN,NAME:"Trade-In"}];return e!=null&&e.meta_title&&(document.title=e==null?void 0:e.meta_title),t.jsxs(K,{className:s.HelpPageWrapper,children:[t.jsxs(x,{fixed:!0,maxWidth:"lg",classes:{root:s.breadcrumbs},children:[i&&t.jsx(c,{item:!0,xs:12,className:s.breadcrumbsLoading,children:t.jsx(w,{className:s.skeleton,width:"100%",height:40,variant:"rect"})}),!i&&t.jsx(I,{items:o,children:t.jsx(R,{})})]}),t.jsx(x,{fixed:!0,maxWidth:"lg",children:t.jsxs(c,{container:!0,justifyContent:"space-between",spacing:3,children:[t.jsxs(c,{item:!0,lg:3,xs:12,children:[t.jsxs(g,{mdDown:!0,children:[i&&t.jsx(T,{}),!i&&n&&t.jsx(M,{menuLinks:n})]}),t.jsx(g,{lgUp:!0,children:n&&t.jsx(A,{menuLinks:n})})]}),t.jsx(c,{item:!0,lg:9,xs:12,children:t.jsx(x,{fixed:!0,maxWidth:"lg",className:s.contentContainer,children:t.jsx(u,{children:m.map((d,p)=>t.jsx(E,{exact:d.exact,path:d.path,element:t.jsx(d.component,{isLoading:i})},p))})})}),l&&t.jsx(c,{className:s.seoBlockStyle,children:t.jsx(C,{seoBlock:l})})]})})]})},dt=a=>{var n,d,p;let e=h();const s=e.pathname.slice(-1)==="/"?e.pathname.slice(0,-1):e.pathname,{data:o,isFetching:m}=j({url:`${b.help.getHelp}${s}/`,...N({SITE_ID:"lid",bitrix_sessid:"bitrix_sessid"})}),i=(n=o==null?void 0:o.data)==null?void 0:n.HEADER,l=i==null?void 0:i.SEO_BLOCK;return t.jsxs(t.Fragment,{children:[t.jsx(B,{content:i,children:t.jsx(L,{isLoading:m})}),t.jsx(_,{meta_title:(p=(d=o==null?void 0:o.data)==null?void 0:d.MAIN)==null?void 0:p.meta_title,content:o==null?void 0:o.data.MAIN.content,seoBlock:l,children:t.jsx(y,{isLoading:m,...a})}),t.jsx(f,{content:o==null?void 0:o.data.FOOTER,children:t.jsx(H,{isLoading:m})})]})};export{dt as Help};