import{j as r,u as F,a9 as G,b as $,g as V}from"./main-ac2fa4b1.js";import{r as f}from"./chunk-react-162a731f.js";import{a as D,A as U}from"./chunk-index-89a69707.js";import{D as K}from"./chunk-lazy-c92ab4e0.js";import{A as W}from"./chunk-index-879f2fd4.js";import{H as w,a as Q,F as X,b as Y}from"./chunk-index-cb596e09.js";import{A as q}from"./chunk-index-c8097328.js";import{s as z}from"./chunk-self_marker-df8a181d.js";import{p as J}from"./chunk-map_market_peak-0cd3a38c.js";import{G as e,e as t}from"./chunk-material-ui-42c43899.js";import"./chunk-lodash-6114c6d4.js";import"./chunk-index-d610bbea.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-index-b15ac92f.js";import"./chunk-styled-bfd8e494.js";import"./chunk-createSvgIcon-288b305d.js";import"./chunk-index-280fea8d.js";import"./chunk-index-06e3c389.js";import"./chunk-index-dbde51c6.js";const Z=()=>{var i;const o=f.useContext(D),n=o==null?void 0:o.page,p=(i=o==null?void 0:o.seoBlock)==null?void 0:i.h1,[l,E]=f.useState("561");return n?Array.isArray(n)&&(n==null?void 0:n.map(c=>{var x;return(c==null?void 0:c.SELECTED)&&((x=c==null?void 0:c.ITEMS)==null?void 0:x.map(s=>{var j,d,g,T,A,P,R,I,S;const L=s==null?void 0:s.SELECTED,M=s==null?void 0:s.NAME,_=s.DETAIL_TEXT,b=(j=s==null?void 0:s.PROPERTIES)==null?void 0:j.ADDRESS,a=(g=(d=s==null?void 0:s.PROPERTIES)==null?void 0:d.REGION)==null?void 0:g.VALUE,k=(T=s==null?void 0:s.PROPERTIES)==null?void 0:T.WORK_TIME,y=(A=s==null?void 0:s.PROPERTIES)==null?void 0:A.PHONE,C=(P=s==null?void 0:s.PROPERTIES)==null?void 0:P.GALERY,H=(R=s==null?void 0:s.PROPERTIES)==null?void 0:R.MAP.split(","),m=s.CODE.includes("peak")?J:z,v=(S=(I=s==null?void 0:s.PROPERTIES)==null?void 0:I.METRO)==null?void 0:S.reduce((O,h)=>{if(h.VALUE)return`${h.VALUE}, ${O}`},""),B=p||M,N=(O,h)=>{E(h)};return L&&r.jsxs(e,{container:!0,xs:12,children:[r.jsx(e,{item:!0,children:r.jsx(t,{style:{marginBlockEnd:24},variant:"h1",children:B})}),r.jsx(e,{item:!0,xs:12,spacing:3,children:r.jsx(t,{dangerouslySetInnerHTML:{__html:_||""}})}),r.jsxs(e,{item:!0,container:!0,spacing:2,xs:12,children:[r.jsx(e,{item:!0,xs:12,spacing:3,children:r.jsx(t,{children:b})}),r.jsx(e,{item:!0,xs:12,spacing:3,children:a&&r.jsxs(t,{children:["Метро: ",v]})}),r.jsx(e,{item:!0,xs:12,spacing:3,children:a&&r.jsx(t,{children:a})}),r.jsx(e,{item:!0,xs:12,spacing:3,children:r.jsx(t,{children:k})}),r.jsx(e,{item:!0,xs:12,spacing:3,children:r.jsx(t,{children:y})})]}),r.jsx(e,{item:!0,xs:12,children:r.jsx(K,{carouselImg:C,shopMapCoordinate:H,shopMarkerIcon:m})}),r.jsx(e,{style:{marginTop:"16px"},item:!0,xs:12,children:r.jsx(W,{value:l,handleChange:N,showMap:!1,pageContent:n})})]})}))})):null},rr=({data:o,isFetching:n})=>{var E,i,c,u,x;const p=(E=o==null?void 0:o.data)==null?void 0:E.HEADER,l=p==null?void 0:p.SEO_BLOCK;return r.jsxs(r.Fragment,{children:[r.jsx(w,{content:p,children:r.jsx(Q,{isLoading:n})}),r.jsx(U,{meta_title:(c=(i=o==null?void 0:o.data)==null?void 0:i.MAIN)==null?void 0:c.meta_title,content:(x=(u=o==null?void 0:o.data)==null?void 0:u.MAIN)==null?void 0:x.content,seoBlock:l,children:r.jsx(q,{isLoading:n,children:r.jsx(Z,{})})}),r.jsx(X,{content:o==null?void 0:o.data.FOOTER,children:r.jsx(Y,{isLoading:n})})]})},_r=()=>{const n=F().pathname.replace(/\/$/,""),{data:p,isFetching:l}=G({url:`${$.about.getAbout}${n}/`,...V({SITE_ID:"lid",bitrix_sessid:"bitrix_sessid"})});return r.jsx(rr,{data:p,isFetching:l})};export{_r as FullPage,rr as Page,Z as ShopDetailPage};