"use strict";var P=Object.create;var r=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var k=Object.getPrototypeOf;var w=Object.prototype.hasOwnProperty;var u=(t,e)=>r(t,"name",{value:e,configurable:true});var B=(t,e)=>{for(var s in e)r(t,s,{get:e[s],enumerable:true})};var g=(t,e,s,i)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let o of S(e))if(!w.call(t,o)&&o!==s)r(t,o,{get:()=>e[o],enumerable:!(i=f(e,o))||i.enumerable})}return t};var d=(t,e,s)=>(s=t!=null?P(k(t)):{},g(e||!t||!t.__esModule?r(s,"default",{value:t,enumerable:true}):s,t));var A=t=>g(r({},"__esModule",{value:true}),t);var h=(t,e,s,i)=>{var o=i>1?void 0:i?f(e,s):e;for(var m=t.length-1,l;m>=0;m--)if(l=t[m])o=(i?l(e,s,o):l(o))||o;if(i&&o)r(e,s,o);return o};var R={};B(R,{default:()=>_});module.exports=A(R);var n=require("react/jsx-runtime");var a=require("mobx-react");var b=require("react");var c=require("react-intl");var v=require("@mdi/js");var C=require("react-router-dom");var K=require("../../jsUtils");var E=d(require("../ui/effects/Appear"));var I=d(require("../ui/icon"));var N=d(require("../util/ErrorBoundary"));const y=(0,c.defineMessages)({closeSettings:{id:"settings.app.closeSettings",defaultMessage:"Close settings"}});let p=class extends b.Component{handleKeyDownBound=this.handleKeyDown.bind(this);componentDidMount(){document.addEventListener("keydown",this.handleKeyDownBound,false)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDownBound,false)}handleKeyDown(e){if((0,K.isEscapeKeyPress)(e.key)){this.props.actions.ui.closeSettings()}}render(){const{closeSettings:e}=this.props.actions.ui;const{intl:s}=this.props;return(0,n.jsx)(E.default,{transitionName:"fadeIn-fast",children:(0,n.jsx)("div",{className:"settings-wrapper",children:(0,n.jsxs)(N.default,{children:[(0,n.jsx)("button",{type:"button",className:"settings-wrapper__action",onClick:e,"aria-label":s.formatMessage(y.closeSettings)}),(0,n.jsxs)("div",{className:"settings franz-form",children:[(0,n.jsx)(C.Outlet,{}),(0,n.jsx)("button",{type:"button",className:"settings__close",onClick:e,"aria-label":s.formatMessage(y.closeSettings),children:(0,n.jsx)(I.default,{icon:v.mdiClose,size:1.35})})]})]})})})}};u(p,"DownloadManagerLayout");p=h([(0,a.inject)("stores","actions"),a.observer],p);var _=(0,c.injectIntl)(p);
