"use strict";(self.webpackChunkm3pyok7m_b63o0v8tu9=self.webpackChunkm3pyok7m_b63o0v8tu9||[]).push([[655],{3342:(e,t,m)=>{m.r(t),m.d(t,{ThemePopup:()=>S});var s=m(3019),a=m(5832),n=m(8251),o=m(9201),l=m(9158),i=m(6479),r=m.n(i);let h;!function(e){e.Desktop="desktop",e.RobotDesktop="robotDesktop",e.Mobile="mobile",e.RobotMobile="robotMobile"}(h||(h={}));var d=m(3555),c=m(2581),u=m(9115),k=m(7650);const p={system:{ru:"Системный"},dark:{ru:"Тёмный"},light:{ru:"Светлый"}},g=((0,o.CP)(p),(0,o.$S)(p)),z="dzen-layout--theme-modal-inner__root-2m",_="dzen-layout--theme-modal-inner__header-2H",b="dzen-layout--theme-modal-inner__close-3V",y="dzen-layout--theme-modal-inner__title-15",v="dzen-layout--theme-modal-inner__themeList-cC",C="dzen-layout--theme-modal-inner__themeItem-1X",P="dzen-layout--theme-modal-inner__themeIcon-k6",E="dzen-layout--theme-modal-inner__mobile-3j",N="dzen-layout--theme-modal-inner__themeName-ib",f=[k.PW.system,k.PW.light,k.PW.dark],W={[h.Mobile]:{[k.PW.system]:"https://s3.dzeninfra.ru/zen-misc/images/theme-modal/theme-mobile-system.svg",[k.PW.dark]:"https://s3.dzeninfra.ru/zen-misc/images/theme-modal/theme-mobile-dark.svg",[k.PW.light]:"https://s3.dzeninfra.ru/zen-misc/images/theme-modal/theme-mobile-light.svg"},[h.Desktop]:{[k.PW.system]:"https://s3.dzeninfra.ru/zen-misc/images/theme-modal/theme-desktop-system.svg",[k.PW.dark]:"https://s3.dzeninfra.ru/zen-misc/images/theme-modal/theme-desktop-dark.svg",[k.PW.light]:"https://s3.dzeninfra.ru/zen-misc/images/theme-modal/theme-desktop-light.svg"}},T=e=>{let{className:t,title:m,checkedTheme:s,onClose:n,onThemeChange:l}=e;const i=!1,k=(0,o.Ym)(),p=(e=>{let{isMobile:t,checked:m}=e;return f.map((e=>{const s=t?h.Mobile:h.Desktop;return{theme:e,name:g[e],image:W[s][e],isChecked:m===e}}))})({isMobile:i,checked:s});return a.createElement("div",{className:r()(z,t)},a.createElement("div",{className:_},a.createElement("div",{className:y},m),a.createElement(c.B,{className:b,icon:d.A,iconColor:"icon_primary",size:"l",onClick:n})),a.createElement("div",{className:v},p.map((e=>{let{theme:t,name:m,image:s,isChecked:n}=e;return a.createElement("div",{key:t,className:C,onClick:n?void 0:()=>l(t)},a.createElement("img",{className:r()(P,{[E]:i}),src:s,alt:m(k)}),a.createElement("div",{className:N},m(k)),n&&a.createElement(u.J,{checked:!0}))}))))},M={headerText:{ru:"Внешний вид"}},D=((0,o.CP)(M),(0,o.$S)(M)),x="dzen-layout--theme-popup__popup-X4",S=e=>{let{state:t}=e;const{themeSetting:m,setThemeSetting:i}=(0,s.useContext)(l.Dx),r=(0,o.Ym)(),{isOpen:h,handleClose:d}=t;return a.createElement(n.a,{visible:h,onClose:d,hasCloseButton:!1,autoFocus:!1},a.createElement(T,{className:x,onClose:d,title:D.headerText(r),checkedTheme:m,onThemeChange:i}))}}}]);
//# sourceMappingURL=https://s3-zen.mds.yandex.net/zen-eb/source-maps/prod/dzen-layout/1.52.1/dzen-layout-desktop-theme-popup.modern.bundle.js.map