import{j as t,e as X,k as we,an as rt,W as lt,ao as ct,V as dt,a1 as ut,S as xt,b as be,g as fe,c as J}from"./main-7700519c.js";import{r as g,R as ht}from"./chunk-react-caacd912.js";import{c as O}from"./chunk-index-cacabe40.js";import{S as Se}from"./chunk-index-b119c954.js";import{m as v,aa as mt,ad as pt,q as te,ak as gt,G as d,$ as bt,a0 as ft,B as A,ab as _e,g as jt,al as kt,am as yt,n as I,d as W,e as E,p as ee,an as Re,ao as Ct,I as Fe,a6 as Ie,s as vt,D as wt,ap as St,u as _t,af as Rt,aq as Te,ar as Ft,as as It,at as Tt,au as Be,av as Bt,aw as Pt,ax as At,H as je,ay as zt,k as Et,E as Wt,J as $t,az as Lt}from"./chunk-material-ui-241eb317.js";import{r as Mt,i as Ot}from"./chunk-createSvgIcon-f41b980c.js";import{T as Xt}from"./chunk-index-8c6f9339.js";import{D as Pe}from"./chunk-index-8609782e.js";import{P as Ht,a as Nt,b as Ut}from"./chunk-index-79cf7d9a.js";import{_ as Gt}from"./chunk-index-e1b40fd5.js";import{S as qt,N as Qt}from"./chunk-effect-fade-17bfa8f3.js";import{B as Zt}from"./chunk-index-81727111.js";import{s as Dt,T as Kt}from"./chunk-pagination-55bdba61.js";const Vt=g.createContext(void 0),Jt=({items:e,children:s})=>{const[n,o]=g.useState(e);return g.useEffect(()=>{e&&o(e)},[e]),t.jsx(Vt.Provider,{value:n,children:s})},Yt=v(e=>({selectRoot:{lineHeight:e.typography.pxToRem(24)},inputRoot:{color:e.color.black100},inputInput:{paddingTop:0,paddingBottom:0},icon:{fontSize:e.typography.pxToRem(22),color:e.color.black100},selectMenu:{border:"0.5px solid #F0F3F6",boxShadow:"0px 16px 24px rgba(0, 0, 0, 0.06), 0px 2px 6px rgba(0, 0, 0, 0.04), 0px 0px 1px rgba(0, 0, 0, 0.04)",borderRadius:4}}),{name:"Select"});function es(e){const s=Yt();return t.jsx(mt,{...e,classes:{icon:s.icon,root:s.selectRoot},input:e.variant==="standard"?t.jsx(pt,{classes:{root:s.inputRoot,input:s.inputInput}}):t.jsx(te,{}),MenuProps:{PopoverClasses:{paper:O([e.variant==="standard"&&s.selectMenu])},classes:{}},IconComponent:gt,children:e.children})}const Ae=v(e=>({tabPanelRoot:{height:200,minWidth:395,"@media (max-width: 1280px)":{minWidth:"100%"},"@media (max-width: 960px)":{height:"100%"},"@media (min-width: 375px) and (max-width: 768px)":{height:"94%"},"@media (max-width: 375px)":{height:"92%"}},tabSizesWrapper:{position:"relative","@media (max-width: 960px)":{height:"100%",paddingBlock:20,paddingInlineStart:20},"@media (min-width: 375px) and (max-width: 768px)":{height:"96%"},"@media (max-width: 375px)":{height:"92%"}},tabsRoot:{minHeight:24,paddingBottom:16,"margin-inline-end":16},tabBtn:{color:e.color.black100,maxWidth:"unset",minWidth:40,padding:0,minHeight:24,lineHeight:"14px",textTransform:"unset","&:not(:last-child)":{paddingRight:16}},sizeBtn:{minWidth:71,minHeight:32,color:e.color.black100,borderRadius:10,"@media (max-width: 1280px)":{minWidth:65}},sizeBtnOutlined:{borderColor:e.color.black40,"&:hover":{borderColor:e.color.black100}},sizeBtnChecked:{borderColor:e.color.black100},sizeBtnDisabled:{opacity:.5},selectMenuItem:{backgroundColor:"#F0F3F6"},selectBtn:{textTransform:"uppercase",padding:0,minWidth:"max-content",lineHeight:"24px"},filterSizeContainer:{padding:2},scrollVerticalTrack:{borderRadius:100,backgroundColor:"#8F9BA4"},tabPanel:{display:"flex","flex-wrap":"wrap","justify-content":"space-between"}}),{name:"FilterSizes"}),ts=({children:e,value:s,index:n})=>{const o=Ae();return s!==n?null:t.jsx(A,{className:o.tabPanelRoot,children:e})},ss=({values:e,onChange:s})=>{const n=Ae(),[o,r]=g.useState(0),[a,l]=g.useState(""),i=c=>{c.target.value&&l(c.target.value)};g.useEffect(()=>{var c,p,h;Array.isArray(e)&&e.length&&Array.isArray((c=e[0])==null?void 0:c.sections)&&(p=e[0])!=null&&p.sections.length&&l((h=e[0])==null?void 0:h.sections[0].title)},[]);const x=c=>{const p=e[o],h={...p,sections:p.sections.map(u=>u.code===c.code?{...c}:{...u})};s(o,h)};return t.jsx(d,{container:!0,classes:{root:n.tabSizesWrapper},children:t.jsxs(d,{item:!0,xs:12,children:[t.jsxs("div",{className:n.tabPanel,children:[t.jsx(bt,{value:o,onChange:(c,p)=>r(p),TabIndicatorProps:{style:{display:"none"}},classes:{root:n.tabsRoot},"aria-label":"sizes-tabs",children:e&&Object.values(e).map((c,p)=>t.jsx(ft,{classes:{root:n.tabBtn},onClick:()=>{l(Object.values(e)[p].sections[0].title)},label:c.tab_title},c.tab_title))}),Object.values(e)[o].sections.length>1&&t.jsx(A,{children:t.jsx(es,{labelId:`select-${a}`,id:`select-${a}`,value:a,variant:"standard",onChange:i,children:Object.values(e)[o].sections.map((c,p)=>t.jsx(_e,{value:c.title,children:c.title},p))})})]}),Object.values(e)[o].sections.filter(c=>c.title===a).map((c,p)=>{const h=(u,f)=>{const _={...c,items:c.items.map((w,P)=>P===u?{...f}:{...w})};x(_)};return t.jsx(ts,{value:p,index:p,children:t.jsx(Se,{customStyles:{thumbVertical:n.scrollVerticalTrack},children:t.jsx(d,{container:!0,item:!0,style:{paddingRight:10},children:c.items.map((u,f)=>t.jsx(d,{item:!0,xs:"auto",classes:{root:n.filterSizeContainer},children:t.jsx(jt,{classes:{root:O(n.sizeBtn,{[n.sizeBtnDisabled]:u.is_disabled}),outlined:O(n.sizeBtnOutlined,{[n.sizeBtnChecked]:u.is_checked})},clickable:!u.is_disabled,onClick:()=>{u.is_disabled||h(f,{...u,is_checked:!u.is_checked})},label:u.title,variant:"outlined"})},u.value))})})},p)})]})})};var se={},ns=Ot;Object.defineProperty(se,"__esModule",{value:!0});var ze=se.default=void 0,os=ns(Mt()),is=t,as=(0,os.default)((0,is.jsx)("path",{d:"M13.5 3H7v9H5v2h2v2H5v2h2v3h2v-3h4v-2H9v-2h4.5c3.04 0 5.5-2.46 5.5-5.5S16.54 3 13.5 3zm0 9H9V5h4.5C15.43 5 17 6.57 17 8.5S15.43 12 13.5 12z"}),"CurrencyRuble");ze=se.default=as;const rs=v(e=>({formRoot:{"& > *":{margin:e.spacing(1)}},inputRoot:{fontFamily:"TTFirsNeue-Light, sans-serif",width:156,height:40,border:"1px solid #E0E3E6",color:e.color.black100,borderRadius:"8px","&:first-child":{marginRight:"6px"},"&:last-child":{marginLeft:"6px"},"& ::-webkit-clear-button, & ::-webkit-outer-spin-button, & ::-webkit-inner-spin-button":{"-webkit-appearance":"none",margin:0},"& input[type=number]":{"-webkit-appearance":"textfield"},"& svg":{fontSize:14,height:15,paddingBlockStart:"10px",paddingBlockEnd:"11px",paddingInlineEnd:"2px"},"& :nth-last-child(1):nth-child(2)":{paddingRight:10}},inputUnderline:{"&:after":{display:"none"},"&:before":{display:"none"}},inputBase:{textAlign:"right",paddingRight:"2px",padding:"10px 0px","&::placeholder":{fontSize:"14px",color:"#3A474E"}},inputAdornment:{marginLeft:"12px","& > .MuiTypography-colorTextSecondary":{color:"#8F9BA4",fontSize:"14px",textTransform:"lowercase"}},sliderRoot:{width:320,"@media (min-width: 390px) and (max-width: 960px)":{width:"80%;"}},sliderThumb:{"&:hover, &:active":{boxShadow:"none"},width:"16px",height:"16px",border:"1.25px solid #3A474E",backgroundColor:"#fff",marginTop:"-8px",marginLeft:"-8px"},sliderRail:{height:"1px",opacity:"unset",backgroundColor:"#D8DBE3"},sliderTrack:{height:"1px"},boxSlider:{display:"flex",justifyContent:"center",paddingBottom:"32px",height:"100%"},inputBox:{display:"flex",justifyContent:"center",marginBlockStart:36}})),ls=({title:e,values:s,onChange:n})=>{const o=rs(),r=(a,l)=>{const i=s.findIndex(x=>!l.includes(x.value));n(i,{...s[i],value:l[i]})};return t.jsxs(t.Fragment,{children:[t.jsx(A,{paddingBottom:3,classes:{root:o.inputBox},children:s.map((a,l)=>t.jsx(te,{classes:{root:o.inputRoot,input:o.inputBase,underline:o.inputUnderline},onChange:i=>{n(l,{...a,value:Number(i.target.value)})},value:a.value,startAdornment:t.jsx(kt,{classes:{root:o.inputAdornment},position:"start",children:a.title}),endAdornment:e==="Цена"&&t.jsx(ze,{}),inputProps:{"aria-label":a.title,type:"string"}},a.alias))}),t.jsx(A,{className:o.boxSlider,children:t.jsx(yt,{value:s.map(({value:a})=>a),classes:{thumb:o.sliderThumb,rail:o.sliderRail,track:o.sliderTrack,root:o.sliderRoot},min:s[0]["min-value"],max:s[1]["max-value"],onChange:r,valueLabelDisplay:"off","aria-labelledby":"price-slider"})})]})},cs=v(e=>({skeletonRoot:{backgroundColor:"#F0F3F6",width:120,height:"32px"},skeletonText:{transform:"scale(1, 1)"},skeletonWave:{"&:after":{background:"#E0E3E6"}}}));function ds(){const e=cs();return t.jsxs(d,{container:!0,direction:"row",justifyContent:"flex-start",alignItems:"flex-start",spacing:1,children:[t.jsx(d,{item:!0,lg:"auto",xl:"auto",md:"auto",xs:"auto",children:t.jsx(I,{classes:{root:e.skeletonRoot,text:e.skeletonText,wave:e.skeletonWave},animation:"wave"})}),t.jsx(d,{item:!0,lg:"auto",xl:"auto",md:"auto",xs:"auto",children:t.jsx(I,{classes:{root:e.skeletonRoot,text:e.skeletonText,wave:e.skeletonWave},animation:"wave"})}),t.jsx(d,{item:!0,lg:"auto",xl:"auto",md:"auto",xs:"auto",children:t.jsx(I,{classes:{root:e.skeletonRoot,text:e.skeletonText,wave:e.skeletonWave},animation:"wave"})}),t.jsx(d,{item:!0,lg:"auto",xl:"auto",md:"auto",xs:6,children:t.jsx(I,{classes:{root:e.skeletonRoot,text:e.skeletonText,wave:e.skeletonWave},animation:"wave"})}),t.jsx(d,{item:!0,lg:"auto",xl:"auto",md:"auto",xs:6,children:t.jsx(I,{classes:{root:e.skeletonRoot,text:e.skeletonText,wave:e.skeletonWave},animation:"wave"})}),t.jsx(d,{item:!0,lg:"auto",xl:"auto",md:"auto",xs:6,children:t.jsx(I,{classes:{root:e.skeletonRoot,text:e.skeletonText,wave:e.skeletonWave},animation:"wave"})}),t.jsx(d,{item:!0,lg:"auto",xl:"auto",md:"auto",xs:6,children:t.jsx(I,{classes:{root:e.skeletonRoot,text:e.skeletonText,wave:e.skeletonWave},animation:"wave"})}),t.jsx(d,{item:!0,lg:"auto",xl:"auto",md:"auto",xs:6,children:t.jsx(I,{classes:{root:e.skeletonRoot,text:e.skeletonText,wave:e.skeletonWave},animation:"wave"})})]})}const us=v(e=>({headerContainer:{paddingBottom:16},selectFilters:{color:e.color.black60,fontSize:e.typography.pxToRem(14),lineHeight:e.typography.pxToRem(24)},clearFilters:{fontSize:"14px",padding:0,alignItems:"flex-end",textTransform:"none","&:hover, &:active":{backgroundColor:"unset"}}})),xs=({filtersCheckedCount:e,filterCode:s,onClearFilter:n})=>{const o=us();return t.jsxs(d,{container:!0,spacing:2,alignItems:"center",justifyContent:"space-between",classes:{root:o.headerContainer},children:[t.jsx(d,{item:!0,xl:"auto",lg:"auto",md:"auto",sm:"auto",xs:"auto",children:t.jsx(A,{children:t.jsxs(W,{variant:"body1",classes:{root:o.selectFilters},children:["фильтры: ",e]})})}),t.jsx(d,{item:!0,xs:"auto",children:t.jsx(E,{fullWidth:!0,color:"primary",classes:{root:o.clearFilters},onClick:n,children:"очистить"})})]})},hs=v(e=>({buttonApply:{boxShadow:"none",width:"100%",borderTopRightRadius:0,borderTopLeftRadius:0,borderRadius:6,height:"48px",textTransform:"none",zIndex:100,"&:hover, &:active":{boxShadow:"none"},"@media (max-width: 1280px)":{borderRadius:16},"@media (hover: none)":{"&:hover":{"background-color":"#5D6871"}}}}),{name:"FilterApply"}),ne=e=>{const s=hs();return t.jsx(E,{...e,fullWidth:!0,variant:"contained",color:"default",classes:{root:s.buttonApply},children:e.children})},ms=v(e=>({buttonRoot:{borderRadius:10,height:32,paddingRight:25,paddingLeft:0,paddingTop:5,paddingBottom:5},buttonRootChecked:{position:"relative",backgroundColor:"#F0F3F6",borderRadius:10,marginRight:25,height:32,padding:"4px 11px","&:hover":{backgroundColor:"#F0F3F6"}},iconSizeMedium:{"& > *:first-child":{fontSize:16}},popoverPaper:{color:"#3A474E",boxShadow:"0px 16px 24px rgba(0, 0, 0, 0.06), 0px 2px 6px rgba(0, 0, 0, 0.04), 0px 0px 1px rgba(0, 0, 0, 0.04)",borderRadius:6,border:"0.5px solid #F0F3F6",minWidth:250,maxWidth:420},iconButton:{padding:0,"&:hover":{background:"none"}},iconSvgRoot:{color:"#3A474E",fontSize:"0.750em"},countText:{paddingLeft:5},filterContentBlock:{paddingInline:16,paddingBlockEnd:54,paddingBlockStart:16}}),{name:"FilterContent"}),ke={default:e=>Object.values(e.values).filter(({is_checked:s})=>s).length,SIZE:e=>e.values.map(({sections:s})=>s).flat().map(({items:s})=>s).flat().filter(({is_checked:s})=>s).length},ps=({buttonText:e,disabled:s,filterChecked:n,filterHeaderText:o,onClick:r,filterCode:a,children:l,headerContent:i,page:x,onApply:c,onClear:p,props:h})=>{const u=ms(),[f,_]=g.useState(null),w=g.useRef(null),P=()=>{_(w.current),r(a)},S=()=>{_(null)},j=(...R)=>{c(...R),S()};return s?t.jsx(E,{disabled:s,classes:{root:u.buttonRoot},variant:"text",color:"default",children:e}):t.jsxs(t.Fragment,{children:[t.jsx(E,{ref:w,classes:{root:n?u.buttonRootChecked:u.buttonRoot,iconSizeMedium:u.iconSizeMedium},variant:"text",onClick:()=>{P()},color:"default",endIcon:n?t.jsx(ee,{onClick:R=>{R.stopPropagation(),p()}}):t.jsx(Re,{}),children:t.jsx(W,{children:e})}),t.jsxs(Ct,{id:a,open:!!f,anchorEl:f,onClose:S,anchorOrigin:{vertical:n?"top":0,horizontal:n?"left":-12},transformOrigin:{vertical:"top",horizontal:"left"},classes:{paper:u.popoverPaper},children:[t.jsxs(A,{paddingLeft:"11px",paddingRight:"11px",height:30,display:"flex",alignItems:"center",justifyContent:"space-between",children:[t.jsx(W,{variant:"body2",color:"primary",children:o||"Фильтр"}),t.jsx(Fe,{"aria-label":"closeFilter",size:"small",onClick:S,classes:{root:u.iconButton},children:t.jsx(ee,{classes:{root:u.iconSvgRoot}})})]}),t.jsx(Ie,{}),t.jsxs(A,{className:u.filterContentBlock,children:[t.jsx(xs,{filtersCheckedCount:(ke[h.code]||ke.default)(h),filterCode:a,onClearFilter:p}),l]}),t.jsx(ne,{onClick:j,children:"Применить"})]})]})},gs=v(e=>({controlLabelRoot:{margin:0,alignItems:"start","&:not(:last-child)":{paddingBottom:"8px"}},disabled:{opacity:.5}}),{name:"FilterItem"}),bs=({title:e,value:s,checked:n,onClick:o,image:r,isDisabled:a,...l})=>{const i=gs();return t.jsx(vt,{classes:{root:O(i.controlLabelRoot,{[i.disabled]:a})},control:t.jsxs(t.Fragment,{children:[t.jsx(wt,{name:s,checked:n,onChange:o,color:"primary",disabled:a}),r&&t.jsx(A,{style:{width:20,height:20,background:`url(${r}) no-repeat #F0F3F6`,marginRight:5,borderRadius:5}})]}),label:e,labelPlacement:"end",...l})},fs=v(e=>({container:{height:200,"@media (max-width: 960px)":{height:"100%",paddingInline:18,"padding-block":"10px 0"}},inpSearch:{width:"100%",borderRadius:8,marginBlockEnd:16,"& input":{paddingBlock:8,paddingInline:24}},scrollVerticalTrack:{borderRadius:100,backgroundColor:"#8F9BA4"},childsBlock:{"@media(min-width: 281px) and (max-width: 960px)":{paddingInlineStart:12}},childsList:{marginBlock:10,paddingInlineStart:3,paddingInlineEnd:9},FormGroupBlock:{"@media(max-width: 960px)":{marginBlockEnd:46}}}),{name:"DefaultFilterContent"}),js=({values:e,onChange:s})=>{const n=fs(),[o,r]=g.useState(""),a=o.toLowerCase();return t.jsxs(A,{className:n.container,children:[t.jsx(te,{classes:{underline:n.inpSearch},placeholder:"Поиск",value:o,onChange:l=>r(l.target.value)}),t.jsx(Se,{customStyles:{thumbVertical:n.scrollVerticalTrack},children:t.jsx(St,{"aria-label":"position",className:n.FormGroupBlock,children:e.map((l,i)=>t.jsx(bs,{hidden:!l.title.toLowerCase().startsWith(a),title:l.title,image:l.image,checked:l.is_checked,isDisabled:l.is_disabled,onClick:()=>s(i,{...l,is_checked:!l.is_checked}),value:l.value.toString()},l.value))})})]})},Ee=({filterCode:e,props:s,onChange:n})=>s.type==="slider"?t.jsx(ls,{...s,onChange:n}):e==="SIZE"?t.jsx(ss,{...s,onChange:n}):t.jsx(js,{...s,onChange:n}),ks=({headerContent:e,page:s,actualFilters:n,onChange:o,onClearFilter:r,onApply:a})=>{const[l,i]=g.useState(void 0);return n?t.jsx(t.Fragment,{children:n.map(x=>t.jsx(d,{item:!0,xs:"auto",children:t.jsx(ps,{buttonText:x.title,filterChecked:x.is_filtred,disabled:x.is_disabled,filterHeaderText:x.title,filterCode:x.code,onClick:c=>i(c),headerContent:e,page:s,onApply:a,onClear:()=>r(x.code),props:x,children:l&&t.jsx(Ee,{filterCode:l,props:x,onChange:(c,p)=>o(x.code,c,p)})})},x.code))}):t.jsx(ds,{})},ys=v(e=>({menuItemRoot:{borderRadius:12,"&:hover":{backgroundColor:"#F0F3F6"},"&:focus":{backgroundColor:"#F0F3F6"}},menuItemRootMobile:{"&:hover":{backgroundColor:"unset"},"&:focus":{backgroundColor:"unset"}},menuItemGutters:{paddingLeft:8,paddingRight:8},listItemText:{display:"flex",alignItems:"center",justifyContent:"space-between",margin:0}}),{name:"SortItem"});function We({title:e,...s}){const n=ys(),o=_t("(max-width: 1280px)");return t.jsx(_e,{...s,classes:{root:O([n.menuItemRoot,o&&n.menuItemRootMobile]),gutters:n.menuItemGutters},children:t.jsx(Rt,{classes:{root:n.listItemText},disableTypography:!0,children:e})})}const Cs=v(e=>({popperRoot:{zIndex:e.zIndex.modal},menuBtnRoot:{padding:0,"&:hover":{backgroundColor:"unset"},"& .MuiButton-startIcon":{marginLeft:-1}},paperRoot:{minWidth:210,border:"1px solid rgba(0, 16, 61, 0.16)"},menuListPadding:{padding:8},endIcon:{transform:"rotate(0deg)",transition:e.transitions.create("all",{duration:150,easing:"cubic-bezier(0.4, 0, 0.2, 1)",delay:0})},endIconOpen:{transform:"rotate(180deg)"}}),{name:"Dropdown"}),vs=({items:e})=>{const s=Cs(),[n,o]=g.useState(!1),r=ht.useRef(null),a=X(),l=()=>{o(h=>!h)},i=h=>{r.current&&r.current.contains(h.target)||o(!1)};function x(h){h.key==="Tab"&&(h.preventDefault(),o(!1))}const c=(h,u)=>{i(h);const f=new URL(location.href);f.searchParams.set("sort",u.code),a(f.pathname+f.search)};if(!e)return null;const p=Object.values(e).filter(h=>h.is_active)[0];return t.jsxs(t.Fragment,{children:[t.jsx(E,{ref:r,"aria-controls":n?"menu-list-sort":void 0,"aria-haspopup":"true",onClick:l,classes:{root:s.menuBtnRoot,endIcon:O([s.endIcon,n&&s.endIconOpen])},endIcon:t.jsx(Re,{}),startIcon:t.jsx(Te,{}),children:t.jsx(W,{color:"primary",variant:"body1",children:p.title})}),t.jsx(Ft,{modifiers:{offset:{enabled:!0,offset:"0, 8px"}},open:n,anchorEl:r.current,role:void 0,transition:!0,placement:"bottom-start",className:s.popperRoot,disablePortal:!0,children:({TransitionProps:h,placement:u})=>t.jsx(It,{...h,style:{transformOrigin:"left top"},children:t.jsx(Xt,{classes:{root:s.paperRoot},children:t.jsx(Tt,{onClickAway:i,children:t.jsx(Be,{id:"menu-list-sort",classes:{padding:s.menuListPadding},onKeyDown:x,children:Object.values(e).map(f=>t.jsx(We,{...f,button:!0,onClick:_=>c(_,f)},f.code))})})})})})]})},ws=v(e=>({buttonRoot:{justifyContent:"flex-start",border:"1px solid #E0E0E0",borderRadius:"10px",fontSize:"0.875rem",lineHeight:"20px",padding:"10px 16px"},sortHeader:{minHeight:64,backgroundColor:"#F0F3F6"},sortHeaderText:{fontSize:e.typography.pxToRem(18)},menuItemRoot:{padding:16,borderBottom:"1px solid #EFF2F4"},listSvgRoot:{minWidth:"unset"},sortItem:{padding:9}}),{name:"SortMobile"});function Ss({items:e}){const s=ws(),[n,o]=g.useState(!1),r=X(),a=we(i=>{var x;return(x=i.catalogPageSlice)==null?void 0:x.selectedFilters});if(!e)return null;const l=(i,x)=>{o(!1),r(rt({...a,sort:{values:[x.code]}}))};return t.jsxs(d,{item:!0,xs:6,children:[t.jsx(E,{fullWidth:!0,startIcon:t.jsx(Te,{}),onClick:()=>o(i=>!i),variant:"outlined",color:"default",classes:{root:s.buttonRoot},children:"Сортировка"}),t.jsxs(Pe,{isWrapped:!1,open:n,onClose:()=>o(i=>!i),handlerCloseIcon:()=>o(i=>!i),showCloseIcon:!0,closeIconPosition:"left",anchor:"right",children:[t.jsx(d,{container:!0,item:!0,alignItems:"center",justifyContent:"center",classes:{root:s.sortHeader},children:t.jsx(d,{item:!0,xs:"auto",children:t.jsx(W,{classes:{root:s.sortHeaderText},children:"Сортировка"})})}),t.jsx(d,{item:!0,xs:12,classes:{root:s.sortItem},children:t.jsx(Be,{disablePadding:!0,children:Object.values(e).map((i,x)=>t.jsx(We,{isActive:i.is_active,button:!0,onClick:c=>l(c,i),title:i.title},x))})})]})]})}const _s=v(e=>({menuItem:{padding:"0 16px",display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:56,height:"100%"},menuItemIcon:{fontSize:e.typography.pxToRem(12),"& > *:first-child":{fontSize:e.typography.pxToRem(12)}},sortHeader:{minHeight:64,backgroundColor:"#F0F3F6"},sortHeaderText:{textAlign:"center",fontSize:e.typography.pxToRem(18)},clearContainer:{position:"absolute",right:20,top:23,zIndex:e.zIndex.modal},clearFilters:{fontSize:e.typography.pxToRem(14),lineHeight:e.typography.pxToRem(20),padding:0,textTransform:"none","&:hover, &:active":{backgroundColor:"unset"}},filterApplyBox:{display:"flex",justifyContent:"start",flexDirection:"column",position:"relative",height:"100%",padding:0,"@media (max-width: 280px)":{marginInline:15}},filterApplyButtonWrapper:{padding:"16px"}}),{name:"FilterContentMobile"}),Rs=({buttonText:e,disabled:s,filterHeaderText:n,onClick:o,filterCode:r,children:a,onClear:l})=>{const i=_s(),[x,c]=g.useState(!1),p=()=>{c(h=>!h),o(r)};return t.jsxs(t.Fragment,{children:[t.jsx(E,{disabled:s,classes:{root:i.menuItem,iconSizeMedium:i.menuItemIcon},color:"default",variant:"text",fullWidth:!0,endIcon:t.jsx(Bt,{}),onClick:p,children:t.jsx(W,{children:e})}),t.jsxs(Pe,{isWrapped:!1,open:x,onClose:()=>c(h=>!h),handlerCloseIcon:()=>c(h=>!h),closeIconPosition:"left",anchor:"right",IconComponent:t.jsx(Pt,{}),showCloseIcon:!0,children:[t.jsxs(d,{container:!0,item:!0,alignItems:"center",justifyContent:"center",classes:{root:i.sortHeader},children:[t.jsx(d,{item:!0,sm:"auto",xs:"auto",children:t.jsx(W,{classes:{root:i.sortHeaderText},children:n||"Фильтр"})}),t.jsx(d,{item:!0,classes:{root:i.clearContainer},children:t.jsx(E,{fullWidth:!0,color:"primary",classes:{root:i.clearFilters},onClick:l,children:"очистить"})})]}),t.jsx(Ie,{}),t.jsxs(A,{paddingTop:2,className:i.filterApplyBox,children:[a,t.jsx("div",{className:i.filterApplyButtonWrapper,children:t.jsx(ne,{onClick:()=>{c(!1)},children:"Готово"})})]})]})]})},Fs=v(e=>({headerContainer:{minHeight:64,backgroundColor:"#F0F3F6"},headerText:{fontSize:e.typography.pxToRem(18),lineHeight:e.typography.pxToRem(18)}}),{name:"DrawerHeader"});function Is({title:e}){const s=Fs();return t.jsx(d,{container:!0,item:!0,alignItems:"center",justifyContent:"center",classes:{root:s.headerContainer},children:t.jsx(d,{item:!0,xs:"auto",children:t.jsx(W,{classes:{root:s.headerText},children:e})})})}const Ts=v(e=>({buttonRoot:{justifyContent:"flex-start",border:"1px solid #E0E0E0",borderRadius:"10px",fontSize:"0.875rem",lineHeight:"20px",padding:"10px 16px"},filterContainer:{"flex-grow":1,overflow:"auto","@media (max-width: 390px)":{overflow:"scroll"}},filterItem:{borderBottom:"1px solid #E0E0E0"},filterApplyBox:{padding:"16px",position:"sticky",bottom:0,background:"white"},filterDrawer:{},mobileModalDrawer:{position:"fixed",top:0,left:0,right:0,bottom:0,"z-index":1300,display:"flex","flex-direction":"column",background:"white"},closeButton:{position:"absolute",top:24,left:24,padding:0}}),{name:"MobileFilter"}),Bs=({actualFilters:e=[],onChange:s,onClearFilter:n,onApply:o})=>{const r=Ts(),[a,l]=g.useState(),[i,x]=g.useState(!1),c=()=>{document.body.style.overflow="",x(!1)},p=()=>{document.body.style.overflow="hidden",x(!0)},h=()=>{c(),o()};return t.jsxs(d,{item:!0,xs:6,children:[t.jsx(E,{startIcon:t.jsx(At,{}),onClick:p,fullWidth:!0,classes:{root:r.buttonRoot},children:"Фильтр"}),i&&t.jsxs("div",{className:r.mobileModalDrawer,children:[t.jsx(Fe,{classes:{root:r.closeButton},onClick:c,children:t.jsx(ee,{})}),t.jsx(Is,{title:"Фильтр"}),t.jsx(d,{container:!0,classes:{root:r.filterContainer},children:e.map(u=>t.jsx(d,{item:!0,xs:12,classes:{root:r.filterItem},children:t.jsx(Rs,{buttonText:u.title,filterChecked:u.is_filtred,disabled:u.is_disabled,filterHeaderText:u.title,filterCode:u.code,onClick:f=>l(f),onClear:()=>n(u.code),children:a&&t.jsx(Ee,{filterCode:a,props:u,onChange:(f,_)=>s(u.code,f,_)})})},u.code))}),t.jsx(A,{padding:"0 16px",className:r.filterApplyBox,children:t.jsx(ne,{onClick:h,children:"Применить"})})]})]})},Y=["ONE SIZE","XXS","XXS/XS","XS","XS/S","S","S/M","M","M/L","L","L/XL","XL","XL/XXL","XXL","XXL/XXXL","XXXL","XXXXL","XXXXXL","3XS","2XS","2XL","3XL","4XL","5XL","WS","WM"],ye=[{test:({title:e})=>Y.includes(e),sort:(e,s)=>Y.indexOf(e.title)-Y.indexOf(s.title)},{test:({title:e})=>e.startsWith("l"),sort:(e,s)=>e.title.replace("l","")-s.title.replace("l","")},{test:({title:e})=>!isNaN(+e),sort:(e,s)=>+e.title-+s.title},{test:({title:e})=>/^\d+\/\d+$/.test(e),sort:(e,s)=>parseInt(e.title)-parseInt(s.title)}];function Ps(e){try{const s=ye.flatMap(o=>e.filter(r=>o.test(r)).sort(o.sort)),n=e.filter(o=>!ye.find(r=>r.test(o)));return[...s,...n]}catch{return e}}function Ce(e=[]){return e.map(s=>s.code==="SIZE"?{...s,values:s.values.map(n=>({...n,sections:n.sections.map(o=>({...o,items:Ps(o.items).sort((r,a)=>Number(r.is_disabled)-Number(a.is_disabled))}))}))}:{...s,values:Object.values(s.values).sort((n,o)=>Number(n.is_disabled)-Number(o.is_disabled))})}const As=v(e=>({containerFilter:{paddingBlock:e.spacing(4),justifyContent:"space-between","& > div:nth-of-type(-n+2)":{"@media (min-width: 1280px)":{width:"auto",flex:"0 0 auto"}}}}),{name:"filter"}),ve=({code:e,values:s})=>e==="SECTIONS"||e==="GENDER_PUB"&&s.filter(({is_checked:n})=>n).length>1,en=({headerContent:e,filterData:s,page:n})=>{var f,_;const o=As(),r=X(),[a,l]=g.useState(Ce((f=s==null?void 0:s.filter)==null?void 0:f.items)),i=s==null?void 0:s.url,x=!(i!=null&&i.startsWith("/promo"));g.useEffect(()=>{var w;l(Ce((w=s==null?void 0:s.filter)==null?void 0:w.items))},[s]);const c=w=>{const P=Object.entries(w.filter(({code:m})=>m==="SIZE").map(({values:m})=>m.map(({sections:b})=>b)).flat(2).map(m=>({...m,items:m.items.filter(({is_checked:b})=>b).map(b=>b["alias-value"]||b.title)})).filter(({items:m})=>m.length).reduce((m,b)=>(b.code in m?m[b.code]=[...m[b.code],...b.items]:m[b.code]=b.items,m),{})).map(([m,b])=>`${m.toLowerCase()}-${[...new Set(b)].join("~")}`),S=w.filter(({type:m})=>m==="slider").map(({values:m})=>m).flat().filter(m=>m.value!==m["min-value"]&&m.value!==m["max-value"]).map(({alias:m,value:b})=>`${m}-${b}`),R=[...w.filter(({alias:m,values:b,code:T})=>!ve({code:T,values:b})&&m&&Object.values(b).some(k=>k.is_checked&&k["alias-value"])).map(({alias:m,values:b})=>{const T=b.filter(k=>k.is_checked&&k["alias-value"]);return`${m}-${T.map(k=>k["alias-value"]).join("~")}`}),...P,...S].join("/"),M=w.filter(({values:m,code:b})=>ve({code:b,values:m})&&Object.values(m).some(({is_checked:T,childs:k})=>T||(k==null?void 0:k.some(({is_checked:Z})=>Z)))).map(({code:m,values:b})=>`${m}=${b.filter(T=>T.childs?T.childs.some(({is_checked:k})=>k):T.is_checked).map(T=>T.childs?T.childs.filter(({is_checked:k})=>k).map(({value:k})=>k).join("~"):T.value).join("~")}`).join("&"),G=`${i}${R}${R.length?"/":""}?${M}`,q=location.search.includes("sort="),Q=location.search.replace(/^.*?(?=sort=)/,"");if(location.search&&q)return r(G+`${M?"&":""}`+Q);r(G)},p=(w,P,S)=>{const j=a.map(R=>R.code===w?{...R,values:Object.values(R.values).map((L,M)=>M===P?{...S}:L)}:R);l(j)},h=w=>{const P=a.map(S=>S.code===w?S.type==="slider"?{...S,values:S.values.map(j=>({...j,value:j["max-value"]||j["min-value"]}))}:w==="SIZE"?{...S,values:S.values.map(j=>({...j,sections:j.sections.map(R=>({...R,items:R.items.map(L=>({...L,is_checked:!1}))}))}))}:{...S,values:Object.values(S.values).map(j=>j.childs?{...j.childs,is_checked:!1}:{...j,is_checked:!1})}:S);c(P)},u=()=>c(a);return t.jsx("noindex",{children:t.jsxs(d,{container:!0,spacing:3,classes:{root:o.containerFilter},children:[t.jsxs(je,{smDown:!0,children:[x&&t.jsx(d,{container:!0,item:!0,children:t.jsx(Jt,{items:(_=s==null?void 0:s.filter)==null?void 0:_.items,children:t.jsx(ks,{headerContent:e,page:n,actualFilters:a,onChange:p,onClearFilter:h,onApply:u})})}),t.jsx(d,{container:!0,item:!0,justifyContent:"flex-start",children:t.jsx(d,{item:!0,children:t.jsx(vs,{items:s==null?void 0:s.sorts})})})]}),t.jsx(je,{mdUp:!0,children:t.jsx(d,{container:!0,item:!0,children:t.jsxs(d,{container:!0,item:!0,spacing:3,alignItems:"center",justifyContent:"center",children:[t.jsx(Ss,{items:s==null?void 0:s.sorts}),t.jsx(Bs,{headerContent:e,page:n,actualFilters:a,onChange:p,onClearFilter:h,onApply:u})]})})})]})})},zs=v(e=>({productActions:{"& .swiper-container":{padding:"0 15px",overflow:"hidden",position:"relative",width:"100%","& .swiper-wrapper":{display:"flex","transition-property":"transform","box-sizing":"content-box"},"& .swiper-button-next, & .swiper-button-prev":{position:"absolute",top:"50%",transform:"translateY(-50%)",width:"20px",cursor:"pointer",height:"100%",display:"flex","align-items":"center",background:"white","justify-content":"center",marginTop:0,"&:after":{content:'" "',transform:"rotate(45deg)",width:"10px",height:"10px",display:"block"},"&.swiper-button-disabled":{display:"none"}},"& .swiper-button-next":{right:"0","&:after":{border:"1px solid","border-color":"#c6c6c6 #c6c6c6 transparent transparent"}},"& .swiper-button-prev":{left:"0","&:after":{border:"1px solid","border-color":"transparent transparent #c6c6c6 #c6c6c6"}},"& .swiper-slide":{width:56,"@media (max-width: 640px)":{width:40}}}},productThumb:{"box-sizing":"border-box",cursor:"pointer",padding:"3px",borderRadius:"3px",border:"2px solid transparent","&:hover":{border:"2px solid #3A474E",borderRadius:"6px"}}}),{name:"ProductThumbnails"});qt.use([Qt]);const Es={slidesPerView:"auto",navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}},Ws=({colorList:e=[],onClick:s,colorRef:n,thingType:o})=>{const r=zs(),a=X(),l=o==="Ювелирное изделие";return Array.isArray(e)?t.jsx(zt,{classes:{root:r.productActions},ref:n,children:t.jsx(Gt,{...Es,children:e.map((i,x)=>t.jsx(Et,{onClick:()=>{if(l)return a(i.url);s(i.color_code,x,i.color_title)},classes:{media:r.productThumb},component:"img",src:i.gallery?i.gallery[0]:"",alt:i.color_title,title:i.color_title},x))})}):null},$s=v(e=>({gridItem:{"& > *":{paddingBottom:20,"@media (min-width: 768px) and (max-width: 960px)":{paddingInline:10}}},loader:{zIndex:e.zIndex.drawer,position:"absolute",backgroundColor:"rgba(255, 255, 255, 0.5)"}}),{name:"CatalogProductPreview"}),tn=({product:e,type:s,productPosition:n,setShowDisplayProductSizes:o,showDisplayProductSiazes:r,pageName:a,catalogName:l,observer:i})=>{var ue,xe,he,me,pe,ge;const x=$s(),c=we(C=>C.userAuth.isAuth),p=g.useRef(null),h=g.useRef(null),u=X(),[f,{data:_,isLoading:w,isSuccess:P}]=lt(),[S,{data:j,isFetching:R}]=ct(),[L,{data:M,isFetching:G}]=dt(),[q,{data:Q,isLoading:m}]=ut(),[b,T]=g.useState(""),[k,Z]=g.useState(""),[oe,$e]=g.useState(0),[Le,Me]=g.useState(0),[Oe,D]=g.useState(!1),[Xe,He]=g.useState(!1),[Ne,ie]=g.useState(!1),Ue=(ue=e==null?void 0:e.colors_list[oe])==null?void 0:ue.sku_ids[0],y=e==null?void 0:e.colors_list[oe],K=(j==null?void 0:j.data)&&((me=(he=(xe=j==null?void 0:j.data)==null?void 0:xe.MAIN)==null?void 0:he.content)==null?void 0:me.colors_list),Ge=e==null?void 0:e.technologies,qe=(pe=j==null?void 0:j.data)==null?void 0:pe.MAIN,Qe=e.thing_type,Ze=e==null?void 0:e.is_soon,De=e==null?void 0:e.product_id,[Ke,ae]=g.useState(!1),[Ve,Je]=g.useState(e==null?void 0:e.url),re=Ve||(y==null?void 0:y.url),le=/Новинки|Распродажа/.test(l),Ye=e==null?void 0:e.is_offline_sale,et=()=>s==="search"?4:3,tt=(C,F)=>{F!=="clickaway"&&D(!1)},st=C=>{f({sku:C}).then(F=>{var B,z,H,N,U;F.data.status==="success"&&!Array.isArray(F.data.data)&&J("add_to_cart",{currency:"RUB",item_list_name:a,value:(z=(B=e==null?void 0:e.colors_list)==null?void 0:B.find($=>$.color_title===k))==null?void 0:z.retail_price,items:[{item_name:e==null?void 0:e.name,item_id:C,price:(N=(H=e==null?void 0:e.colors_list)==null?void 0:H.find($=>$.color_title===k))==null?void 0:N.retail_price,item_brand:(U=e==null?void 0:e.brand)==null?void 0:U.name,item_category2:e==null?void 0:e.thing_type,item_category3:le&&l,item_variant:k,index:n,is_peak:e==null?void 0:e.is_peak,quantity:1,offer_id:C}]})})},ce=C=>{q({url:be.user.wishlist.add,...fe({SITE_ID:"lid",bitrix_sessid:"bitrix_sessid"}),id:C}).then(F=>{var B,z,H,N,U;F.data.status==="success"&&!Array.isArray(F.data.data)&&J("add_to_wishlist",{currency:"RUB",item_list_name:a,value:(z=(B=e==null?void 0:e.colors_list)==null?void 0:B.find($=>$.color_title===k))==null?void 0:z.retail_price,items:[{item_name:e==null?void 0:e.name,item_id:C,price:(N=(H=e==null?void 0:e.colors_list)==null?void 0:H.find($=>$.color_title===k))==null?void 0:N.retail_price,item_brand:(U=e==null?void 0:e.brand)==null?void 0:U.name,item_category2:e==null?void 0:e.thing_type,item_category3:le&&l,is_peak:e==null?void 0:e.is_peak,item_variant:k,index:n,quantity:1,offer_id:F.data.SKU_ID}]})})},nt=(C,F)=>Ye?u(e.url):Ne?(ie(!1),ce(C)):st(C),ot=(C,F,B,z)=>{if(Ze)return ae(!0);Je(""),o(C),$e(z),Me(C),T(B),Z(F),Le!==C&&S({url:`${be.product.getProduct}${C}/color_sizes/${B}/`,productId:C,color:B,...fe({SITE_ID:"lid",bitrix_sessid:"bitrix_sessid"})})},de=g.useMemo(()=>K==null?void 0:K.filter(C=>C.color_code===b),[qe,b]);g.useEffect(()=>{P&&D(P)},[P]);const[it]=xt(),at=async C=>{var F,B,z;C.preventDefault(),it({type:"clickItem",sku_id:e.product_id,price:y==null?void 0:y.retail_price}),J("select_item",{currency:"RUB",item_list_name:a,value:(F=e==null?void 0:e.colors_list[0])==null?void 0:F.retail_price,items:[{item_name:e==null?void 0:e.name,item_id:e==null?void 0:e.product_id,price:(B=e==null?void 0:e.colors_list[0])==null?void 0:B.retail_price,item_brand:(z=e==null?void 0:e.brand)==null?void 0:z.name,item_category2:e==null?void 0:e.thing_type,is_peak:e==null?void 0:e.is_peak,quantity:1,index:n}]})},V=g.useRef(null);return g.useEffect(()=>{try{return i.observe(V.current),()=>{i.disconnect()}}catch{}},[V,i]),t.jsxs(t.Fragment,{children:[t.jsx(d,{item:!0,md:et(),xs:6,classes:{item:x.gridItem},ref:V,"data-id":e.product_id,itemProp:"itemListElement",itemScope:!0,itemType:"http://schema.org/Product",children:t.jsxs(Ht,{children:[t.jsx(Nt,{containerSize:"big",url:re,imgUrl:y==null?void 0:y.gallery,imgTitle:y==null?void 0:y.gallery_image_alt,imgAlt:y==null?void 0:y.gallery_image_alt,technologies:Ge[0],badge:e.badges,sizes:de&&de[0].size_list,onClickSize:nt,productSku:Ue,handleAddWishlist:ce,inWishlist:e==null?void 0:e.in_wishlist,setClickOnWishListIcon:ie,isUserAuth:c,colorRef:h,addWishList:m,wishListItem:Q,parentRef:p,selectColor:k,showDisplayProductSiazes:r,setShowDisplayProductSizes:o,onCardClick:at,productId:De,isComingSoon:Ke,setIsComingSoon:ae,advertBadge:e.advert_badge}),t.jsx(Ut,{title:e.thing_type,brandName:e.brand.name,name:e.model_name,price:y==null?void 0:y.retail_price,oldPrice:y==null?void 0:y.base_price,percent:(ge=y==null?void 0:y.discount)==null?void 0:ge.percent_format,url:re,metaDesk:e.metaItemprop.description}),t.jsx(Ws,{onClick:(C,F,B)=>{ot(e.product_id,B,C,F)},colorList:e==null?void 0:e.colors_list,colorRef:h,thingType:Qe}),t.jsx(Wt,{classes:{root:x.loader},open:R||w,children:t.jsx($t,{color:"primary"})})]})}),(_==null?void 0:_.data)&&t.jsx(Zt,{cartItem:_,open:Oe,handleClose:tt,getBasket:L,setOpenCart:He,setOpenInfo:D,openCart:Xe,basketLoading:G,basketData:M})]})},Ls=v(e=>({skeletProductImg:{marginBottom:e.spacing(3),backgroundColor:e.color.black20,"@media (min-width: 1656px)":{height:498},"@media (max-width: 1440px)":{height:390},"@media (max-width: 1280px)":{height:353},"@media (max-width: 479px)":{height:"auto"}},skeletProductCatRoot:{transform:"scale(1, 1)",backgroundColor:e.color.black20,marginBottom:e.spacing(1)},skeletProductCatText:{width:"148px",height:"14px","@media (max-width: 479px)":{width:"auto"}},skeletProductBrandText:{width:"208px",height:"20px","@media (max-width: 479px)":{width:"auto"}},skeletProductNameText:{width:"208px",height:"20px","@media (max-width: 479px)":{width:"auto"}},skeletProductThumb:{display:"inline-flex",width:24,height:24,marginRight:e.spacing(1)}}));function sn({count:e}){const s=Ls(),[n,o]=g.useState(new Array(3).fill(1));return g.useEffect(()=>{e&&o(new Array(e).fill(1))},[e]),t.jsx(t.Fragment,{children:n.map((r,a)=>t.jsxs(d,{item:!0,xl:3,lg:3,md:6,sm:6,xs:6,children:[t.jsx(I,{variant:"rect",classes:{root:s.skeletProductImg},animation:"wave"}),t.jsx(I,{variant:"text",classes:{root:s.skeletProductCatRoot,text:s.skeletProductCatText},animation:"wave"}),t.jsx(I,{variant:"text",classes:{root:s.skeletProductCatRoot,text:s.skeletProductBrandText},animation:"wave"}),t.jsx(I,{variant:"text",classes:{root:s.skeletProductCatRoot,text:s.skeletProductNameText},animation:"wave"}),t.jsx(I,{variant:"rect",classes:{root:s.skeletProductCatRoot,rect:s.skeletProductThumb},animation:"wave"}),t.jsx(I,{variant:"rect",classes:{root:s.skeletProductCatRoot,rect:s.skeletProductThumb},animation:"wave"}),t.jsx(I,{variant:"rect",classes:{root:s.skeletProductCatRoot,rect:s.skeletProductThumb},animation:"wave"}),t.jsx(I,{variant:"rect",classes:{root:s.skeletProductCatRoot,rect:s.skeletProductThumb},animation:"wave"})]},a))})}const Ms=v(e=>({itemPositionCenter:{marginInline:"auto"},endPageText:{color:e.color.black100,fontSize:e.typography.pxToRem(20),fontWeight:"bold"},buttonMore:{color:e.color.black100,fontSize:e.typography.pxToRem(20),padding:"20px 36px",border:`2px solid ${e.color.black40}`,borderRadius:"16px","&:hover":{backgroundColor:"unset"},"@media (max-width: 960px)":{width:"350px"}},productCount:{color:e.color.black60},activePageCountElement:{color:e.color.blue},inactivePageCountElement:{cursor:"pointer",color:e.color.black60,"&:hover":{color:e.color.blue}},productCountPosition:{justifyContent:"flex-start",columnGap:"0.5em","@media (max-width: 479px)":{justifyContent:"center"}},catalogPriceFooter:{paddingBottom:80,"@media (max-width: 960px)":{flexDirection:"column"}}}),{name:"CatalogFooter"});function Os({location:e,pageNum:s}){const n=new URLSearchParams(e.search);return n.set("PAGEN_1",s),`${e.pathname}?${n}`}const nn=({items:e,sumProducs:s})=>{var p,h;if(!e)return null;const n=Ms(),o=X(),r=(p=e==null?void 0:e.data)==null?void 0:p.page_count,a=(h=e==null?void 0:e.data)==null?void 0:h.current_page,l=e==null?void 0:e.data,i=(u,f)=>{o(Os({location,pageNum:f}))},{items:x}=Lt({count:r,siblingCount:Dt(r,a),onChange:i,page:a}),c=u=>{x==null||x.at(-1).onClick(u)};return t.jsxs(d,{container:!0,spacing:3,alignItems:"center",justifyContent:"space-between",classes:{root:n.catalogPriceFooter},children:[l&&t.jsx(d,{item:!0,md:"auto",xs:12,children:t.jsx(d,{container:!0,className:n.productCountPosition,children:t.jsxs(W,{variant:"body1",classes:{root:n.productCount},children:["Показано ",s," из ",e.data.record_count," товаров"]})})}),t.jsx(d,{item:!0,md:"auto",xs:12,classes:{root:n.itemPositionCenter},children:t.jsx(d,{container:!0,justifyContent:"center",children:r!==a&&t.jsx(E,{fullWidth:!0,color:"primary",id:"show-more",classes:{root:n.buttonMore},onClick:c,children:"Следующая страница"})})}),t.jsx(d,{item:!0,md:"auto",xs:12,children:t.jsx(d,{container:!0,item:!0,children:t.jsx(Kt,{data:x})})})]})};export{sn as C,en as F,tn as a,nn as b};